From 328af3bc1cd8f7c42aed4d2e0efcb85bca59ecdb Mon Sep 17 00:00:00 2001 From: malnasleh Date: Sun, 16 Nov 2025 13:55:05 -0800 Subject: [PATCH 1/4] Regenerated the API client using command in README.md --- cirro_api_client/v1/api/audit/get_event.py | 12 +- cirro_api_client/v1/api/audit/list_events.py | 52 +-- .../v1/api/billing/create_billing_account.py | 14 +- .../v1/api/billing/delete_billing_account.py | 8 +- .../v1/api/billing/get_billing_accounts.py | 30 +- .../v1/api/billing/update_billing_account.py | 10 +- .../api/compute_environment/create_agent.py | 14 +- .../create_compute_environment.py | 14 +- .../api/compute_environment/delete_agent.py | 8 +- .../delete_compute_environment.py | 8 +- .../v1/api/compute_environment/get_agents.py | 18 +- .../get_compute_environments.py | 18 +- .../api/compute_environment/update_agent.py | 10 +- .../update_compute_environment.py | 10 +- .../v1/api/dashboards/create_dashboard.py | 14 +- .../v1/api/dashboards/delete_dashboard.py | 12 +- .../v1/api/dashboards/get_dashboard.py | 12 +- .../v1/api/dashboards/get_dashboards.py | 18 +- .../v1/api/dashboards/update_dashboard.py | 14 +- .../v1/api/datasets/delete_dataset.py | 8 +- .../v1/api/datasets/get_dataset.py | 12 +- .../v1/api/datasets/get_dataset_manifest.py | 34 +- .../v1/api/datasets/get_datasets.py | 34 +- .../v1/api/datasets/get_sample_sheets.py | 12 +- .../v1/api/datasets/import_public_dataset.py | 14 +- .../v1/api/datasets/ingest_samples.py | 8 +- .../v1/api/datasets/regenerate_manifest.py | 8 +- .../v1/api/datasets/rerun_transform.py | 8 +- .../v1/api/datasets/update_dataset.py | 14 +- .../v1/api/datasets/upload_dataset.py | 14 +- .../v1/api/execution/calculate_cost.py | 176 ++++++++++ .../v1/api/execution/get_execution_logs.py | 24 +- .../v1/api/execution/get_project_summary.py | 24 +- .../v1/api/execution/get_task_logs.py | 24 +- .../api/execution/get_tasks_for_execution.py | 30 +- .../v1/api/execution/run_analysis.py | 14 +- .../v1/api/execution/stop_analysis.py | 12 +- .../v1/api/feed/create_discussion.py | 14 +- .../v1/api/feed/delete_discussion.py | 8 +- .../v1/api/feed/delete_message.py | 8 +- .../v1/api/feed/get_discussion.py | 12 +- .../v1/api/feed/get_discussions_for_entity.py | 48 +-- .../api/feed/get_messages_for_discussion.py | 62 ++-- cirro_api_client/v1/api/feed/post_message.py | 10 +- .../v1/api/feed/update_discussion.py | 10 +- .../v1/api/feed/update_message.py | 10 +- .../generate_governance_file_access_token.py | 14 +- .../generate_project_file_access_token.py | 14 +- .../api/file/generate_project_sftp_token.py | 14 +- .../api/governance/create_classification.py | 14 +- .../v1/api/governance/create_contact.py | 14 +- .../v1/api/governance/create_requirement.py | 14 +- .../api/governance/delete_classification.py | 8 +- .../v1/api/governance/delete_contact.py | 8 +- .../v1/api/governance/delete_requirement.py | 8 +- .../v1/api/governance/fulfill_requirement.py | 14 +- .../v1/api/governance/get_classification.py | 12 +- .../v1/api/governance/get_classifications.py | 18 +- .../v1/api/governance/get_contact.py | 12 +- .../v1/api/governance/get_contacts.py | 18 +- .../v1/api/governance/get_requirement.py | 12 +- .../v1/api/governance/get_requirements.py | 30 +- .../governance/get_requirements_by_project.py | 30 +- .../api/governance/update_classification.py | 14 +- .../v1/api/governance/update_contact.py | 14 +- .../v1/api/governance/update_requirement.py | 14 +- .../update_requirement_file_for_project.py | 10 +- .../v1/api/metadata/get_dataset_samples.py | 18 +- .../v1/api/metadata/get_project_samples.py | 34 +- .../v1/api/metadata/get_project_schema.py | 12 +- .../v1/api/metadata/get_sample_by_id.py | 12 +- .../v1/api/metadata/update_project_schema.py | 10 +- .../v1/api/metadata/update_sample.py | 14 +- .../v1/api/metrics/get_all_metrics.py | 18 +- .../v1/api/metrics/get_project_metrics.py | 12 +- .../api/notebooks/create_notebook_instance.py | 14 +- .../api/notebooks/delete_notebook_instance.py | 8 +- .../generate_notebook_instance_url.py | 12 +- .../notebooks/get_notebook_instance_status.py | 12 +- .../api/notebooks/get_notebook_instances.py | 18 +- .../api/notebooks/stop_notebook_instance.py | 8 +- .../api/processes/archive_custom_process.py | 8 +- .../api/processes/calculate_pipeline_cost.py | 14 +- .../v1/api/processes/create_custom_process.py | 20 +- .../v1/api/processes/get_process.py | 12 +- .../api/processes/get_process_parameters.py | 12 +- .../v1/api/processes/get_processes.py | 30 +- .../v1/api/processes/sync_custom_process.py | 12 +- .../v1/api/processes/update_custom_process.py | 10 +- .../processes/validate_file_name_patterns.py | 20 +- .../processes/validate_file_requirements.py | 14 +- .../create_project_request.py | 14 +- .../v1/api/projects/approve_access_request.py | 10 +- .../v1/api/projects/archive_project.py | 8 +- .../v1/api/projects/create_access_request.py | 14 +- .../v1/api/projects/create_project.py | 14 +- .../v1/api/projects/deny_access_request.py | 8 +- .../v1/api/projects/get_access_requests.py | 30 +- .../api/projects/get_discoverable_projects.py | 18 +- .../v1/api/projects/get_project.py | 12 +- .../projects/get_project_create_options.py | 12 +- .../v1/api/projects/get_project_users.py | 18 +- .../v1/api/projects/get_projects.py | 18 +- .../v1/api/projects/redeploy_project.py | 8 +- .../v1/api/projects/set_user_project_role.py | 10 +- .../v1/api/projects/unarchive_project.py | 8 +- .../v1/api/projects/update_project.py | 14 +- .../v1/api/projects/update_project_tags.py | 16 +- .../references/create_project_reference.py | 14 +- .../references/delete_project_reference.py | 8 +- .../v1/api/references/get_reference_types.py | 18 +- .../v1/api/references/get_references.py | 18 +- .../references/get_references_for_project.py | 18 +- .../references/refresh_project_references.py | 8 +- .../v1/api/sharing/create_share.py | 14 +- .../v1/api/sharing/delete_share.py | 8 +- .../v1/api/sharing/get_discoverable_shares.py | 18 +- cirro_api_client/v1/api/sharing/get_share.py | 12 +- .../v1/api/sharing/get_shared_datasets.py | 34 +- cirro_api_client/v1/api/sharing/get_shares.py | 18 +- .../v1/api/sharing/subscribe_share.py | 8 +- .../v1/api/sharing/unsubscribe_share.py | 8 +- .../v1/api/sharing/update_share.py | 10 +- .../v1/api/system/get_service_connections.py | 18 +- cirro_api_client/v1/api/system/info.py | 12 +- cirro_api_client/v1/api/tools/move_dataset.py | 14 +- cirro_api_client/v1/api/users/get_user.py | 12 +- cirro_api_client/v1/api/users/invite_user.py | 14 +- cirro_api_client/v1/api/users/list_users.py | 46 +-- .../v1/api/users/sign_out_user.py | 8 +- cirro_api_client/v1/api/users/update_user.py | 14 +- .../v1/api/workspaces/__init__.py | 0 .../v1/api/workspaces/connect_workspace.py | 176 ++++++++++ .../v1/api/workspaces/create_workspace.py | 186 ++++++++++ .../v1/api/workspaces/delete_workspace.py | 105 ++++++ .../v1/api/workspaces/disconnect_workspace.py | 120 +++++++ .../v1/api/workspaces/get_workspace.py | 176 ++++++++++ .../workspaces/get_workspace_environments.py | 140 ++++++++ .../v1/api/workspaces/get_workspaces.py | 168 +++++++++ .../v1/api/workspaces/start_workspace.py | 105 ++++++ .../v1/api/workspaces/stop_workspace.py | 105 ++++++ .../v1/api/workspaces/update_workspace.py | 122 +++++++ cirro_api_client/v1/client.py | 20 +- cirro_api_client/v1/errors.py | 3 +- cirro_api_client/v1/models/__init__.py | 28 ++ cirro_api_client/v1/models/agent.py | 20 +- cirro_api_client/v1/models/agent_detail.py | 18 +- .../agent_detail_environment_configuration.py | 12 +- .../v1/models/agent_detail_tags.py | 12 +- cirro_api_client/v1/models/agent_input.py | 26 +- ...gent_input_configuration_options_schema.py | 12 +- .../agent_input_environment_configuration.py | 12 +- .../v1/models/agent_input_tags.py | 12 +- .../v1/models/agent_registration.py | 12 +- cirro_api_client/v1/models/agent_tags.py | 12 +- .../v1/models/allowed_data_type.py | 14 +- .../models/approve_project_access_request.py | 12 +- cirro_api_client/v1/models/artifact.py | 12 +- cirro_api_client/v1/models/artifact_type.py | 13 - cirro_api_client/v1/models/audit_event.py | 36 +- .../v1/models/audit_event_changes.py | 12 +- .../v1/models/audit_event_event_detail.py | 12 +- cirro_api_client/v1/models/auth_info.py | 12 +- cirro_api_client/v1/models/aws_credentials.py | 14 +- cirro_api_client/v1/models/billing_account.py | 18 +- .../v1/models/billing_account_request.py | 18 +- .../models/calculate_pipeline_cost_request.py | 12 +- .../v1/models/classification_input.py | 16 +- cirro_api_client/v1/models/cloud_account.py | 18 +- .../v1/models/column_definition.py | 18 +- .../compute_environment_configuration.py | 24 +- ...compute_environment_configuration_input.py | 22 +- ...ironment_configuration_input_properties.py | 12 +- ...te_environment_configuration_properties.py | 12 +- cirro_api_client/v1/models/contact.py | 12 +- cirro_api_client/v1/models/contact_input.py | 12 +- cirro_api_client/v1/models/cost_response.py | 101 ++++++ .../create_notebook_instance_request.py | 28 +- .../models/create_project_access_request.py | 12 +- .../v1/models/create_reference_request.py | 16 +- cirro_api_client/v1/models/create_response.py | 12 +- .../v1/models/custom_pipeline_settings.py | 52 +-- .../v1/models/custom_process_input.py | 68 ++-- cirro_api_client/v1/models/dashboard.py | 66 ++-- .../v1/models/dashboard_dashboard_data.py | 12 +- cirro_api_client/v1/models/dashboard_info.py | 12 +- .../v1/models/dashboard_request.py | 54 ++- .../dashboard_request_dashboard_data.py | 12 +- .../v1/models/dashboard_request_info.py | 12 +- cirro_api_client/v1/models/data_file.py | 12 +- .../v1/models/data_file_metadata.py | 12 +- cirro_api_client/v1/models/dataset.py | 18 +- .../v1/models/dataset_assets_manifest.py | 32 +- .../v1/models/dataset_condition.py | 12 +- cirro_api_client/v1/models/dataset_detail.py | 48 ++- .../v1/models/dataset_detail_info.py | 12 +- .../v1/models/dataset_detail_params.py | 12 +- .../dataset_detail_source_sample_files_map.py | 14 +- cirro_api_client/v1/models/dataset_viz.py | 42 ++- .../v1/models/dataset_viz_config.py | 32 ++ cirro_api_client/v1/models/discussion.py | 12 +- .../v1/models/discussion_input.py | 12 +- cirro_api_client/v1/models/entity.py | 12 +- cirro_api_client/v1/models/entity_type.py | 3 +- cirro_api_client/v1/models/error_message.py | 12 +- cirro_api_client/v1/models/feature_flags.py | 28 +- cirro_api_client/v1/models/file_entry.py | 20 +- .../v1/models/file_entry_metadata.py | 12 +- .../v1/models/file_mapping_rule.py | 20 +- cirro_api_client/v1/models/file_name_match.py | 12 +- .../v1/models/file_name_pattern.py | 20 +- .../v1/models/file_requirements.py | 18 +- cirro_api_client/v1/models/form_schema.py | 20 +- .../v1/models/form_schema_form.py | 12 +- cirro_api_client/v1/models/form_schema_ui.py | 12 +- .../v1/models/fulfillment_response.py | 12 +- .../generate_sftp_credentials_request.py | 14 +- .../v1/models/get_execution_logs_response.py | 14 +- .../get_project_summary_response_200.py | 12 +- .../v1/models/governance_classification.py | 16 +- .../v1/models/governance_contact.py | 12 +- .../v1/models/governance_expiry.py | 35 +- cirro_api_client/v1/models/governance_file.py | 25 +- .../models/governance_file_access_request.py | 36 +- .../v1/models/governance_file_input.py | 12 +- .../v1/models/governance_requirement.py | 62 ++-- ...governance_requirement_project_file_map.py | 12 +- cirro_api_client/v1/models/group_cost.py | 55 +++ .../v1/models/import_data_request.py | 26 +- .../v1/models/invite_user_request.py | 12 +- .../v1/models/invite_user_response.py | 12 +- cirro_api_client/v1/models/log_entry.py | 14 +- cirro_api_client/v1/models/login_provider.py | 12 +- cirro_api_client/v1/models/message.py | 22 +- cirro_api_client/v1/models/message_input.py | 20 +- cirro_api_client/v1/models/metric_record.py | 22 +- .../v1/models/metric_record_services.py | 12 +- cirro_api_client/v1/models/mounted_dataset.py | 55 +++ .../v1/models/move_dataset_input.py | 12 +- .../v1/models/move_dataset_response.py | 16 +- cirro_api_client/v1/models/named_item.py | 12 +- .../v1/models/notebook_instance.py | 20 +- .../notebook_instance_status_response.py | 12 +- .../models/open_notebook_instance_response.py | 12 +- .../paginated_response_dataset_list_dto.py | 14 +- .../models/paginated_response_discussion.py | 14 +- .../v1/models/paginated_response_message.py | 14 +- .../models/paginated_response_sample_dto.py | 14 +- .../v1/models/paginated_response_user_dto.py | 14 +- cirro_api_client/v1/models/pipeline_code.py | 12 +- cirro_api_client/v1/models/pipeline_cost.py | 24 +- .../v1/models/portal_error_response.py | 14 +- cirro_api_client/v1/models/process.py | 54 +-- cirro_api_client/v1/models/process_detail.py | 64 ++-- cirro_api_client/v1/models/project.py | 18 +- .../v1/models/project_access_request.py | 12 +- .../v1/models/project_create_options.py | 14 +- cirro_api_client/v1/models/project_detail.py | 51 ++- .../v1/models/project_file_access_request.py | 28 +- cirro_api_client/v1/models/project_input.py | 34 +- cirro_api_client/v1/models/project_metrics.py | 49 +-- cirro_api_client/v1/models/project_request.py | 16 +- .../v1/models/project_requirement.py | 122 ++++--- .../v1/models/project_settings.py | 332 +++++++++++------- cirro_api_client/v1/models/project_user.py | 20 +- cirro_api_client/v1/models/reference.py | 14 +- cirro_api_client/v1/models/reference_type.py | 14 +- .../models/reference_type_validation_item.py | 12 +- .../models/requirement_fulfillment_input.py | 28 +- .../v1/models/requirement_input.py | 66 ++-- cirro_api_client/v1/models/resources_info.py | 12 +- .../v1/models/run_analysis_request.py | 56 +-- .../v1/models/run_analysis_request_params.py | 12 +- ...nalysis_request_source_sample_files_map.py | 14 +- cirro_api_client/v1/models/sample.py | 48 +-- cirro_api_client/v1/models/sample_metadata.py | 12 +- cirro_api_client/v1/models/sample_request.py | 12 +- .../v1/models/sample_request_metadata.py | 12 +- cirro_api_client/v1/models/sample_sheets.py | 16 +- .../v1/models/service_connection.py | 12 +- .../models/set_user_project_role_request.py | 14 +- .../v1/models/sftp_credentials.py | 12 +- cirro_api_client/v1/models/share.py | 22 +- cirro_api_client/v1/models/share_detail.py | 32 +- cirro_api_client/v1/models/share_input.py | 34 +- cirro_api_client/v1/models/share_type.py | 3 - cirro_api_client/v1/models/sharing_type.py | 15 + .../v1/models/stop_execution_response.py | 24 +- .../v1/models/system_info_response.py | 12 +- cirro_api_client/v1/models/table.py | 31 +- cirro_api_client/v1/models/tag.py | 22 +- cirro_api_client/v1/models/task.py | 32 +- cirro_api_client/v1/models/task_cost.py | 70 ++++ cirro_api_client/v1/models/tenant_info.py | 14 +- .../v1/models/update_dataset_request.py | 14 +- .../v1/models/update_user_request.py | 28 +- .../models/upload_dataset_create_response.py | 12 +- .../v1/models/upload_dataset_request.py | 26 +- cirro_api_client/v1/models/user.py | 20 +- cirro_api_client/v1/models/user_detail.py | 34 +- .../v1/models/user_project_assignment.py | 20 +- cirro_api_client/v1/models/user_settings.py | 12 +- .../validate_file_name_patterns_request.py | 20 +- .../validate_file_requirements_request.py | 16 +- .../v1/models/version_specification.py | 62 ++++ cirro_api_client/v1/models/workspace.py | 206 +++++++++++ .../v1/models/workspace_compute_config.py | 134 +++++++ ...ute_config_environment_variables_type_0.py | 37 ++ .../models/workspace_connection_response.py | 64 ++++ .../v1/models/workspace_environment.py | 111 ++++++ cirro_api_client/v1/models/workspace_input.py | 119 +++++++ .../v1/models/workspace_session.py | 64 ++++ cirro_api_client/v1/types.py | 10 +- 313 files changed, 5606 insertions(+), 2675 deletions(-) create mode 100644 cirro_api_client/v1/api/execution/calculate_cost.py create mode 100644 cirro_api_client/v1/api/workspaces/__init__.py create mode 100644 cirro_api_client/v1/api/workspaces/connect_workspace.py create mode 100644 cirro_api_client/v1/api/workspaces/create_workspace.py create mode 100644 cirro_api_client/v1/api/workspaces/delete_workspace.py create mode 100644 cirro_api_client/v1/api/workspaces/disconnect_workspace.py create mode 100644 cirro_api_client/v1/api/workspaces/get_workspace.py create mode 100644 cirro_api_client/v1/api/workspaces/get_workspace_environments.py create mode 100644 cirro_api_client/v1/api/workspaces/get_workspaces.py create mode 100644 cirro_api_client/v1/api/workspaces/start_workspace.py create mode 100644 cirro_api_client/v1/api/workspaces/stop_workspace.py create mode 100644 cirro_api_client/v1/api/workspaces/update_workspace.py create mode 100644 cirro_api_client/v1/models/cost_response.py create mode 100644 cirro_api_client/v1/models/dataset_viz_config.py create mode 100644 cirro_api_client/v1/models/group_cost.py create mode 100644 cirro_api_client/v1/models/mounted_dataset.py create mode 100644 cirro_api_client/v1/models/sharing_type.py create mode 100644 cirro_api_client/v1/models/task_cost.py create mode 100644 cirro_api_client/v1/models/version_specification.py create mode 100644 cirro_api_client/v1/models/workspace.py create mode 100644 cirro_api_client/v1/models/workspace_compute_config.py create mode 100644 cirro_api_client/v1/models/workspace_compute_config_environment_variables_type_0.py create mode 100644 cirro_api_client/v1/models/workspace_connection_response.py create mode 100644 cirro_api_client/v1/models/workspace_environment.py create mode 100644 cirro_api_client/v1/models/workspace_input.py create mode 100644 cirro_api_client/v1/models/workspace_session.py diff --git a/cirro_api_client/v1/api/audit/get_event.py b/cirro_api_client/v1/api/audit/get_event.py index 4e633b9..91b58ee 100644 --- a/cirro_api_client/v1/api/audit/get_event.py +++ b/cirro_api_client/v1/api/audit/get_event.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( audit_event_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/audit-events/{audit_event_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[AuditEvent]: +def _parse_response(*, client: Client, response: httpx.Response) -> AuditEvent | None: if response.status_code == HTTPStatus.OK: response_200 = AuditEvent.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( audit_event_id: str, *, client: Client, -) -> Optional[AuditEvent]: +) -> AuditEvent | None: """Get audit event Get audit event detailed information @@ -135,7 +135,7 @@ async def asyncio( audit_event_id: str, *, client: Client, -) -> Optional[AuditEvent]: +) -> AuditEvent | None: """Get audit event Get audit event detailed information diff --git a/cirro_api_client/v1/api/audit/list_events.py b/cirro_api_client/v1/api/audit/list_events.py index db53e7a..d98976b 100644 --- a/cirro_api_client/v1/api/audit/list_events.py +++ b/cirro_api_client/v1/api/audit/list_events.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any import httpx @@ -12,15 +12,15 @@ def _get_kwargs( *, - username: Union[Unset, str] = UNSET, - entity_type: Union[Unset, ListEventsEntityType] = UNSET, - entity_id: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + username: Unset | str = UNSET, + entity_type: Unset | ListEventsEntityType = UNSET, + entity_id: Unset | str = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["username"] = username - json_entity_type: Union[Unset, str] = UNSET + json_entity_type: Unset | str = UNSET if not isinstance(entity_type, Unset): json_entity_type = entity_type.value @@ -30,7 +30,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/audit-events", "params": params, @@ -39,7 +39,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["AuditEvent"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["AuditEvent"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -53,7 +53,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["AuditEvent"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["AuditEvent"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,10 +65,10 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, - username: Union[Unset, str] = UNSET, - entity_type: Union[Unset, ListEventsEntityType] = UNSET, - entity_id: Union[Unset, str] = UNSET, -) -> Response[List["AuditEvent"]]: + username: Unset | str = UNSET, + entity_type: Unset | ListEventsEntityType = UNSET, + entity_id: Unset | str = UNSET, +) -> Response[list["AuditEvent"]]: """List audit events Gets a list of audit events @@ -104,10 +104,10 @@ def sync_detailed( def sync( *, client: Client, - username: Union[Unset, str] = UNSET, - entity_type: Union[Unset, ListEventsEntityType] = UNSET, - entity_id: Union[Unset, str] = UNSET, -) -> Optional[List["AuditEvent"]]: + username: Unset | str = UNSET, + entity_type: Unset | ListEventsEntityType = UNSET, + entity_id: Unset | str = UNSET, +) -> list["AuditEvent"] | None: """List audit events Gets a list of audit events @@ -140,10 +140,10 @@ def sync( async def asyncio_detailed( *, client: Client, - username: Union[Unset, str] = UNSET, - entity_type: Union[Unset, ListEventsEntityType] = UNSET, - entity_id: Union[Unset, str] = UNSET, -) -> Response[List["AuditEvent"]]: + username: Unset | str = UNSET, + entity_type: Unset | ListEventsEntityType = UNSET, + entity_id: Unset | str = UNSET, +) -> Response[list["AuditEvent"]]: """List audit events Gets a list of audit events @@ -176,10 +176,10 @@ async def asyncio_detailed( async def asyncio( *, client: Client, - username: Union[Unset, str] = UNSET, - entity_type: Union[Unset, ListEventsEntityType] = UNSET, - entity_id: Union[Unset, str] = UNSET, -) -> Optional[List["AuditEvent"]]: + username: Unset | str = UNSET, + entity_type: Unset | ListEventsEntityType = UNSET, + entity_id: Unset | str = UNSET, +) -> list["AuditEvent"] | None: """List audit events Gets a list of audit events diff --git a/cirro_api_client/v1/api/billing/create_billing_account.py b/cirro_api_client/v1/api/billing/create_billing_account.py index a9f0d2d..c708e57 100644 --- a/cirro_api_client/v1/api/billing/create_billing_account.py +++ b/cirro_api_client/v1/api/billing/create_billing_account.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: BillingAccountRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/billing", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: BillingAccountRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create billing account Creates a billing account @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: BillingAccountRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create billing account Creates a billing account diff --git a/cirro_api_client/v1/api/billing/delete_billing_account.py b/cirro_api_client/v1/api/billing/delete_billing_account.py index d8528ca..0776757 100644 --- a/cirro_api_client/v1/api/billing/delete_billing_account.py +++ b/cirro_api_client/v1/api/billing/delete_billing_account.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -10,8 +10,8 @@ def _get_kwargs( billing_account_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/billing/{billing_account_id}", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/billing/get_billing_accounts.py b/cirro_api_client/v1/api/billing/get_billing_accounts.py index 017f074..deb4614 100644 --- a/cirro_api_client/v1/api/billing/get_billing_accounts.py +++ b/cirro_api_client/v1/api/billing/get_billing_accounts.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any import httpx @@ -11,15 +11,15 @@ def _get_kwargs( *, - include_archived: Union[Unset, bool] = False, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + include_archived: Unset | bool = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["includeArchived"] = include_archived params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/billing", "params": params, @@ -28,7 +28,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["BillingAccount"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["BillingAccount"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -42,7 +42,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["BillingAccount"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["BillingAccount"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -54,8 +54,8 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Response[List["BillingAccount"]]: + include_archived: Unset | bool = False, +) -> Response[list["BillingAccount"]]: """List billing accounts Gets a list of billing accounts the current user has access to @@ -87,8 +87,8 @@ def sync_detailed( def sync( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Optional[List["BillingAccount"]]: + include_archived: Unset | bool = False, +) -> list["BillingAccount"] | None: """List billing accounts Gets a list of billing accounts the current user has access to @@ -117,8 +117,8 @@ def sync( async def asyncio_detailed( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Response[List["BillingAccount"]]: + include_archived: Unset | bool = False, +) -> Response[list["BillingAccount"]]: """List billing accounts Gets a list of billing accounts the current user has access to @@ -147,8 +147,8 @@ async def asyncio_detailed( async def asyncio( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Optional[List["BillingAccount"]]: + include_archived: Unset | bool = False, +) -> list["BillingAccount"] | None: """List billing accounts Gets a list of billing accounts the current user has access to diff --git a/cirro_api_client/v1/api/billing/update_billing_account.py b/cirro_api_client/v1/api/billing/update_billing_account.py index 34a840b..140894a 100644 --- a/cirro_api_client/v1/api/billing/update_billing_account.py +++ b/cirro_api_client/v1/api/billing/update_billing_account.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( billing_account_id: str, *, body: BillingAccountRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/billing/{billing_account_id}", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/compute_environment/create_agent.py b/cirro_api_client/v1/api/compute_environment/create_agent.py index d5e2bb4..d7e350a 100644 --- a/cirro_api_client/v1/api/compute_environment/create_agent.py +++ b/cirro_api_client/v1/api/compute_environment/create_agent.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: AgentInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/agents", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: AgentInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create agent Create a new agent @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: AgentInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create agent Create a new agent diff --git a/cirro_api_client/v1/api/compute_environment/create_compute_environment.py b/cirro_api_client/v1/api/compute_environment/create_compute_environment.py index b9f4451..b7e86bf 100644 --- a/cirro_api_client/v1/api/compute_environment/create_compute_environment.py +++ b/cirro_api_client/v1/api/compute_environment/create_compute_environment.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: ComputeEnvironmentConfigurationInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/compute-environments", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ComputeEnvironmentConfigurationInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create compute environment Create a new compute environment for a project @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ComputeEnvironmentConfigurationInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create compute environment Create a new compute environment for a project diff --git a/cirro_api_client/v1/api/compute_environment/delete_agent.py b/cirro_api_client/v1/api/compute_environment/delete_agent.py index 585ccdb..f76371a 100644 --- a/cirro_api_client/v1/api/compute_environment/delete_agent.py +++ b/cirro_api_client/v1/api/compute_environment/delete_agent.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -10,8 +10,8 @@ def _get_kwargs( agent_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/agents/{agent_id}", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/compute_environment/delete_compute_environment.py b/cirro_api_client/v1/api/compute_environment/delete_compute_environment.py index 5b61b09..e615650 100644 --- a/cirro_api_client/v1/api/compute_environment/delete_compute_environment.py +++ b/cirro_api_client/v1/api/compute_environment/delete_compute_environment.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, compute_environment_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/projects/{project_id}/compute-environments/{compute_environment_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/compute_environment/get_agents.py b/cirro_api_client/v1/api/compute_environment/get_agents.py index 5aedf87..c5ab6f4 100644 --- a/cirro_api_client/v1/api/compute_environment/get_agents.py +++ b/cirro_api_client/v1/api/compute_environment/get_agents.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/agents", } @@ -18,7 +18,7 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["AgentDetail"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["AgentDetail"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["AgentDetail"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["AgentDetail"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["AgentDetail"]]: +) -> Response[list["AgentDetail"]]: """Get agents Get a list of agents @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["AgentDetail"]]: +) -> list["AgentDetail"] | None: """Get agents Get a list of agents @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["AgentDetail"]]: +) -> Response[list["AgentDetail"]]: """Get agents Get a list of agents @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["AgentDetail"]]: +) -> list["AgentDetail"] | None: """Get agents Get a list of agents diff --git a/cirro_api_client/v1/api/compute_environment/get_compute_environments.py b/cirro_api_client/v1/api/compute_environment/get_compute_environments.py index 4d33476..699aae3 100644 --- a/cirro_api_client/v1/api/compute_environment/get_compute_environments.py +++ b/cirro_api_client/v1/api/compute_environment/get_compute_environments.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/compute-environments", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ComputeEnvironmentConfiguration"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["ComputeEnvironmentConfiguration"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -34,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ComputeEnvironmentConfiguration"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["ComputeEnvironmentConfiguration"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +47,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[List["ComputeEnvironmentConfiguration"]]: +) -> Response[list["ComputeEnvironmentConfiguration"]]: """Get compute environments Get a list of compute environments for a project @@ -80,7 +80,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[List["ComputeEnvironmentConfiguration"]]: +) -> list["ComputeEnvironmentConfiguration"] | None: """Get compute environments Get a list of compute environments for a project @@ -110,7 +110,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[List["ComputeEnvironmentConfiguration"]]: +) -> Response[list["ComputeEnvironmentConfiguration"]]: """Get compute environments Get a list of compute environments for a project @@ -140,7 +140,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[List["ComputeEnvironmentConfiguration"]]: +) -> list["ComputeEnvironmentConfiguration"] | None: """Get compute environments Get a list of compute environments for a project diff --git a/cirro_api_client/v1/api/compute_environment/update_agent.py b/cirro_api_client/v1/api/compute_environment/update_agent.py index d62743c..17deae5 100644 --- a/cirro_api_client/v1/api/compute_environment/update_agent.py +++ b/cirro_api_client/v1/api/compute_environment/update_agent.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( agent_id: str, *, body: AgentInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/agents/{agent_id}", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/compute_environment/update_compute_environment.py b/cirro_api_client/v1/api/compute_environment/update_compute_environment.py index bf3210d..6945c0f 100644 --- a/cirro_api_client/v1/api/compute_environment/update_compute_environment.py +++ b/cirro_api_client/v1/api/compute_environment/update_compute_environment.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( compute_environment_id: str, *, body: ComputeEnvironmentConfigurationInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/compute-environments/{compute_environment_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/dashboards/create_dashboard.py b/cirro_api_client/v1/api/dashboards/create_dashboard.py index ac8cf16..44df1dd 100644 --- a/cirro_api_client/v1/api/dashboards/create_dashboard.py +++ b/cirro_api_client/v1/api/dashboards/create_dashboard.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: DashboardRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/dashboards", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: DashboardRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create dashboard Creates a dashboard @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: DashboardRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create dashboard Creates a dashboard diff --git a/cirro_api_client/v1/api/dashboards/delete_dashboard.py b/cirro_api_client/v1/api/dashboards/delete_dashboard.py index d3bd31a..c4ed80d 100644 --- a/cirro_api_client/v1/api/dashboards/delete_dashboard.py +++ b/cirro_api_client/v1/api/dashboards/delete_dashboard.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, dashboard_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/projects/{project_id}/dashboards/{dashboard_id}", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Dashboard]: +def _parse_response(*, client: Client, response: httpx.Response) -> Dashboard | None: if response.status_code == HTTPStatus.NO_CONTENT: response_204 = Dashboard.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( dashboard_id: str, *, client: Client, -) -> Optional[Dashboard]: +) -> Dashboard | None: """Delete dashboard Deletes a dashboard @@ -146,7 +146,7 @@ async def asyncio( dashboard_id: str, *, client: Client, -) -> Optional[Dashboard]: +) -> Dashboard | None: """Delete dashboard Deletes a dashboard diff --git a/cirro_api_client/v1/api/dashboards/get_dashboard.py b/cirro_api_client/v1/api/dashboards/get_dashboard.py index 5a8a586..aadedf0 100644 --- a/cirro_api_client/v1/api/dashboards/get_dashboard.py +++ b/cirro_api_client/v1/api/dashboards/get_dashboard.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, dashboard_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/dashboards/{dashboard_id}", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Dashboard]: +def _parse_response(*, client: Client, response: httpx.Response) -> Dashboard | None: if response.status_code == HTTPStatus.OK: response_200 = Dashboard.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( dashboard_id: str, *, client: Client, -) -> Optional[Dashboard]: +) -> Dashboard | None: """Get dashboard Retrieves a dashboard @@ -146,7 +146,7 @@ async def asyncio( dashboard_id: str, *, client: Client, -) -> Optional[Dashboard]: +) -> Dashboard | None: """Get dashboard Retrieves a dashboard diff --git a/cirro_api_client/v1/api/dashboards/get_dashboards.py b/cirro_api_client/v1/api/dashboards/get_dashboards.py index c01b7a5..cb76e59 100644 --- a/cirro_api_client/v1/api/dashboards/get_dashboards.py +++ b/cirro_api_client/v1/api/dashboards/get_dashboards.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/dashboards", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Dashboard"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["Dashboard"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -34,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Dashboard"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Dashboard"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +47,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[List["Dashboard"]]: +) -> Response[list["Dashboard"]]: """List dashboards Retrieves a list of dashboards for a given project @@ -80,7 +80,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[List["Dashboard"]]: +) -> list["Dashboard"] | None: """List dashboards Retrieves a list of dashboards for a given project @@ -110,7 +110,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[List["Dashboard"]]: +) -> Response[list["Dashboard"]]: """List dashboards Retrieves a list of dashboards for a given project @@ -140,7 +140,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[List["Dashboard"]]: +) -> list["Dashboard"] | None: """List dashboards Retrieves a list of dashboards for a given project diff --git a/cirro_api_client/v1/api/dashboards/update_dashboard.py b/cirro_api_client/v1/api/dashboards/update_dashboard.py index 08980c9..d39c118 100644 --- a/cirro_api_client/v1/api/dashboards/update_dashboard.py +++ b/cirro_api_client/v1/api/dashboards/update_dashboard.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -15,10 +15,10 @@ def _get_kwargs( dashboard_id: str, *, body: DashboardRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/dashboards/{dashboard_id}", } @@ -32,7 +32,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Dashboard]: +def _parse_response(*, client: Client, response: httpx.Response) -> Dashboard | None: if response.status_code == HTTPStatus.OK: response_200 = Dashboard.from_dict(response.json()) @@ -95,7 +95,7 @@ def sync( *, client: Client, body: DashboardRequest, -) -> Optional[Dashboard]: +) -> Dashboard | None: """Update dashboard Updates a dashboard @@ -167,7 +167,7 @@ async def asyncio( *, client: Client, body: DashboardRequest, -) -> Optional[Dashboard]: +) -> Dashboard | None: """Update dashboard Updates a dashboard diff --git a/cirro_api_client/v1/api/datasets/delete_dataset.py b/cirro_api_client/v1/api/datasets/delete_dataset.py index 3e2db39..96ec8fd 100644 --- a/cirro_api_client/v1/api/datasets/delete_dataset.py +++ b/cirro_api_client/v1/api/datasets/delete_dataset.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/projects/{project_id}/datasets/{dataset_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/datasets/get_dataset.py b/cirro_api_client/v1/api/datasets/get_dataset.py index 8b23540..c516db9 100644 --- a/cirro_api_client/v1/api/datasets/get_dataset.py +++ b/cirro_api_client/v1/api/datasets/get_dataset.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/datasets/{dataset_id}", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[DatasetDetail]: +def _parse_response(*, client: Client, response: httpx.Response) -> DatasetDetail | None: if response.status_code == HTTPStatus.OK: response_200 = DatasetDetail.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( dataset_id: str, *, client: Client, -) -> Optional[DatasetDetail]: +) -> DatasetDetail | None: """Get dataset Gets detailed information about a dataset @@ -146,7 +146,7 @@ async def asyncio( dataset_id: str, *, client: Client, -) -> Optional[DatasetDetail]: +) -> DatasetDetail | None: """Get dataset Gets detailed information about a dataset diff --git a/cirro_api_client/v1/api/datasets/get_dataset_manifest.py b/cirro_api_client/v1/api/datasets/get_dataset_manifest.py index 9594286..1176b40 100644 --- a/cirro_api_client/v1/api/datasets/get_dataset_manifest.py +++ b/cirro_api_client/v1/api/datasets/get_dataset_manifest.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( project_id: str, dataset_id: str, *, - file_offset: Union[Unset, int] = 0, - file_limit: Union[Unset, int] = 20000, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + file_offset: Unset | int = 0, + file_limit: Unset | int = 20000, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["fileOffset"] = file_offset @@ -24,7 +24,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/datasets/{dataset_id}/files", "params": params, @@ -33,7 +33,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[DatasetAssetsManifest]: +def _parse_response(*, client: Client, response: httpx.Response) -> DatasetAssetsManifest | None: if response.status_code == HTTPStatus.OK: response_200 = DatasetAssetsManifest.from_dict(response.json()) @@ -56,8 +56,8 @@ def sync_detailed( dataset_id: str, *, client: Client, - file_offset: Union[Unset, int] = 0, - file_limit: Union[Unset, int] = 20000, + file_offset: Unset | int = 0, + file_limit: Unset | int = 20000, ) -> Response[DatasetAssetsManifest]: """Get dataset manifest @@ -98,9 +98,9 @@ def sync( dataset_id: str, *, client: Client, - file_offset: Union[Unset, int] = 0, - file_limit: Union[Unset, int] = 20000, -) -> Optional[DatasetAssetsManifest]: + file_offset: Unset | int = 0, + file_limit: Unset | int = 20000, +) -> DatasetAssetsManifest | None: """Get dataset manifest Gets a listing of files, charts, and other assets available for the dataset @@ -137,8 +137,8 @@ async def asyncio_detailed( dataset_id: str, *, client: Client, - file_offset: Union[Unset, int] = 0, - file_limit: Union[Unset, int] = 20000, + file_offset: Unset | int = 0, + file_limit: Unset | int = 20000, ) -> Response[DatasetAssetsManifest]: """Get dataset manifest @@ -176,9 +176,9 @@ async def asyncio( dataset_id: str, *, client: Client, - file_offset: Union[Unset, int] = 0, - file_limit: Union[Unset, int] = 20000, -) -> Optional[DatasetAssetsManifest]: + file_offset: Unset | int = 0, + file_limit: Unset | int = 20000, +) -> DatasetAssetsManifest | None: """Get dataset manifest Gets a listing of files, charts, and other assets available for the dataset diff --git a/cirro_api_client/v1/api/datasets/get_datasets.py b/cirro_api_client/v1/api/datasets/get_datasets.py index ebd90a5..14c413e 100644 --- a/cirro_api_client/v1/api/datasets/get_datasets.py +++ b/cirro_api_client/v1/api/datasets/get_datasets.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any import httpx @@ -12,10 +12,10 @@ def _get_kwargs( project_id: str, *, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["limit"] = limit @@ -23,7 +23,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/datasets", "params": params, @@ -32,7 +32,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseDatasetListDto]: +def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseDatasetListDto | None: if response.status_code == HTTPStatus.OK: response_200 = PaginatedResponseDatasetListDto.from_dict(response.json()) @@ -54,8 +54,8 @@ def sync_detailed( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, ) -> Response[PaginatedResponseDatasetListDto]: """List datasets @@ -93,9 +93,9 @@ def sync( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseDatasetListDto]: + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, +) -> PaginatedResponseDatasetListDto | None: """List datasets Retrieves a list of datasets for a given project @@ -129,8 +129,8 @@ async def asyncio_detailed( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, ) -> Response[PaginatedResponseDatasetListDto]: """List datasets @@ -165,9 +165,9 @@ async def asyncio( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseDatasetListDto]: + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, +) -> PaginatedResponseDatasetListDto | None: """List datasets Retrieves a list of datasets for a given project diff --git a/cirro_api_client/v1/api/datasets/get_sample_sheets.py b/cirro_api_client/v1/api/datasets/get_sample_sheets.py index db26635..e230560 100644 --- a/cirro_api_client/v1/api/datasets/get_sample_sheets.py +++ b/cirro_api_client/v1/api/datasets/get_sample_sheets.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/datasets/{dataset_id}/samplesheet", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[SampleSheets]: +def _parse_response(*, client: Client, response: httpx.Response) -> SampleSheets | None: if response.status_code == HTTPStatus.OK: response_200 = SampleSheets.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( dataset_id: str, *, client: Client, -) -> Optional[SampleSheets]: +) -> SampleSheets | None: """Generate sample sheets Generates the sample sheet output for this dataset, useful for debugging the preprocess script. @@ -146,7 +146,7 @@ async def asyncio( dataset_id: str, *, client: Client, -) -> Optional[SampleSheets]: +) -> SampleSheets | None: """Generate sample sheets Generates the sample sheet output for this dataset, useful for debugging the preprocess script. diff --git a/cirro_api_client/v1/api/datasets/import_public_dataset.py b/cirro_api_client/v1/api/datasets/import_public_dataset.py index 0807c70..87e2051 100644 --- a/cirro_api_client/v1/api/datasets/import_public_dataset.py +++ b/cirro_api_client/v1/api/datasets/import_public_dataset.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: ImportDataRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/datasets/import", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ImportDataRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Import public dataset Download data from public repositories @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ImportDataRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Import public dataset Download data from public repositories diff --git a/cirro_api_client/v1/api/datasets/ingest_samples.py b/cirro_api_client/v1/api/datasets/ingest_samples.py index 69ccb84..c100931 100644 --- a/cirro_api_client/v1/api/datasets/ingest_samples.py +++ b/cirro_api_client/v1/api/datasets/ingest_samples.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/datasets/{dataset_id}/ingest-samples", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/datasets/regenerate_manifest.py b/cirro_api_client/v1/api/datasets/regenerate_manifest.py index 04ef172..ff4980e 100644 --- a/cirro_api_client/v1/api/datasets/regenerate_manifest.py +++ b/cirro_api_client/v1/api/datasets/regenerate_manifest.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/datasets/{dataset_id}/regenerate-manifest", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/datasets/rerun_transform.py b/cirro_api_client/v1/api/datasets/rerun_transform.py index a86bbec..db88d8d 100644 --- a/cirro_api_client/v1/api/datasets/rerun_transform.py +++ b/cirro_api_client/v1/api/datasets/rerun_transform.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/datasets/{dataset_id}/rerun-transform", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/datasets/update_dataset.py b/cirro_api_client/v1/api/datasets/update_dataset.py index 7417218..7aa2ccd 100644 --- a/cirro_api_client/v1/api/datasets/update_dataset.py +++ b/cirro_api_client/v1/api/datasets/update_dataset.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -15,10 +15,10 @@ def _get_kwargs( dataset_id: str, *, body: UpdateDatasetRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/datasets/{dataset_id}", } @@ -32,7 +32,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[DatasetDetail]: +def _parse_response(*, client: Client, response: httpx.Response) -> DatasetDetail | None: if response.status_code == HTTPStatus.OK: response_200 = DatasetDetail.from_dict(response.json()) @@ -95,7 +95,7 @@ def sync( *, client: Client, body: UpdateDatasetRequest, -) -> Optional[DatasetDetail]: +) -> DatasetDetail | None: """Update dataset Update info on a dataset @@ -167,7 +167,7 @@ async def asyncio( *, client: Client, body: UpdateDatasetRequest, -) -> Optional[DatasetDetail]: +) -> DatasetDetail | None: """Update dataset Update info on a dataset diff --git a/cirro_api_client/v1/api/datasets/upload_dataset.py b/cirro_api_client/v1/api/datasets/upload_dataset.py index c25e884..eda663c 100644 --- a/cirro_api_client/v1/api/datasets/upload_dataset.py +++ b/cirro_api_client/v1/api/datasets/upload_dataset.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: UploadDatasetRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/datasets/upload", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[UploadDatasetCreateResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> UploadDatasetCreateResponse | None: if response.status_code == HTTPStatus.CREATED: response_201 = UploadDatasetCreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: UploadDatasetRequest, -) -> Optional[UploadDatasetCreateResponse]: +) -> UploadDatasetCreateResponse | None: """Upload private dataset Registers a dataset in the system that you upload files into @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: UploadDatasetRequest, -) -> Optional[UploadDatasetCreateResponse]: +) -> UploadDatasetCreateResponse | None: """Upload private dataset Registers a dataset in the system that you upload files into diff --git a/cirro_api_client/v1/api/execution/calculate_cost.py b/cirro_api_client/v1/api/execution/calculate_cost.py new file mode 100644 index 0000000..e50274d --- /dev/null +++ b/cirro_api_client/v1/api/execution/calculate_cost.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import Client +from ...models.cost_response import CostResponse +from ...types import Response + + +def _get_kwargs( + project_id: str, + dataset_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/projects/{project_id}/execution/{dataset_id}/cost", + } + + return _kwargs + + +def _parse_response(*, client: Client, response: httpx.Response) -> CostResponse | None: + if response.status_code == HTTPStatus.OK: + response_200 = CostResponse.from_dict(response.json()) + + return response_200 + + errors.handle_error_response(response, client.raise_on_unexpected_status) + + +def _build_response(*, client: Client, response: httpx.Response) -> Response[CostResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + dataset_id: str, + *, + client: Client, +) -> Response[CostResponse]: + """Calculate cost + + Calculate cost of an execution run + + Args: + project_id (str): + dataset_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CostResponse] + """ + + kwargs = _get_kwargs( + project_id=project_id, + dataset_id=dataset_id, + ) + + response = client.get_httpx_client().request( + auth=client.get_auth(), + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + dataset_id: str, + *, + client: Client, +) -> CostResponse | None: + """Calculate cost + + Calculate cost of an execution run + + Args: + project_id (str): + dataset_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CostResponse + """ + + try: + return sync_detailed( + project_id=project_id, + dataset_id=dataset_id, + client=client, + ).parsed + except errors.NotFoundException: + return None + + +async def asyncio_detailed( + project_id: str, + dataset_id: str, + *, + client: Client, +) -> Response[CostResponse]: + """Calculate cost + + Calculate cost of an execution run + + Args: + project_id (str): + dataset_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CostResponse] + """ + + kwargs = _get_kwargs( + project_id=project_id, + dataset_id=dataset_id, + ) + + response = await client.get_async_httpx_client().request(auth=client.get_auth(), **kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + dataset_id: str, + *, + client: Client, +) -> CostResponse | None: + """Calculate cost + + Calculate cost of an execution run + + Args: + project_id (str): + dataset_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CostResponse + """ + + try: + return ( + await asyncio_detailed( + project_id=project_id, + dataset_id=dataset_id, + client=client, + ) + ).parsed + except errors.NotFoundException: + return None diff --git a/cirro_api_client/v1/api/execution/get_execution_logs.py b/cirro_api_client/v1/api/execution/get_execution_logs.py index c282af8..40087f0 100644 --- a/cirro_api_client/v1/api/execution/get_execution_logs.py +++ b/cirro_api_client/v1/api/execution/get_execution_logs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any import httpx @@ -13,15 +13,15 @@ def _get_kwargs( project_id: str, dataset_id: str, *, - force_live: Union[Unset, bool] = False, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + force_live: Unset | bool = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["forceLive"] = force_live params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/execution/{dataset_id}/logs", "params": params, @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GetExecutionLogsResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> GetExecutionLogsResponse | None: if response.status_code == HTTPStatus.OK: response_200 = GetExecutionLogsResponse.from_dict(response.json()) @@ -53,7 +53,7 @@ def sync_detailed( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, + force_live: Unset | bool = False, ) -> Response[GetExecutionLogsResponse]: """Get execution logs @@ -92,8 +92,8 @@ def sync( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Optional[GetExecutionLogsResponse]: + force_live: Unset | bool = False, +) -> GetExecutionLogsResponse | None: """Get execution logs Gets live logs from main execution task @@ -128,7 +128,7 @@ async def asyncio_detailed( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, + force_live: Unset | bool = False, ) -> Response[GetExecutionLogsResponse]: """Get execution logs @@ -164,8 +164,8 @@ async def asyncio( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Optional[GetExecutionLogsResponse]: + force_live: Unset | bool = False, +) -> GetExecutionLogsResponse | None: """Get execution logs Gets live logs from main execution task diff --git a/cirro_api_client/v1/api/execution/get_project_summary.py b/cirro_api_client/v1/api/execution/get_project_summary.py index 10af0aa..df47aff 100644 --- a/cirro_api_client/v1/api/execution/get_project_summary.py +++ b/cirro_api_client/v1/api/execution/get_project_summary.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any import httpx @@ -12,15 +12,15 @@ def _get_kwargs( project_id: str, *, - number_of_days: Union[Unset, int] = 1, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + number_of_days: Unset | int = 1, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["numberOfDays"] = number_of_days params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/execution", "params": params, @@ -29,7 +29,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GetProjectSummaryResponse200]: +def _parse_response(*, client: Client, response: httpx.Response) -> GetProjectSummaryResponse200 | None: if response.status_code == HTTPStatus.OK: response_200 = GetProjectSummaryResponse200.from_dict(response.json()) @@ -51,7 +51,7 @@ def sync_detailed( project_id: str, *, client: Client, - number_of_days: Union[Unset, int] = 1, + number_of_days: Unset | int = 1, ) -> Response[GetProjectSummaryResponse200]: """Get execution summary @@ -87,8 +87,8 @@ def sync( project_id: str, *, client: Client, - number_of_days: Union[Unset, int] = 1, -) -> Optional[GetProjectSummaryResponse200]: + number_of_days: Unset | int = 1, +) -> GetProjectSummaryResponse200 | None: """Get execution summary Gets an overview of the executions currently running in the project @@ -120,7 +120,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, - number_of_days: Union[Unset, int] = 1, + number_of_days: Unset | int = 1, ) -> Response[GetProjectSummaryResponse200]: """Get execution summary @@ -153,8 +153,8 @@ async def asyncio( project_id: str, *, client: Client, - number_of_days: Union[Unset, int] = 1, -) -> Optional[GetProjectSummaryResponse200]: + number_of_days: Unset | int = 1, +) -> GetProjectSummaryResponse200 | None: """Get execution summary Gets an overview of the executions currently running in the project diff --git a/cirro_api_client/v1/api/execution/get_task_logs.py b/cirro_api_client/v1/api/execution/get_task_logs.py index 802352f..40693d5 100644 --- a/cirro_api_client/v1/api/execution/get_task_logs.py +++ b/cirro_api_client/v1/api/execution/get_task_logs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any import httpx @@ -14,15 +14,15 @@ def _get_kwargs( dataset_id: str, task_id: str, *, - force_live: Union[Unset, bool] = False, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + force_live: Unset | bool = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["forceLive"] = force_live params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/execution/{dataset_id}/tasks/{task_id}/logs", "params": params, @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GetExecutionLogsResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> GetExecutionLogsResponse | None: if response.status_code == HTTPStatus.OK: response_200 = GetExecutionLogsResponse.from_dict(response.json()) @@ -55,7 +55,7 @@ def sync_detailed( task_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, + force_live: Unset | bool = False, ) -> Response[GetExecutionLogsResponse]: """Get task logs @@ -97,8 +97,8 @@ def sync( task_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Optional[GetExecutionLogsResponse]: + force_live: Unset | bool = False, +) -> GetExecutionLogsResponse | None: """Get task logs Gets the log output from an individual task @@ -136,7 +136,7 @@ async def asyncio_detailed( task_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, + force_live: Unset | bool = False, ) -> Response[GetExecutionLogsResponse]: """Get task logs @@ -175,8 +175,8 @@ async def asyncio( task_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Optional[GetExecutionLogsResponse]: + force_live: Unset | bool = False, +) -> GetExecutionLogsResponse | None: """Get task logs Gets the log output from an individual task diff --git a/cirro_api_client/v1/api/execution/get_tasks_for_execution.py b/cirro_api_client/v1/api/execution/get_tasks_for_execution.py index 7f07821..c5fd5ac 100644 --- a/cirro_api_client/v1/api/execution/get_tasks_for_execution.py +++ b/cirro_api_client/v1/api/execution/get_tasks_for_execution.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any import httpx @@ -13,15 +13,15 @@ def _get_kwargs( project_id: str, dataset_id: str, *, - force_live: Union[Unset, bool] = False, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + force_live: Unset | bool = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["forceLive"] = force_live params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/execution/{dataset_id}/tasks", "params": params, @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Task"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["Task"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -44,7 +44,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Task"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Task"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -58,8 +58,8 @@ def sync_detailed( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Response[List["Task"]]: + force_live: Unset | bool = False, +) -> Response[list["Task"]]: """Get execution tasks Gets the tasks submitted by the workflow execution @@ -97,8 +97,8 @@ def sync( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Optional[List["Task"]]: + force_live: Unset | bool = False, +) -> list["Task"] | None: """Get execution tasks Gets the tasks submitted by the workflow execution @@ -133,8 +133,8 @@ async def asyncio_detailed( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Response[List["Task"]]: + force_live: Unset | bool = False, +) -> Response[list["Task"]]: """Get execution tasks Gets the tasks submitted by the workflow execution @@ -169,8 +169,8 @@ async def asyncio( dataset_id: str, *, client: Client, - force_live: Union[Unset, bool] = False, -) -> Optional[List["Task"]]: + force_live: Unset | bool = False, +) -> list["Task"] | None: """Get execution tasks Gets the tasks submitted by the workflow execution diff --git a/cirro_api_client/v1/api/execution/run_analysis.py b/cirro_api_client/v1/api/execution/run_analysis.py index d0f7fd6..7fbf2a1 100644 --- a/cirro_api_client/v1/api/execution/run_analysis.py +++ b/cirro_api_client/v1/api/execution/run_analysis.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: RunAnalysisRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/execution", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: if response.status_code == HTTPStatus.OK: response_200 = CreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: RunAnalysisRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Run analysis Run analysis @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: RunAnalysisRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Run analysis Run analysis diff --git a/cirro_api_client/v1/api/execution/stop_analysis.py b/cirro_api_client/v1/api/execution/stop_analysis.py index 56542b7..3c583a7 100644 --- a/cirro_api_client/v1/api/execution/stop_analysis.py +++ b/cirro_api_client/v1/api/execution/stop_analysis.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/execution/{dataset_id}/stop", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[StopExecutionResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> StopExecutionResponse | None: if response.status_code == HTTPStatus.OK: response_200 = StopExecutionResponse.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( dataset_id: str, *, client: Client, -) -> Optional[StopExecutionResponse]: +) -> StopExecutionResponse | None: """Stop execution Terminates all analysis jobs related to this execution @@ -146,7 +146,7 @@ async def asyncio( dataset_id: str, *, client: Client, -) -> Optional[StopExecutionResponse]: +) -> StopExecutionResponse | None: """Stop execution Terminates all analysis jobs related to this execution diff --git a/cirro_api_client/v1/api/feed/create_discussion.py b/cirro_api_client/v1/api/feed/create_discussion.py index bfd2df6..c38a20a 100644 --- a/cirro_api_client/v1/api/feed/create_discussion.py +++ b/cirro_api_client/v1/api/feed/create_discussion.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: DiscussionInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/discussions", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Discussion]: +def _parse_response(*, client: Client, response: httpx.Response) -> Discussion | None: if response.status_code == HTTPStatus.OK: response_200 = Discussion.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: DiscussionInput, -) -> Optional[Discussion]: +) -> Discussion | None: """Create a discussion Creates a new discussion for an entity @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: DiscussionInput, -) -> Optional[Discussion]: +) -> Discussion | None: """Create a discussion Creates a new discussion for an entity diff --git a/cirro_api_client/v1/api/feed/delete_discussion.py b/cirro_api_client/v1/api/feed/delete_discussion.py index 3d05435..3584fd9 100644 --- a/cirro_api_client/v1/api/feed/delete_discussion.py +++ b/cirro_api_client/v1/api/feed/delete_discussion.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -10,8 +10,8 @@ def _get_kwargs( discussion_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/discussions/{discussion_id}", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/feed/delete_message.py b/cirro_api_client/v1/api/feed/delete_message.py index 43b9111..10bcd5a 100644 --- a/cirro_api_client/v1/api/feed/delete_message.py +++ b/cirro_api_client/v1/api/feed/delete_message.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( discussion_id: str, message_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/discussions/{discussion_id}/messages/{message_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/feed/get_discussion.py b/cirro_api_client/v1/api/feed/get_discussion.py index b88f956..ece2153 100644 --- a/cirro_api_client/v1/api/feed/get_discussion.py +++ b/cirro_api_client/v1/api/feed/get_discussion.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( discussion_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/discussions/{discussion_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Discussion]: +def _parse_response(*, client: Client, response: httpx.Response) -> Discussion | None: if response.status_code == HTTPStatus.OK: response_200 = Discussion.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( discussion_id: str, *, client: Client, -) -> Optional[Discussion]: +) -> Discussion | None: """Get a discussion Retrieves a discussion by its ID @@ -135,7 +135,7 @@ async def asyncio( discussion_id: str, *, client: Client, -) -> Optional[Discussion]: +) -> Discussion | None: """Get a discussion Retrieves a discussion by its ID diff --git a/cirro_api_client/v1/api/feed/get_discussions_for_entity.py b/cirro_api_client/v1/api/feed/get_discussions_for_entity.py index f38afa5..1a4e7f0 100644 --- a/cirro_api_client/v1/api/feed/get_discussions_for_entity.py +++ b/cirro_api_client/v1/api/feed/get_discussions_for_entity.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any import httpx @@ -15,18 +15,18 @@ def _get_kwargs( *, entity_type: EntityType, entity_id: str, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - order: Union[None, SortOrder, Unset] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + next_token: None | Unset | str = UNSET, + limit: Unset | int = 5000, + order: None | SortOrder | Unset = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} json_entity_type = entity_type.value params["entityType"] = json_entity_type params["entityId"] = entity_id - json_next_token: Union[None, Unset, str] + json_next_token: None | Unset | str if isinstance(next_token, Unset): json_next_token = UNSET else: @@ -35,7 +35,7 @@ def _get_kwargs( params["limit"] = limit - json_order: Union[None, Unset, str] + json_order: None | Unset | str if isinstance(order, Unset): json_order = UNSET elif isinstance(order, SortOrder): @@ -46,7 +46,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/discussions", "params": params, @@ -55,7 +55,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseDiscussion]: +def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseDiscussion | None: if response.status_code == HTTPStatus.OK: response_200 = PaginatedResponseDiscussion.from_dict(response.json()) @@ -78,9 +78,9 @@ def sync_detailed( client: Client, entity_type: EntityType, entity_id: str, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - order: Union[None, SortOrder, Unset] = UNSET, + next_token: None | Unset | str = UNSET, + limit: Unset | int = 5000, + order: None | SortOrder | Unset = UNSET, ) -> Response[PaginatedResponseDiscussion]: """Get discussions for an entity @@ -123,10 +123,10 @@ def sync( client: Client, entity_type: EntityType, entity_id: str, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - order: Union[None, SortOrder, Unset] = UNSET, -) -> Optional[PaginatedResponseDiscussion]: + next_token: None | Unset | str = UNSET, + limit: Unset | int = 5000, + order: None | SortOrder | Unset = UNSET, +) -> PaginatedResponseDiscussion | None: """Get discussions for an entity Retrieves a paginated list of discussions for a specific entity type and ID @@ -165,9 +165,9 @@ async def asyncio_detailed( client: Client, entity_type: EntityType, entity_id: str, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - order: Union[None, SortOrder, Unset] = UNSET, + next_token: None | Unset | str = UNSET, + limit: Unset | int = 5000, + order: None | SortOrder | Unset = UNSET, ) -> Response[PaginatedResponseDiscussion]: """Get discussions for an entity @@ -207,10 +207,10 @@ async def asyncio( client: Client, entity_type: EntityType, entity_id: str, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - order: Union[None, SortOrder, Unset] = UNSET, -) -> Optional[PaginatedResponseDiscussion]: + next_token: None | Unset | str = UNSET, + limit: Unset | int = 5000, + order: None | SortOrder | Unset = UNSET, +) -> PaginatedResponseDiscussion | None: """Get discussions for an entity Retrieves a paginated list of discussions for a specific entity type and ID diff --git a/cirro_api_client/v1/api/feed/get_messages_for_discussion.py b/cirro_api_client/v1/api/feed/get_messages_for_discussion.py index 19be2ed..b48c674 100644 --- a/cirro_api_client/v1/api/feed/get_messages_for_discussion.py +++ b/cirro_api_client/v1/api/feed/get_messages_for_discussion.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any import httpx @@ -13,14 +13,14 @@ def _get_kwargs( discussion_id: str, *, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - thread_id: Union[None, Unset, str] = UNSET, - order: Union[None, SortOrder, Unset] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} - - json_next_token: Union[None, Unset, str] + next_token: None | Unset | str = UNSET, + limit: Unset | int = 5000, + thread_id: None | Unset | str = UNSET, + order: None | SortOrder | Unset = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + json_next_token: None | Unset | str if isinstance(next_token, Unset): json_next_token = UNSET else: @@ -29,14 +29,14 @@ def _get_kwargs( params["limit"] = limit - json_thread_id: Union[None, Unset, str] + json_thread_id: None | Unset | str if isinstance(thread_id, Unset): json_thread_id = UNSET else: json_thread_id = thread_id params["threadId"] = json_thread_id - json_order: Union[None, Unset, str] + json_order: None | Unset | str if isinstance(order, Unset): json_order = UNSET elif isinstance(order, SortOrder): @@ -47,7 +47,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": f"/discussions/{discussion_id}/messages", "params": params, @@ -56,7 +56,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseMessage]: +def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseMessage | None: if response.status_code == HTTPStatus.OK: response_200 = PaginatedResponseMessage.from_dict(response.json()) @@ -78,10 +78,10 @@ def sync_detailed( discussion_id: str, *, client: Client, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - thread_id: Union[None, Unset, str] = UNSET, - order: Union[None, SortOrder, Unset] = UNSET, + next_token: None | Unset | str = UNSET, + limit: Unset | int = 5000, + thread_id: None | Unset | str = UNSET, + order: None | SortOrder | Unset = UNSET, ) -> Response[PaginatedResponseMessage]: """Get messages for a discussion @@ -123,11 +123,11 @@ def sync( discussion_id: str, *, client: Client, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - thread_id: Union[None, Unset, str] = UNSET, - order: Union[None, SortOrder, Unset] = UNSET, -) -> Optional[PaginatedResponseMessage]: + next_token: None | Unset | str = UNSET, + limit: Unset | int = 5000, + thread_id: None | Unset | str = UNSET, + order: None | SortOrder | Unset = UNSET, +) -> PaginatedResponseMessage | None: """Get messages for a discussion Retrieves all messages associated with a specific discussion @@ -165,10 +165,10 @@ async def asyncio_detailed( discussion_id: str, *, client: Client, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - thread_id: Union[None, Unset, str] = UNSET, - order: Union[None, SortOrder, Unset] = UNSET, + next_token: None | Unset | str = UNSET, + limit: Unset | int = 5000, + thread_id: None | Unset | str = UNSET, + order: None | SortOrder | Unset = UNSET, ) -> Response[PaginatedResponseMessage]: """Get messages for a discussion @@ -207,11 +207,11 @@ async def asyncio( discussion_id: str, *, client: Client, - next_token: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - thread_id: Union[None, Unset, str] = UNSET, - order: Union[None, SortOrder, Unset] = UNSET, -) -> Optional[PaginatedResponseMessage]: + next_token: None | Unset | str = UNSET, + limit: Unset | int = 5000, + thread_id: None | Unset | str = UNSET, + order: None | SortOrder | Unset = UNSET, +) -> PaginatedResponseMessage | None: """Get messages for a discussion Retrieves all messages associated with a specific discussion diff --git a/cirro_api_client/v1/api/feed/post_message.py b/cirro_api_client/v1/api/feed/post_message.py index a876441..00019bd 100644 --- a/cirro_api_client/v1/api/feed/post_message.py +++ b/cirro_api_client/v1/api/feed/post_message.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( discussion_id: str, *, body: MessageInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/discussions/{discussion_id}/messages", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/feed/update_discussion.py b/cirro_api_client/v1/api/feed/update_discussion.py index b45f636..be17b3f 100644 --- a/cirro_api_client/v1/api/feed/update_discussion.py +++ b/cirro_api_client/v1/api/feed/update_discussion.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( discussion_id: str, *, body: DiscussionInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/discussions/{discussion_id}", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/feed/update_message.py b/cirro_api_client/v1/api/feed/update_message.py index 1553b47..7df54ec 100644 --- a/cirro_api_client/v1/api/feed/update_message.py +++ b/cirro_api_client/v1/api/feed/update_message.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( message_id: str, *, body: MessageInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/discussions/{discussion_id}/messages/{message_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/file/generate_governance_file_access_token.py b/cirro_api_client/v1/api/file/generate_governance_file_access_token.py index d639ff0..ae1f284 100644 --- a/cirro_api_client/v1/api/file/generate_governance_file_access_token.py +++ b/cirro_api_client/v1/api/file/generate_governance_file_access_token.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( requirement_id: str, *, body: GovernanceFileAccessRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/governance/requirements/{requirement_id}/s3-token", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[AWSCredentials]: +def _parse_response(*, client: Client, response: httpx.Response) -> AWSCredentials | None: if response.status_code == HTTPStatus.OK: response_200 = AWSCredentials.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: GovernanceFileAccessRequest, -) -> Optional[AWSCredentials]: +) -> AWSCredentials | None: """Create governance file access token Generates credentials used for connecting via S3 @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: GovernanceFileAccessRequest, -) -> Optional[AWSCredentials]: +) -> AWSCredentials | None: """Create governance file access token Generates credentials used for connecting via S3 diff --git a/cirro_api_client/v1/api/file/generate_project_file_access_token.py b/cirro_api_client/v1/api/file/generate_project_file_access_token.py index 3d6ecf9..0119815 100644 --- a/cirro_api_client/v1/api/file/generate_project_file_access_token.py +++ b/cirro_api_client/v1/api/file/generate_project_file_access_token.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: ProjectFileAccessRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/s3-token", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[AWSCredentials]: +def _parse_response(*, client: Client, response: httpx.Response) -> AWSCredentials | None: if response.status_code == HTTPStatus.OK: response_200 = AWSCredentials.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ProjectFileAccessRequest, -) -> Optional[AWSCredentials]: +) -> AWSCredentials | None: """Create project file access token Generates credentials used for connecting via S3 @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ProjectFileAccessRequest, -) -> Optional[AWSCredentials]: +) -> AWSCredentials | None: """Create project file access token Generates credentials used for connecting via S3 diff --git a/cirro_api_client/v1/api/file/generate_project_sftp_token.py b/cirro_api_client/v1/api/file/generate_project_sftp_token.py index 6109aef..6dfac8d 100644 --- a/cirro_api_client/v1/api/file/generate_project_sftp_token.py +++ b/cirro_api_client/v1/api/file/generate_project_sftp_token.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: GenerateSftpCredentialsRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/sftp-token", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[SftpCredentials]: +def _parse_response(*, client: Client, response: httpx.Response) -> SftpCredentials | None: if response.status_code == HTTPStatus.OK: response_200 = SftpCredentials.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: GenerateSftpCredentialsRequest, -) -> Optional[SftpCredentials]: +) -> SftpCredentials | None: """Create project SFTP Token Generates credentials used for connecting via SFTP @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: GenerateSftpCredentialsRequest, -) -> Optional[SftpCredentials]: +) -> SftpCredentials | None: """Create project SFTP Token Generates credentials used for connecting via SFTP diff --git a/cirro_api_client/v1/api/governance/create_classification.py b/cirro_api_client/v1/api/governance/create_classification.py index 4c76fb3..d36c2f3 100644 --- a/cirro_api_client/v1/api/governance/create_classification.py +++ b/cirro_api_client/v1/api/governance/create_classification.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: ClassificationInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/governance/classifications", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceClassification]: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceClassification | None: if response.status_code == HTTPStatus.CREATED: response_201 = GovernanceClassification.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: ClassificationInput, -) -> Optional[GovernanceClassification]: +) -> GovernanceClassification | None: """Create classification Creates a classification @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: ClassificationInput, -) -> Optional[GovernanceClassification]: +) -> GovernanceClassification | None: """Create classification Creates a classification diff --git a/cirro_api_client/v1/api/governance/create_contact.py b/cirro_api_client/v1/api/governance/create_contact.py index a0b2aa9..d37ae6d 100644 --- a/cirro_api_client/v1/api/governance/create_contact.py +++ b/cirro_api_client/v1/api/governance/create_contact.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: ContactInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/governance/contacts", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceContact]: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceContact | None: if response.status_code == HTTPStatus.CREATED: response_201 = GovernanceContact.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: ContactInput, -) -> Optional[GovernanceContact]: +) -> GovernanceContact | None: """Create contact Creates a contact @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: ContactInput, -) -> Optional[GovernanceContact]: +) -> GovernanceContact | None: """Create contact Creates a contact diff --git a/cirro_api_client/v1/api/governance/create_requirement.py b/cirro_api_client/v1/api/governance/create_requirement.py index c70a7af..4bbcb32 100644 --- a/cirro_api_client/v1/api/governance/create_requirement.py +++ b/cirro_api_client/v1/api/governance/create_requirement.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: RequirementInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/governance/requirements", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceRequirement]: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceRequirement | None: if response.status_code == HTTPStatus.CREATED: response_201 = GovernanceRequirement.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: RequirementInput, -) -> Optional[GovernanceRequirement]: +) -> GovernanceRequirement | None: """Create requirement Creates a requirement @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: RequirementInput, -) -> Optional[GovernanceRequirement]: +) -> GovernanceRequirement | None: """Create requirement Creates a requirement diff --git a/cirro_api_client/v1/api/governance/delete_classification.py b/cirro_api_client/v1/api/governance/delete_classification.py index 288a218..781d264 100644 --- a/cirro_api_client/v1/api/governance/delete_classification.py +++ b/cirro_api_client/v1/api/governance/delete_classification.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -10,8 +10,8 @@ def _get_kwargs( classification_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/governance/classifications/{classification_id}", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/governance/delete_contact.py b/cirro_api_client/v1/api/governance/delete_contact.py index 1edbb37..b4701f1 100644 --- a/cirro_api_client/v1/api/governance/delete_contact.py +++ b/cirro_api_client/v1/api/governance/delete_contact.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -10,8 +10,8 @@ def _get_kwargs( contact_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/governance/contacts/{contact_id}", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/governance/delete_requirement.py b/cirro_api_client/v1/api/governance/delete_requirement.py index f9d607c..f581532 100644 --- a/cirro_api_client/v1/api/governance/delete_requirement.py +++ b/cirro_api_client/v1/api/governance/delete_requirement.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -10,8 +10,8 @@ def _get_kwargs( requirement_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/governance/requirements/{requirement_id}", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/governance/fulfill_requirement.py b/cirro_api_client/v1/api/governance/fulfill_requirement.py index 84b708e..26d7f90 100644 --- a/cirro_api_client/v1/api/governance/fulfill_requirement.py +++ b/cirro_api_client/v1/api/governance/fulfill_requirement.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -15,10 +15,10 @@ def _get_kwargs( requirement_id: str, *, body: RequirementFulfillmentInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/governance/projects/{project_id}/requirements/{requirement_id}:fulfill", } @@ -32,7 +32,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[FulfillmentResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> FulfillmentResponse | None: if response.status_code == HTTPStatus.OK: response_200 = FulfillmentResponse.from_dict(response.json()) @@ -95,7 +95,7 @@ def sync( *, client: Client, body: RequirementFulfillmentInput, -) -> Optional[FulfillmentResponse]: +) -> FulfillmentResponse | None: """Fulfill a project's requirement Saves a record of the fulfillment of a governance requirement @@ -167,7 +167,7 @@ async def asyncio( *, client: Client, body: RequirementFulfillmentInput, -) -> Optional[FulfillmentResponse]: +) -> FulfillmentResponse | None: """Fulfill a project's requirement Saves a record of the fulfillment of a governance requirement diff --git a/cirro_api_client/v1/api/governance/get_classification.py b/cirro_api_client/v1/api/governance/get_classification.py index 5a0ee2b..fbbb6ef 100644 --- a/cirro_api_client/v1/api/governance/get_classification.py +++ b/cirro_api_client/v1/api/governance/get_classification.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( classification_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/governance/classifications/{classification_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceClassification]: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceClassification | None: if response.status_code == HTTPStatus.OK: response_200 = GovernanceClassification.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( classification_id: str, *, client: Client, -) -> Optional[GovernanceClassification]: +) -> GovernanceClassification | None: """Get a classification Retrieve a data classification @@ -135,7 +135,7 @@ async def asyncio( classification_id: str, *, client: Client, -) -> Optional[GovernanceClassification]: +) -> GovernanceClassification | None: """Get a classification Retrieve a data classification diff --git a/cirro_api_client/v1/api/governance/get_classifications.py b/cirro_api_client/v1/api/governance/get_classifications.py index 4e1299b..4780625 100644 --- a/cirro_api_client/v1/api/governance/get_classifications.py +++ b/cirro_api_client/v1/api/governance/get_classifications.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/governance/classifications", } @@ -18,7 +18,7 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["GovernanceClassification"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["GovernanceClassification"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["GovernanceClassification"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["GovernanceClassification"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["GovernanceClassification"]]: +) -> Response[list["GovernanceClassification"]]: """Get classifications Retrieve a list of data classifications @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["GovernanceClassification"]]: +) -> list["GovernanceClassification"] | None: """Get classifications Retrieve a list of data classifications @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["GovernanceClassification"]]: +) -> Response[list["GovernanceClassification"]]: """Get classifications Retrieve a list of data classifications @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["GovernanceClassification"]]: +) -> list["GovernanceClassification"] | None: """Get classifications Retrieve a list of data classifications diff --git a/cirro_api_client/v1/api/governance/get_contact.py b/cirro_api_client/v1/api/governance/get_contact.py index fb1ed4a..cda2005 100644 --- a/cirro_api_client/v1/api/governance/get_contact.py +++ b/cirro_api_client/v1/api/governance/get_contact.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( contact_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/governance/contacts/{contact_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceContact]: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceContact | None: if response.status_code == HTTPStatus.OK: response_200 = GovernanceContact.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( contact_id: str, *, client: Client, -) -> Optional[GovernanceContact]: +) -> GovernanceContact | None: """Get a contact Retrieve a governance contact @@ -135,7 +135,7 @@ async def asyncio( contact_id: str, *, client: Client, -) -> Optional[GovernanceContact]: +) -> GovernanceContact | None: """Get a contact Retrieve a governance contact diff --git a/cirro_api_client/v1/api/governance/get_contacts.py b/cirro_api_client/v1/api/governance/get_contacts.py index ea6c3ee..87ec2f7 100644 --- a/cirro_api_client/v1/api/governance/get_contacts.py +++ b/cirro_api_client/v1/api/governance/get_contacts.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/governance/contacts", } @@ -18,7 +18,7 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["GovernanceContact"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["GovernanceContact"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["GovernanceContact"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["GovernanceContact"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["GovernanceContact"]]: +) -> Response[list["GovernanceContact"]]: """Get contacts Retrieve a list of governance contacts @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["GovernanceContact"]]: +) -> list["GovernanceContact"] | None: """Get contacts Retrieve a list of governance contacts @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["GovernanceContact"]]: +) -> Response[list["GovernanceContact"]]: """Get contacts Retrieve a list of governance contacts @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["GovernanceContact"]]: +) -> list["GovernanceContact"] | None: """Get contacts Retrieve a list of governance contacts diff --git a/cirro_api_client/v1/api/governance/get_requirement.py b/cirro_api_client/v1/api/governance/get_requirement.py index 961348f..2db5a13 100644 --- a/cirro_api_client/v1/api/governance/get_requirement.py +++ b/cirro_api_client/v1/api/governance/get_requirement.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( requirement_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/governance/requirements/{requirement_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceRequirement]: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceRequirement | None: if response.status_code == HTTPStatus.OK: response_200 = GovernanceRequirement.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( requirement_id: str, *, client: Client, -) -> Optional[GovernanceRequirement]: +) -> GovernanceRequirement | None: """Get a requirement Retrieve a governance requirement @@ -135,7 +135,7 @@ async def asyncio( requirement_id: str, *, client: Client, -) -> Optional[GovernanceRequirement]: +) -> GovernanceRequirement | None: """Get a requirement Retrieve a governance requirement diff --git a/cirro_api_client/v1/api/governance/get_requirements.py b/cirro_api_client/v1/api/governance/get_requirements.py index 162e6cf..c3d4511 100644 --- a/cirro_api_client/v1/api/governance/get_requirements.py +++ b/cirro_api_client/v1/api/governance/get_requirements.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any import httpx @@ -11,15 +11,15 @@ def _get_kwargs( *, - project_id: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + project_id: Unset | str = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["projectId"] = project_id params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/governance/requirements", "params": params, @@ -28,7 +28,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["GovernanceRequirement"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["GovernanceRequirement"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -42,7 +42,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["GovernanceRequirement"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["GovernanceRequirement"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -54,8 +54,8 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, - project_id: Union[Unset, str] = UNSET, -) -> Response[List["GovernanceRequirement"]]: + project_id: Unset | str = UNSET, +) -> Response[list["GovernanceRequirement"]]: """Get requirements Retrieve a list of governance requirements @@ -87,8 +87,8 @@ def sync_detailed( def sync( *, client: Client, - project_id: Union[Unset, str] = UNSET, -) -> Optional[List["GovernanceRequirement"]]: + project_id: Unset | str = UNSET, +) -> list["GovernanceRequirement"] | None: """Get requirements Retrieve a list of governance requirements @@ -117,8 +117,8 @@ def sync( async def asyncio_detailed( *, client: Client, - project_id: Union[Unset, str] = UNSET, -) -> Response[List["GovernanceRequirement"]]: + project_id: Unset | str = UNSET, +) -> Response[list["GovernanceRequirement"]]: """Get requirements Retrieve a list of governance requirements @@ -147,8 +147,8 @@ async def asyncio_detailed( async def asyncio( *, client: Client, - project_id: Union[Unset, str] = UNSET, -) -> Optional[List["GovernanceRequirement"]]: + project_id: Unset | str = UNSET, +) -> list["GovernanceRequirement"] | None: """Get requirements Retrieve a list of governance requirements diff --git a/cirro_api_client/v1/api/governance/get_requirements_by_project.py b/cirro_api_client/v1/api/governance/get_requirements_by_project.py index 3a9f0e4..d35afbc 100644 --- a/cirro_api_client/v1/api/governance/get_requirements_by_project.py +++ b/cirro_api_client/v1/api/governance/get_requirements_by_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any import httpx @@ -12,15 +12,15 @@ def _get_kwargs( project_id: str, *, - username: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + username: Unset | str = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["username"] = username params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": f"/governance/projects/{project_id}/requirements", "params": params, @@ -29,7 +29,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ProjectRequirement"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["ProjectRequirement"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -43,7 +43,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ProjectRequirement"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["ProjectRequirement"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -56,8 +56,8 @@ def sync_detailed( project_id: str, *, client: Client, - username: Union[Unset, str] = UNSET, -) -> Response[List["ProjectRequirement"]]: + username: Unset | str = UNSET, +) -> Response[list["ProjectRequirement"]]: """Get project requirements Retrieve governance requirements for a project with fulfillment information for the current user @@ -92,8 +92,8 @@ def sync( project_id: str, *, client: Client, - username: Union[Unset, str] = UNSET, -) -> Optional[List["ProjectRequirement"]]: + username: Unset | str = UNSET, +) -> list["ProjectRequirement"] | None: """Get project requirements Retrieve governance requirements for a project with fulfillment information for the current user @@ -125,8 +125,8 @@ async def asyncio_detailed( project_id: str, *, client: Client, - username: Union[Unset, str] = UNSET, -) -> Response[List["ProjectRequirement"]]: + username: Unset | str = UNSET, +) -> Response[list["ProjectRequirement"]]: """Get project requirements Retrieve governance requirements for a project with fulfillment information for the current user @@ -158,8 +158,8 @@ async def asyncio( project_id: str, *, client: Client, - username: Union[Unset, str] = UNSET, -) -> Optional[List["ProjectRequirement"]]: + username: Unset | str = UNSET, +) -> list["ProjectRequirement"] | None: """Get project requirements Retrieve governance requirements for a project with fulfillment information for the current user diff --git a/cirro_api_client/v1/api/governance/update_classification.py b/cirro_api_client/v1/api/governance/update_classification.py index fdcb2e7..790a512 100644 --- a/cirro_api_client/v1/api/governance/update_classification.py +++ b/cirro_api_client/v1/api/governance/update_classification.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( classification_id: str, *, body: ClassificationInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/governance/classifications/{classification_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceClassification]: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceClassification | None: if response.status_code == HTTPStatus.OK: response_200 = GovernanceClassification.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ClassificationInput, -) -> Optional[GovernanceClassification]: +) -> GovernanceClassification | None: """Update classification Updates a classification @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ClassificationInput, -) -> Optional[GovernanceClassification]: +) -> GovernanceClassification | None: """Update classification Updates a classification diff --git a/cirro_api_client/v1/api/governance/update_contact.py b/cirro_api_client/v1/api/governance/update_contact.py index 2f704f1..c9ca509 100644 --- a/cirro_api_client/v1/api/governance/update_contact.py +++ b/cirro_api_client/v1/api/governance/update_contact.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( contact_id: str, *, body: ContactInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/governance/contacts/{contact_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceContact]: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceContact | None: if response.status_code == HTTPStatus.OK: response_200 = GovernanceContact.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ContactInput, -) -> Optional[GovernanceContact]: +) -> GovernanceContact | None: """Update contact Updates a contact @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ContactInput, -) -> Optional[GovernanceContact]: +) -> GovernanceContact | None: """Update contact Updates a contact diff --git a/cirro_api_client/v1/api/governance/update_requirement.py b/cirro_api_client/v1/api/governance/update_requirement.py index 25598be..5e7eb08 100644 --- a/cirro_api_client/v1/api/governance/update_requirement.py +++ b/cirro_api_client/v1/api/governance/update_requirement.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( requirement_id: str, *, body: RequirementInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/governance/requirements/{requirement_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceRequirement]: +def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceRequirement | None: if response.status_code == HTTPStatus.OK: response_200 = GovernanceRequirement.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: RequirementInput, -) -> Optional[GovernanceRequirement]: +) -> GovernanceRequirement | None: """Update requirement Updates a requirement @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: RequirementInput, -) -> Optional[GovernanceRequirement]: +) -> GovernanceRequirement | None: """Update requirement Updates a requirement diff --git a/cirro_api_client/v1/api/governance/update_requirement_file_for_project.py b/cirro_api_client/v1/api/governance/update_requirement_file_for_project.py index 6022409..801180c 100644 --- a/cirro_api_client/v1/api/governance/update_requirement_file_for_project.py +++ b/cirro_api_client/v1/api/governance/update_requirement_file_for_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: GovernanceFileInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/governance/requirements/{requirement_id}/projects/{project_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/metadata/get_dataset_samples.py b/cirro_api_client/v1/api/metadata/get_dataset_samples.py index bd4d0bb..3d3773f 100644 --- a/cirro_api_client/v1/api/metadata/get_dataset_samples.py +++ b/cirro_api_client/v1/api/metadata/get_dataset_samples.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/datasets/{dataset_id}/samples", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Sample"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["Sample"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -35,7 +35,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Sample"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Sample"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,7 +49,7 @@ def sync_detailed( dataset_id: str, *, client: Client, -) -> Response[List["Sample"]]: +) -> Response[list["Sample"]]: """Get dataset samples Retrieves a list of samples associated with a dataset along with their metadata @@ -85,7 +85,7 @@ def sync( dataset_id: str, *, client: Client, -) -> Optional[List["Sample"]]: +) -> list["Sample"] | None: """Get dataset samples Retrieves a list of samples associated with a dataset along with their metadata @@ -118,7 +118,7 @@ async def asyncio_detailed( dataset_id: str, *, client: Client, -) -> Response[List["Sample"]]: +) -> Response[list["Sample"]]: """Get dataset samples Retrieves a list of samples associated with a dataset along with their metadata @@ -151,7 +151,7 @@ async def asyncio( dataset_id: str, *, client: Client, -) -> Optional[List["Sample"]]: +) -> list["Sample"] | None: """Get dataset samples Retrieves a list of samples associated with a dataset along with their metadata diff --git a/cirro_api_client/v1/api/metadata/get_project_samples.py b/cirro_api_client/v1/api/metadata/get_project_samples.py index 39445d4..77f8405 100644 --- a/cirro_api_client/v1/api/metadata/get_project_samples.py +++ b/cirro_api_client/v1/api/metadata/get_project_samples.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any import httpx @@ -12,10 +12,10 @@ def _get_kwargs( project_id: str, *, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["limit"] = limit @@ -23,7 +23,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/samples", "params": params, @@ -32,7 +32,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseSampleDto]: +def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseSampleDto | None: if response.status_code == HTTPStatus.OK: response_200 = PaginatedResponseSampleDto.from_dict(response.json()) @@ -54,8 +54,8 @@ def sync_detailed( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, ) -> Response[PaginatedResponseSampleDto]: """Get project samples @@ -93,9 +93,9 @@ def sync( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseSampleDto]: + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, +) -> PaginatedResponseSampleDto | None: """Get project samples Retrieves a list of samples associated with a project along with their metadata @@ -129,8 +129,8 @@ async def asyncio_detailed( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, ) -> Response[PaginatedResponseSampleDto]: """Get project samples @@ -165,9 +165,9 @@ async def asyncio( project_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseSampleDto]: + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, +) -> PaginatedResponseSampleDto | None: """Get project samples Retrieves a list of samples associated with a project along with their metadata diff --git a/cirro_api_client/v1/api/metadata/get_project_schema.py b/cirro_api_client/v1/api/metadata/get_project_schema.py index 33f1341..32a025b 100644 --- a/cirro_api_client/v1/api/metadata/get_project_schema.py +++ b/cirro_api_client/v1/api/metadata/get_project_schema.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/schema", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[FormSchema]: +def _parse_response(*, client: Client, response: httpx.Response) -> FormSchema | None: if response.status_code == HTTPStatus.OK: response_200 = FormSchema.from_dict(response.json()) @@ -73,7 +73,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[FormSchema]: +) -> FormSchema | None: """Get project metadata schema Args: @@ -129,7 +129,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[FormSchema]: +) -> FormSchema | None: """Get project metadata schema Args: diff --git a/cirro_api_client/v1/api/metadata/get_sample_by_id.py b/cirro_api_client/v1/api/metadata/get_sample_by_id.py index fc26e9f..3c723d4 100644 --- a/cirro_api_client/v1/api/metadata/get_sample_by_id.py +++ b/cirro_api_client/v1/api/metadata/get_sample_by_id.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, sample_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/samples/{sample_id}", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Sample]: +def _parse_response(*, client: Client, response: httpx.Response) -> Sample | None: if response.status_code == HTTPStatus.OK: response_200 = Sample.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( sample_id: str, *, client: Client, -) -> Optional[Sample]: +) -> Sample | None: """Get sample by ID Retrieves a sample by its ID along with its metadata @@ -146,7 +146,7 @@ async def asyncio( sample_id: str, *, client: Client, -) -> Optional[Sample]: +) -> Sample | None: """Get sample by ID Retrieves a sample by its ID along with its metadata diff --git a/cirro_api_client/v1/api/metadata/update_project_schema.py b/cirro_api_client/v1/api/metadata/update_project_schema.py index 90ede66..032bde4 100644 --- a/cirro_api_client/v1/api/metadata/update_project_schema.py +++ b/cirro_api_client/v1/api/metadata/update_project_schema.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( project_id: str, *, body: FormSchema, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/schema", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/metadata/update_sample.py b/cirro_api_client/v1/api/metadata/update_sample.py index a6ead4d..f570e65 100644 --- a/cirro_api_client/v1/api/metadata/update_sample.py +++ b/cirro_api_client/v1/api/metadata/update_sample.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -15,10 +15,10 @@ def _get_kwargs( sample_id: str, *, body: SampleRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/samples/{sample_id}", } @@ -32,7 +32,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Sample]: +def _parse_response(*, client: Client, response: httpx.Response) -> Sample | None: if response.status_code == HTTPStatus.OK: response_200 = Sample.from_dict(response.json()) @@ -95,7 +95,7 @@ def sync( *, client: Client, body: SampleRequest, -) -> Optional[Sample]: +) -> Sample | None: """Update sample Updates metadata on a sample @@ -167,7 +167,7 @@ async def asyncio( *, client: Client, body: SampleRequest, -) -> Optional[Sample]: +) -> Sample | None: """Update sample Updates metadata on a sample diff --git a/cirro_api_client/v1/api/metrics/get_all_metrics.py b/cirro_api_client/v1/api/metrics/get_all_metrics.py index 3eef6ed..8612d34 100644 --- a/cirro_api_client/v1/api/metrics/get_all_metrics.py +++ b/cirro_api_client/v1/api/metrics/get_all_metrics.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/metrics", } @@ -18,7 +18,7 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ProjectMetrics"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["ProjectMetrics"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ProjectMetrics"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["ProjectMetrics"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["ProjectMetrics"]]: +) -> Response[list["ProjectMetrics"]]: """Get all project metrics Retrieves metrics for all projects. @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["ProjectMetrics"]]: +) -> list["ProjectMetrics"] | None: """Get all project metrics Retrieves metrics for all projects. @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["ProjectMetrics"]]: +) -> Response[list["ProjectMetrics"]]: """Get all project metrics Retrieves metrics for all projects. @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["ProjectMetrics"]]: +) -> list["ProjectMetrics"] | None: """Get all project metrics Retrieves metrics for all projects. diff --git a/cirro_api_client/v1/api/metrics/get_project_metrics.py b/cirro_api_client/v1/api/metrics/get_project_metrics.py index cc15a35..694c1ba 100644 --- a/cirro_api_client/v1/api/metrics/get_project_metrics.py +++ b/cirro_api_client/v1/api/metrics/get_project_metrics.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/metrics", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ProjectMetrics]: +def _parse_response(*, client: Client, response: httpx.Response) -> ProjectMetrics | None: if response.status_code == HTTPStatus.OK: response_200 = ProjectMetrics.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[ProjectMetrics]: +) -> ProjectMetrics | None: """Get project metrics Retrieves metrics about a project. @@ -135,7 +135,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[ProjectMetrics]: +) -> ProjectMetrics | None: """Get project metrics Retrieves metrics about a project. diff --git a/cirro_api_client/v1/api/notebooks/create_notebook_instance.py b/cirro_api_client/v1/api/notebooks/create_notebook_instance.py index 4901f88..bf05eb2 100644 --- a/cirro_api_client/v1/api/notebooks/create_notebook_instance.py +++ b/cirro_api_client/v1/api/notebooks/create_notebook_instance.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: CreateNotebookInstanceRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/notebook-instances", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: CreateNotebookInstanceRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create notebook instance Creates a notebook instance within the project @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: CreateNotebookInstanceRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create notebook instance Creates a notebook instance within the project diff --git a/cirro_api_client/v1/api/notebooks/delete_notebook_instance.py b/cirro_api_client/v1/api/notebooks/delete_notebook_instance.py index b0f82cb..8941c9a 100644 --- a/cirro_api_client/v1/api/notebooks/delete_notebook_instance.py +++ b/cirro_api_client/v1/api/notebooks/delete_notebook_instance.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, notebook_instance_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/projects/{project_id}/notebook-instances/{notebook_instance_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/notebooks/generate_notebook_instance_url.py b/cirro_api_client/v1/api/notebooks/generate_notebook_instance_url.py index 61c7c54..468e515 100644 --- a/cirro_api_client/v1/api/notebooks/generate_notebook_instance_url.py +++ b/cirro_api_client/v1/api/notebooks/generate_notebook_instance_url.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, notebook_instance_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/notebook-instances/{notebook_instance_id}:generate-url", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[OpenNotebookInstanceResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> OpenNotebookInstanceResponse | None: if response.status_code == HTTPStatus.OK: response_200 = OpenNotebookInstanceResponse.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( notebook_instance_id: str, *, client: Client, -) -> Optional[OpenNotebookInstanceResponse]: +) -> OpenNotebookInstanceResponse | None: """Generate notebook instance URL Creates an authenticated URL to open up the notebook instance in your browser @@ -146,7 +146,7 @@ async def asyncio( notebook_instance_id: str, *, client: Client, -) -> Optional[OpenNotebookInstanceResponse]: +) -> OpenNotebookInstanceResponse | None: """Generate notebook instance URL Creates an authenticated URL to open up the notebook instance in your browser diff --git a/cirro_api_client/v1/api/notebooks/get_notebook_instance_status.py b/cirro_api_client/v1/api/notebooks/get_notebook_instance_status.py index fe4cce1..6131959 100644 --- a/cirro_api_client/v1/api/notebooks/get_notebook_instance_status.py +++ b/cirro_api_client/v1/api/notebooks/get_notebook_instance_status.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, notebook_instance_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/notebook-instances/{notebook_instance_id}:status", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[NotebookInstanceStatusResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> NotebookInstanceStatusResponse | None: if response.status_code == HTTPStatus.OK: response_200 = NotebookInstanceStatusResponse.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( notebook_instance_id: str, *, client: Client, -) -> Optional[NotebookInstanceStatusResponse]: +) -> NotebookInstanceStatusResponse | None: """Get notebook instance status Retrieves the status of the instance @@ -146,7 +146,7 @@ async def asyncio( notebook_instance_id: str, *, client: Client, -) -> Optional[NotebookInstanceStatusResponse]: +) -> NotebookInstanceStatusResponse | None: """Get notebook instance status Retrieves the status of the instance diff --git a/cirro_api_client/v1/api/notebooks/get_notebook_instances.py b/cirro_api_client/v1/api/notebooks/get_notebook_instances.py index ccaa23e..7bc7e8c 100644 --- a/cirro_api_client/v1/api/notebooks/get_notebook_instances.py +++ b/cirro_api_client/v1/api/notebooks/get_notebook_instances.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/notebook-instances", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["NotebookInstance"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["NotebookInstance"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -34,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["NotebookInstance"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["NotebookInstance"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +47,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[List["NotebookInstance"]]: +) -> Response[list["NotebookInstance"]]: """Get notebook instances Retrieves a list of notebook instances that the user has access to @@ -80,7 +80,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[List["NotebookInstance"]]: +) -> list["NotebookInstance"] | None: """Get notebook instances Retrieves a list of notebook instances that the user has access to @@ -110,7 +110,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[List["NotebookInstance"]]: +) -> Response[list["NotebookInstance"]]: """Get notebook instances Retrieves a list of notebook instances that the user has access to @@ -140,7 +140,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[List["NotebookInstance"]]: +) -> list["NotebookInstance"] | None: """Get notebook instances Retrieves a list of notebook instances that the user has access to diff --git a/cirro_api_client/v1/api/notebooks/stop_notebook_instance.py b/cirro_api_client/v1/api/notebooks/stop_notebook_instance.py index 95ab1d4..d850381 100644 --- a/cirro_api_client/v1/api/notebooks/stop_notebook_instance.py +++ b/cirro_api_client/v1/api/notebooks/stop_notebook_instance.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, notebook_instance_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/notebook-instances/{notebook_instance_id}:stop", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/processes/archive_custom_process.py b/cirro_api_client/v1/api/processes/archive_custom_process.py index 3056c40..a659e85 100644 --- a/cirro_api_client/v1/api/processes/archive_custom_process.py +++ b/cirro_api_client/v1/api/processes/archive_custom_process.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -10,8 +10,8 @@ def _get_kwargs( process_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/processes/{process_id}", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/processes/calculate_pipeline_cost.py b/cirro_api_client/v1/api/processes/calculate_pipeline_cost.py index 4d6f63f..435eb5b 100644 --- a/cirro_api_client/v1/api/processes/calculate_pipeline_cost.py +++ b/cirro_api_client/v1/api/processes/calculate_pipeline_cost.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( process_id: str, *, body: CalculatePipelineCostRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/processes/{process_id}/cost", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PipelineCost]: +def _parse_response(*, client: Client, response: httpx.Response) -> PipelineCost | None: if response.status_code == HTTPStatus.OK: response_200 = PipelineCost.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: CalculatePipelineCostRequest, -) -> Optional[PipelineCost]: +) -> PipelineCost | None: """Calculate pipeline cost Retrieves the cost of running the pipeline @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: CalculatePipelineCostRequest, -) -> Optional[PipelineCost]: +) -> PipelineCost | None: """Calculate pipeline cost Retrieves the cost of running the pipeline diff --git a/cirro_api_client/v1/api/processes/create_custom_process.py b/cirro_api_client/v1/api/processes/create_custom_process.py index f0e4ad2..1a3000d 100644 --- a/cirro_api_client/v1/api/processes/create_custom_process.py +++ b/cirro_api_client/v1/api/processes/create_custom_process.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any import httpx @@ -15,10 +15,10 @@ def _get_kwargs( *, body: CustomProcessInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/processes", } @@ -34,7 +34,7 @@ def _get_kwargs( def _parse_response( *, client: Client, response: httpx.Response -) -> Optional[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: +) -> CreateResponse | ErrorMessage | PortalErrorResponse | None: if response.status_code == HTTPStatus.BAD_REQUEST: response_400 = PortalErrorResponse.from_dict(response.json()) @@ -53,7 +53,7 @@ def _parse_response( def _build_response( *, client: Client, response: httpx.Response -) -> Response[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: +) -> Response[CreateResponse | ErrorMessage | PortalErrorResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,7 +66,7 @@ def sync_detailed( *, client: Client, body: CustomProcessInput, -) -> Response[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: +) -> Response[CreateResponse | ErrorMessage | PortalErrorResponse]: """Create custom process Creates a custom data type or pipeline which you can use in the listed projects. @@ -99,7 +99,7 @@ def sync( *, client: Client, body: CustomProcessInput, -) -> Optional[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: +) -> CreateResponse | ErrorMessage | PortalErrorResponse | None: """Create custom process Creates a custom data type or pipeline which you can use in the listed projects. @@ -129,7 +129,7 @@ async def asyncio_detailed( *, client: Client, body: CustomProcessInput, -) -> Response[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: +) -> Response[CreateResponse | ErrorMessage | PortalErrorResponse]: """Create custom process Creates a custom data type or pipeline which you can use in the listed projects. @@ -159,7 +159,7 @@ async def asyncio( *, client: Client, body: CustomProcessInput, -) -> Optional[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: +) -> CreateResponse | ErrorMessage | PortalErrorResponse | None: """Create custom process Creates a custom data type or pipeline which you can use in the listed projects. diff --git a/cirro_api_client/v1/api/processes/get_process.py b/cirro_api_client/v1/api/processes/get_process.py index 476b368..7ce696a 100644 --- a/cirro_api_client/v1/api/processes/get_process.py +++ b/cirro_api_client/v1/api/processes/get_process.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( process_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/processes/{process_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ProcessDetail]: +def _parse_response(*, client: Client, response: httpx.Response) -> ProcessDetail | None: if response.status_code == HTTPStatus.OK: response_200 = ProcessDetail.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( process_id: str, *, client: Client, -) -> Optional[ProcessDetail]: +) -> ProcessDetail | None: """Get process Retrieves detailed information on a process @@ -135,7 +135,7 @@ async def asyncio( process_id: str, *, client: Client, -) -> Optional[ProcessDetail]: +) -> ProcessDetail | None: """Get process Retrieves detailed information on a process diff --git a/cirro_api_client/v1/api/processes/get_process_parameters.py b/cirro_api_client/v1/api/processes/get_process_parameters.py index 845473d..6bd98f9 100644 --- a/cirro_api_client/v1/api/processes/get_process_parameters.py +++ b/cirro_api_client/v1/api/processes/get_process_parameters.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( process_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/processes/{process_id}/parameters", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[FormSchema]: +def _parse_response(*, client: Client, response: httpx.Response) -> FormSchema | None: if response.status_code == HTTPStatus.OK: response_200 = FormSchema.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( process_id: str, *, client: Client, -) -> Optional[FormSchema]: +) -> FormSchema | None: """Get process parameters Retrieves the input parameters for a process @@ -135,7 +135,7 @@ async def asyncio( process_id: str, *, client: Client, -) -> Optional[FormSchema]: +) -> FormSchema | None: """Get process parameters Retrieves the input parameters for a process diff --git a/cirro_api_client/v1/api/processes/get_processes.py b/cirro_api_client/v1/api/processes/get_processes.py index 6eba6f9..7feca27 100644 --- a/cirro_api_client/v1/api/processes/get_processes.py +++ b/cirro_api_client/v1/api/processes/get_processes.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any import httpx @@ -11,15 +11,15 @@ def _get_kwargs( *, - include_archived: Union[Unset, bool] = False, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + include_archived: Unset | bool = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["includeArchived"] = include_archived params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/processes", "params": params, @@ -28,7 +28,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Process"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["Process"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -42,7 +42,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Process"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Process"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -54,8 +54,8 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Response[List["Process"]]: + include_archived: Unset | bool = False, +) -> Response[list["Process"]]: """List processes Retrieves a list of available processes @@ -87,8 +87,8 @@ def sync_detailed( def sync( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Optional[List["Process"]]: + include_archived: Unset | bool = False, +) -> list["Process"] | None: """List processes Retrieves a list of available processes @@ -117,8 +117,8 @@ def sync( async def asyncio_detailed( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Response[List["Process"]]: + include_archived: Unset | bool = False, +) -> Response[list["Process"]]: """List processes Retrieves a list of available processes @@ -147,8 +147,8 @@ async def asyncio_detailed( async def asyncio( *, client: Client, - include_archived: Union[Unset, bool] = False, -) -> Optional[List["Process"]]: + include_archived: Unset | bool = False, +) -> list["Process"] | None: """List processes Retrieves a list of available processes diff --git a/cirro_api_client/v1/api/processes/sync_custom_process.py b/cirro_api_client/v1/api/processes/sync_custom_process.py index 904daba..0361ce9 100644 --- a/cirro_api_client/v1/api/processes/sync_custom_process.py +++ b/cirro_api_client/v1/api/processes/sync_custom_process.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( process_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", "url": f"/processes/{process_id}:sync", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CustomPipelineSettings]: +def _parse_response(*, client: Client, response: httpx.Response) -> CustomPipelineSettings | None: if response.status_code == HTTPStatus.OK: response_200 = CustomPipelineSettings.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( process_id: str, *, client: Client, -) -> Optional[CustomPipelineSettings]: +) -> CustomPipelineSettings | None: """Sync custom process Updates the process definition from the repository @@ -135,7 +135,7 @@ async def asyncio( process_id: str, *, client: Client, -) -> Optional[CustomPipelineSettings]: +) -> CustomPipelineSettings | None: """Sync custom process Updates the process definition from the repository diff --git a/cirro_api_client/v1/api/processes/update_custom_process.py b/cirro_api_client/v1/api/processes/update_custom_process.py index 8de47b3..d079660 100644 --- a/cirro_api_client/v1/api/processes/update_custom_process.py +++ b/cirro_api_client/v1/api/processes/update_custom_process.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( process_id: str, *, body: CustomProcessInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/processes/{process_id}", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/processes/validate_file_name_patterns.py b/cirro_api_client/v1/api/processes/validate_file_name_patterns.py index e7b213d..a6e7475 100644 --- a/cirro_api_client/v1/api/processes/validate_file_name_patterns.py +++ b/cirro_api_client/v1/api/processes/validate_file_name_patterns.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( process_id: str, *, body: ValidateFileNamePatternsRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/processes/{process_id}/validate-files:test", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["FileNameMatch"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["FileNameMatch"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -45,7 +45,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["FileNameMatch"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["FileNameMatch"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,7 +59,7 @@ def sync_detailed( *, client: Client, body: ValidateFileNamePatternsRequest, -) -> Response[List["FileNameMatch"]]: +) -> Response[list["FileNameMatch"]]: """Validate file name patterns Checks the input file names with the patterns for testing regex matching @@ -95,7 +95,7 @@ def sync( *, client: Client, body: ValidateFileNamePatternsRequest, -) -> Optional[List["FileNameMatch"]]: +) -> list["FileNameMatch"] | None: """Validate file name patterns Checks the input file names with the patterns for testing regex matching @@ -128,7 +128,7 @@ async def asyncio_detailed( *, client: Client, body: ValidateFileNamePatternsRequest, -) -> Response[List["FileNameMatch"]]: +) -> Response[list["FileNameMatch"]]: """Validate file name patterns Checks the input file names with the patterns for testing regex matching @@ -161,7 +161,7 @@ async def asyncio( *, client: Client, body: ValidateFileNamePatternsRequest, -) -> Optional[List["FileNameMatch"]]: +) -> list["FileNameMatch"] | None: """Validate file name patterns Checks the input file names with the patterns for testing regex matching diff --git a/cirro_api_client/v1/api/processes/validate_file_requirements.py b/cirro_api_client/v1/api/processes/validate_file_requirements.py index 21961f8..28da700 100644 --- a/cirro_api_client/v1/api/processes/validate_file_requirements.py +++ b/cirro_api_client/v1/api/processes/validate_file_requirements.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( process_id: str, *, body: ValidateFileRequirementsRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/processes/{process_id}/validate-files", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[FileRequirements]: +def _parse_response(*, client: Client, response: httpx.Response) -> FileRequirements | None: if response.status_code == HTTPStatus.OK: response_200 = FileRequirements.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ValidateFileRequirementsRequest, -) -> Optional[FileRequirements]: +) -> FileRequirements | None: """Validate file requirements Checks the input file names with the expected files for a data type (ingest processes only) @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ValidateFileRequirementsRequest, -) -> Optional[FileRequirements]: +) -> FileRequirements | None: """Validate file requirements Checks the input file names with the expected files for a data type (ingest processes only) diff --git a/cirro_api_client/v1/api/project_requests/create_project_request.py b/cirro_api_client/v1/api/project_requests/create_project_request.py index 84b0bc8..1b69290 100644 --- a/cirro_api_client/v1/api/project_requests/create_project_request.py +++ b/cirro_api_client/v1/api/project_requests/create_project_request.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: ProjectRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/project-requests", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: ProjectRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create project request Request a new project to be created @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: ProjectRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create project request Request a new project to be created diff --git a/cirro_api_client/v1/api/projects/approve_access_request.py b/cirro_api_client/v1/api/projects/approve_access_request.py index 4d1e990..3c8df6a 100644 --- a/cirro_api_client/v1/api/projects/approve_access_request.py +++ b/cirro_api_client/v1/api/projects/approve_access_request.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( access_request_id: str, *, body: ApproveProjectAccessRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/access-requests/{access_request_id}:approve", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/projects/archive_project.py b/cirro_api_client/v1/api/projects/archive_project.py index 55710d9..cc1433d 100644 --- a/cirro_api_client/v1/api/projects/archive_project.py +++ b/cirro_api_client/v1/api/projects/archive_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -10,8 +10,8 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}:archive", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/projects/create_access_request.py b/cirro_api_client/v1/api/projects/create_access_request.py index d8b27d5..3330b52 100644 --- a/cirro_api_client/v1/api/projects/create_access_request.py +++ b/cirro_api_client/v1/api/projects/create_access_request.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: CreateProjectAccessRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/access-requests", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: CreateProjectAccessRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create access request Creates an access request for the project @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: CreateProjectAccessRequest, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create access request Creates an access request for the project diff --git a/cirro_api_client/v1/api/projects/create_project.py b/cirro_api_client/v1/api/projects/create_project.py index 9d79b22..3d24000 100644 --- a/cirro_api_client/v1/api/projects/create_project.py +++ b/cirro_api_client/v1/api/projects/create_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: ProjectInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/projects", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: ProjectInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create project Creates a project @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: ProjectInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create project Creates a project diff --git a/cirro_api_client/v1/api/projects/deny_access_request.py b/cirro_api_client/v1/api/projects/deny_access_request.py index 4232bd9..58399bb 100644 --- a/cirro_api_client/v1/api/projects/deny_access_request.py +++ b/cirro_api_client/v1/api/projects/deny_access_request.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, access_request_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/access-requests/{access_request_id}:deny", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/projects/get_access_requests.py b/cirro_api_client/v1/api/projects/get_access_requests.py index b885748..f8e90b4 100644 --- a/cirro_api_client/v1/api/projects/get_access_requests.py +++ b/cirro_api_client/v1/api/projects/get_access_requests.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any import httpx @@ -12,15 +12,15 @@ def _get_kwargs( project_id: str, *, - include_closed: Union[Unset, bool] = False, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + include_closed: Unset | bool = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["includeClosed"] = include_closed params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/access-requests", "params": params, @@ -29,7 +29,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ProjectAccessRequest"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["ProjectAccessRequest"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -43,7 +43,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ProjectAccessRequest"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["ProjectAccessRequest"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -56,8 +56,8 @@ def sync_detailed( project_id: str, *, client: Client, - include_closed: Union[Unset, bool] = False, -) -> Response[List["ProjectAccessRequest"]]: + include_closed: Unset | bool = False, +) -> Response[list["ProjectAccessRequest"]]: """Get access requests Gets users who have requested access to the project @@ -92,8 +92,8 @@ def sync( project_id: str, *, client: Client, - include_closed: Union[Unset, bool] = False, -) -> Optional[List["ProjectAccessRequest"]]: + include_closed: Unset | bool = False, +) -> list["ProjectAccessRequest"] | None: """Get access requests Gets users who have requested access to the project @@ -125,8 +125,8 @@ async def asyncio_detailed( project_id: str, *, client: Client, - include_closed: Union[Unset, bool] = False, -) -> Response[List["ProjectAccessRequest"]]: + include_closed: Unset | bool = False, +) -> Response[list["ProjectAccessRequest"]]: """Get access requests Gets users who have requested access to the project @@ -158,8 +158,8 @@ async def asyncio( project_id: str, *, client: Client, - include_closed: Union[Unset, bool] = False, -) -> Optional[List["ProjectAccessRequest"]]: + include_closed: Unset | bool = False, +) -> list["ProjectAccessRequest"] | None: """Get access requests Gets users who have requested access to the project diff --git a/cirro_api_client/v1/api/projects/get_discoverable_projects.py b/cirro_api_client/v1/api/projects/get_discoverable_projects.py index 0dbd4a3..c31e0c7 100644 --- a/cirro_api_client/v1/api/projects/get_discoverable_projects.py +++ b/cirro_api_client/v1/api/projects/get_discoverable_projects.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/projects/discover", } @@ -18,7 +18,7 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Project"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["Project"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Project"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Project"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["Project"]]: +) -> Response[list["Project"]]: """Get discoverable projects Retrieve a list of projects that a user can request access to @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["Project"]]: +) -> list["Project"] | None: """Get discoverable projects Retrieve a list of projects that a user can request access to @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["Project"]]: +) -> Response[list["Project"]]: """Get discoverable projects Retrieve a list of projects that a user can request access to @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["Project"]]: +) -> list["Project"] | None: """Get discoverable projects Retrieve a list of projects that a user can request access to diff --git a/cirro_api_client/v1/api/projects/get_project.py b/cirro_api_client/v1/api/projects/get_project.py index 44ce3cf..1bb2497 100644 --- a/cirro_api_client/v1/api/projects/get_project.py +++ b/cirro_api_client/v1/api/projects/get_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ProjectDetail]: +def _parse_response(*, client: Client, response: httpx.Response) -> ProjectDetail | None: if response.status_code == HTTPStatus.OK: response_200 = ProjectDetail.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[ProjectDetail]: +) -> ProjectDetail | None: """Get project Get detailed project information @@ -135,7 +135,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[ProjectDetail]: +) -> ProjectDetail | None: """Get project Get detailed project information diff --git a/cirro_api_client/v1/api/projects/get_project_create_options.py b/cirro_api_client/v1/api/projects/get_project_create_options.py index 91bec8f..f515ba0 100644 --- a/cirro_api_client/v1/api/projects/get_project_create_options.py +++ b/cirro_api_client/v1/api/projects/get_project_create_options.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/projects/options", } @@ -18,7 +18,7 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ProjectCreateOptions]: +def _parse_response(*, client: Client, response: httpx.Response) -> ProjectCreateOptions | None: if response.status_code == HTTPStatus.OK: response_200 = ProjectCreateOptions.from_dict(response.json()) @@ -65,7 +65,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[ProjectCreateOptions]: +) -> ProjectCreateOptions | None: """Get project create options Get allowed options for creating a project @@ -112,7 +112,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[ProjectCreateOptions]: +) -> ProjectCreateOptions | None: """Get project create options Get allowed options for creating a project diff --git a/cirro_api_client/v1/api/projects/get_project_users.py b/cirro_api_client/v1/api/projects/get_project_users.py index 1fbe3a1..7889d6a 100644 --- a/cirro_api_client/v1/api/projects/get_project_users.py +++ b/cirro_api_client/v1/api/projects/get_project_users.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/permissions", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ProjectUser"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["ProjectUser"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -34,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ProjectUser"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["ProjectUser"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +47,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[List["ProjectUser"]]: +) -> Response[list["ProjectUser"]]: """Get project permissions Gets users who have access to the project @@ -80,7 +80,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[List["ProjectUser"]]: +) -> list["ProjectUser"] | None: """Get project permissions Gets users who have access to the project @@ -110,7 +110,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[List["ProjectUser"]]: +) -> Response[list["ProjectUser"]]: """Get project permissions Gets users who have access to the project @@ -140,7 +140,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[List["ProjectUser"]]: +) -> list["ProjectUser"] | None: """Get project permissions Gets users who have access to the project diff --git a/cirro_api_client/v1/api/projects/get_projects.py b/cirro_api_client/v1/api/projects/get_projects.py index 9a76039..ae14e81 100644 --- a/cirro_api_client/v1/api/projects/get_projects.py +++ b/cirro_api_client/v1/api/projects/get_projects.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/projects", } @@ -18,7 +18,7 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Project"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["Project"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Project"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Project"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["Project"]]: +) -> Response[list["Project"]]: """Get projects Retrieve a list of projects @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["Project"]]: +) -> list["Project"] | None: """Get projects Retrieve a list of projects @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["Project"]]: +) -> Response[list["Project"]]: """Get projects Retrieve a list of projects @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["Project"]]: +) -> list["Project"] | None: """Get projects Retrieve a list of projects diff --git a/cirro_api_client/v1/api/projects/redeploy_project.py b/cirro_api_client/v1/api/projects/redeploy_project.py index 94da853..106bec1 100644 --- a/cirro_api_client/v1/api/projects/redeploy_project.py +++ b/cirro_api_client/v1/api/projects/redeploy_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -10,8 +10,8 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}:re-deploy", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/projects/set_user_project_role.py b/cirro_api_client/v1/api/projects/set_user_project_role.py index 6daa624..651810c 100644 --- a/cirro_api_client/v1/api/projects/set_user_project_role.py +++ b/cirro_api_client/v1/api/projects/set_user_project_role.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( project_id: str, *, body: SetUserProjectRoleRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/permissions", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/projects/unarchive_project.py b/cirro_api_client/v1/api/projects/unarchive_project.py index c724507..3a0ad79 100644 --- a/cirro_api_client/v1/api/projects/unarchive_project.py +++ b/cirro_api_client/v1/api/projects/unarchive_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -10,8 +10,8 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}:unarchive", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/projects/update_project.py b/cirro_api_client/v1/api/projects/update_project.py index 0e4c510..bd3a294 100644 --- a/cirro_api_client/v1/api/projects/update_project.py +++ b/cirro_api_client/v1/api/projects/update_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: ProjectInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ProjectDetail]: +def _parse_response(*, client: Client, response: httpx.Response) -> ProjectDetail | None: if response.status_code == HTTPStatus.OK: response_200 = ProjectDetail.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ProjectInput, -) -> Optional[ProjectDetail]: +) -> ProjectDetail | None: """Update project Updates a project @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ProjectInput, -) -> Optional[ProjectDetail]: +) -> ProjectDetail | None: """Update project Updates a project diff --git a/cirro_api_client/v1/api/projects/update_project_tags.py b/cirro_api_client/v1/api/projects/update_project_tags.py index e829300..3e314c8 100644 --- a/cirro_api_client/v1/api/projects/update_project_tags.py +++ b/cirro_api_client/v1/api/projects/update_project_tags.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -12,11 +12,11 @@ def _get_kwargs( project_id: str, *, - body: List["Tag"], -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} + body: list["Tag"], +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}:tags", } @@ -33,7 +33,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None @@ -53,7 +53,7 @@ def sync_detailed( project_id: str, *, client: Client, - body: List["Tag"], + body: list["Tag"], ) -> Response[Any]: """Set project tags @@ -89,7 +89,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, - body: List["Tag"], + body: list["Tag"], ) -> Response[Any]: """Set project tags diff --git a/cirro_api_client/v1/api/references/create_project_reference.py b/cirro_api_client/v1/api/references/create_project_reference.py index cbb21fd..5d9fee5 100644 --- a/cirro_api_client/v1/api/references/create_project_reference.py +++ b/cirro_api_client/v1/api/references/create_project_reference.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: CreateReferenceRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/references", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Reference]: +def _parse_response(*, client: Client, response: httpx.Response) -> Reference | None: if response.status_code == HTTPStatus.OK: response_200 = Reference.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: CreateReferenceRequest, -) -> Optional[Reference]: +) -> Reference | None: """Create project reference Creates a reference @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: CreateReferenceRequest, -) -> Optional[Reference]: +) -> Reference | None: """Create project reference Creates a reference diff --git a/cirro_api_client/v1/api/references/delete_project_reference.py b/cirro_api_client/v1/api/references/delete_project_reference.py index ba54693..3a7698e 100644 --- a/cirro_api_client/v1/api/references/delete_project_reference.py +++ b/cirro_api_client/v1/api/references/delete_project_reference.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -10,8 +10,8 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/projects/{project_id}/references", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/references/get_reference_types.py b/cirro_api_client/v1/api/references/get_reference_types.py index c50d7e0..2a4ece6 100644 --- a/cirro_api_client/v1/api/references/get_reference_types.py +++ b/cirro_api_client/v1/api/references/get_reference_types.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/reference-types", } @@ -18,7 +18,7 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ReferenceType"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["ReferenceType"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ReferenceType"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["ReferenceType"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["ReferenceType"]]: +) -> Response[list["ReferenceType"]]: """Get reference types List available reference types @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["ReferenceType"]]: +) -> list["ReferenceType"] | None: """Get reference types List available reference types @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["ReferenceType"]]: +) -> Response[list["ReferenceType"]]: """Get reference types List available reference types @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["ReferenceType"]]: +) -> list["ReferenceType"] | None: """Get reference types List available reference types diff --git a/cirro_api_client/v1/api/references/get_references.py b/cirro_api_client/v1/api/references/get_references.py index 97c1dd8..220db9d 100644 --- a/cirro_api_client/v1/api/references/get_references.py +++ b/cirro_api_client/v1/api/references/get_references.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/references", } @@ -18,7 +18,7 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Reference"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["Reference"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Reference"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Reference"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["Reference"]]: +) -> Response[list["Reference"]]: """Get global references List available references (available to everyone) @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["Reference"]]: +) -> list["Reference"] | None: """Get global references List available references (available to everyone) @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["Reference"]]: +) -> Response[list["Reference"]]: """Get global references List available references (available to everyone) @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["Reference"]]: +) -> list["Reference"] | None: """Get global references List available references (available to everyone) diff --git a/cirro_api_client/v1/api/references/get_references_for_project.py b/cirro_api_client/v1/api/references/get_references_for_project.py index 94e189b..1a69999 100644 --- a/cirro_api_client/v1/api/references/get_references_for_project.py +++ b/cirro_api_client/v1/api/references/get_references_for_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/references", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Reference"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["Reference"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -34,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Reference"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Reference"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +47,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[List["Reference"]]: +) -> Response[list["Reference"]]: """Get project references List available references for a given project @@ -80,7 +80,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[List["Reference"]]: +) -> list["Reference"] | None: """Get project references List available references for a given project @@ -110,7 +110,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[List["Reference"]]: +) -> Response[list["Reference"]]: """Get project references List available references for a given project @@ -140,7 +140,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[List["Reference"]]: +) -> list["Reference"] | None: """Get project references List available references for a given project diff --git a/cirro_api_client/v1/api/references/refresh_project_references.py b/cirro_api_client/v1/api/references/refresh_project_references.py index 8c913a3..1ca33cc 100644 --- a/cirro_api_client/v1/api/references/refresh_project_references.py +++ b/cirro_api_client/v1/api/references/refresh_project_references.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -10,8 +10,8 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/references", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/sharing/create_share.py b/cirro_api_client/v1/api/sharing/create_share.py index 630521a..54dcc45 100644 --- a/cirro_api_client/v1/api/sharing/create_share.py +++ b/cirro_api_client/v1/api/sharing/create_share.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: ShareInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/shares", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ShareInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create share Create a new share to publish to other projects @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ShareInput, -) -> Optional[CreateResponse]: +) -> CreateResponse | None: """Create share Create a new share to publish to other projects diff --git a/cirro_api_client/v1/api/sharing/delete_share.py b/cirro_api_client/v1/api/sharing/delete_share.py index 0de3be9..37e737d 100644 --- a/cirro_api_client/v1/api/sharing/delete_share.py +++ b/cirro_api_client/v1/api/sharing/delete_share.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, share_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/projects/{project_id}/shares/{share_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/sharing/get_discoverable_shares.py b/cirro_api_client/v1/api/sharing/get_discoverable_shares.py index c2c2d08..46b8513 100644 --- a/cirro_api_client/v1/api/sharing/get_discoverable_shares.py +++ b/cirro_api_client/v1/api/sharing/get_discoverable_shares.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/shares/discover", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Share"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["Share"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -34,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Share"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Share"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +47,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[List["Share"]]: +) -> Response[list["Share"]]: """Get discoverable shares Get shares that the project can request access to @@ -80,7 +80,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[List["Share"]]: +) -> list["Share"] | None: """Get discoverable shares Get shares that the project can request access to @@ -110,7 +110,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[List["Share"]]: +) -> Response[list["Share"]]: """Get discoverable shares Get shares that the project can request access to @@ -140,7 +140,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[List["Share"]]: +) -> list["Share"] | None: """Get discoverable shares Get shares that the project can request access to diff --git a/cirro_api_client/v1/api/sharing/get_share.py b/cirro_api_client/v1/api/sharing/get_share.py index f6a2426..0e5165f 100644 --- a/cirro_api_client/v1/api/sharing/get_share.py +++ b/cirro_api_client/v1/api/sharing/get_share.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, share_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/shares/{share_id}", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ShareDetail]: +def _parse_response(*, client: Client, response: httpx.Response) -> ShareDetail | None: if response.status_code == HTTPStatus.OK: response_200 = ShareDetail.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( share_id: str, *, client: Client, -) -> Optional[ShareDetail]: +) -> ShareDetail | None: """Get share Get details on a share that you've published or subscribed to @@ -146,7 +146,7 @@ async def asyncio( share_id: str, *, client: Client, -) -> Optional[ShareDetail]: +) -> ShareDetail | None: """Get share Get details on a share that you've published or subscribed to diff --git a/cirro_api_client/v1/api/sharing/get_shared_datasets.py b/cirro_api_client/v1/api/sharing/get_shared_datasets.py index 433cbad..b2bc777 100644 --- a/cirro_api_client/v1/api/sharing/get_shared_datasets.py +++ b/cirro_api_client/v1/api/sharing/get_shared_datasets.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( project_id: str, share_id: str, *, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} params["limit"] = limit @@ -24,7 +24,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/shares/{share_id}/datasets", "params": params, @@ -33,7 +33,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseDatasetListDto]: +def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseDatasetListDto | None: if response.status_code == HTTPStatus.OK: response_200 = PaginatedResponseDatasetListDto.from_dict(response.json()) @@ -56,8 +56,8 @@ def sync_detailed( share_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, ) -> Response[PaginatedResponseDatasetListDto]: """Get share datasets @@ -98,9 +98,9 @@ def sync( share_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseDatasetListDto]: + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, +) -> PaginatedResponseDatasetListDto | None: """Get share datasets Get dataset listing for a share @@ -137,8 +137,8 @@ async def asyncio_detailed( share_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, ) -> Response[PaginatedResponseDatasetListDto]: """Get share datasets @@ -176,9 +176,9 @@ async def asyncio( share_id: str, *, client: Client, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseDatasetListDto]: + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, +) -> PaginatedResponseDatasetListDto | None: """Get share datasets Get dataset listing for a share diff --git a/cirro_api_client/v1/api/sharing/get_shares.py b/cirro_api_client/v1/api/sharing/get_shares.py index ded07ce..1af348a 100644 --- a/cirro_api_client/v1/api/sharing/get_shares.py +++ b/cirro_api_client/v1/api/sharing/get_shares.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/shares", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Share"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["Share"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -34,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Share"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Share"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +47,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[List["Share"]]: +) -> Response[list["Share"]]: """Get shares Get shares for a project (both published and shared with the project) @@ -80,7 +80,7 @@ def sync( project_id: str, *, client: Client, -) -> Optional[List["Share"]]: +) -> list["Share"] | None: """Get shares Get shares for a project (both published and shared with the project) @@ -110,7 +110,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[List["Share"]]: +) -> Response[list["Share"]]: """Get shares Get shares for a project (both published and shared with the project) @@ -140,7 +140,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> Optional[List["Share"]]: +) -> list["Share"] | None: """Get shares Get shares for a project (both published and shared with the project) diff --git a/cirro_api_client/v1/api/sharing/subscribe_share.py b/cirro_api_client/v1/api/sharing/subscribe_share.py index cd3ae69..3a96098 100644 --- a/cirro_api_client/v1/api/sharing/subscribe_share.py +++ b/cirro_api_client/v1/api/sharing/subscribe_share.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, share_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/shares/{share_id}:subscribe", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/sharing/unsubscribe_share.py b/cirro_api_client/v1/api/sharing/unsubscribe_share.py index 86e4620..f93635c 100644 --- a/cirro_api_client/v1/api/sharing/unsubscribe_share.py +++ b/cirro_api_client/v1/api/sharing/unsubscribe_share.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, share_id: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/shares/{share_id}:unsubscribe", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/sharing/update_share.py b/cirro_api_client/v1/api/sharing/update_share.py index 2f9dbb9..2fd5c1d 100644 --- a/cirro_api_client/v1/api/sharing/update_share.py +++ b/cirro_api_client/v1/api/sharing/update_share.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( share_id: str, *, body: ShareInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/shares/{share_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/system/get_service_connections.py b/cirro_api_client/v1/api/system/get_service_connections.py index 67dadbb..98a75cf 100644 --- a/cirro_api_client/v1/api/system/get_service_connections.py +++ b/cirro_api_client/v1/api/system/get_service_connections.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/service-connections", } @@ -18,7 +18,7 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ServiceConnection"]]: +def _parse_response(*, client: Client, response: httpx.Response) -> list["ServiceConnection"] | None: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Lis errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ServiceConnection"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["ServiceConnection"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Lis def sync_detailed( *, client: Client, -) -> Response[List["ServiceConnection"]]: +) -> Response[list["ServiceConnection"]]: """Get service connections List available service connections @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[List["ServiceConnection"]]: +) -> list["ServiceConnection"] | None: """Get service connections List available service connections @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[List["ServiceConnection"]]: +) -> Response[list["ServiceConnection"]]: """Get service connections List available service connections @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[List["ServiceConnection"]]: +) -> list["ServiceConnection"] | None: """Get service connections List available service connections diff --git a/cirro_api_client/v1/api/system/info.py b/cirro_api_client/v1/api/system/info.py index c9bda11..efe8b3c 100644 --- a/cirro_api_client/v1/api/system/info.py +++ b/cirro_api_client/v1/api/system/info.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/info", } @@ -18,7 +18,7 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[SystemInfoResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> SystemInfoResponse | None: if response.status_code == HTTPStatus.OK: response_200 = SystemInfoResponse.from_dict(response.json()) @@ -63,7 +63,7 @@ def sync_detailed( def sync( *, client: Client, -) -> Optional[SystemInfoResponse]: +) -> SystemInfoResponse | None: """Get system info Raises: @@ -106,7 +106,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> Optional[SystemInfoResponse]: +) -> SystemInfoResponse | None: """Get system info Raises: diff --git a/cirro_api_client/v1/api/tools/move_dataset.py b/cirro_api_client/v1/api/tools/move_dataset.py index cf0a715..cb3b891 100644 --- a/cirro_api_client/v1/api/tools/move_dataset.py +++ b/cirro_api_client/v1/api/tools/move_dataset.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: MoveDatasetInput, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": "/tools/move-dataset", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[MoveDatasetResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> MoveDatasetResponse | None: if response.status_code == HTTPStatus.OK: response_200 = MoveDatasetResponse.from_dict(response.json()) @@ -86,7 +86,7 @@ def sync( *, client: Client, body: MoveDatasetInput, -) -> Optional[MoveDatasetResponse]: +) -> MoveDatasetResponse | None: """Move a dataset to a different project Moves a dataset to a different project. The underlying S3 data is not transferred and will need to @@ -148,7 +148,7 @@ async def asyncio( *, client: Client, body: MoveDatasetInput, -) -> Optional[MoveDatasetResponse]: +) -> MoveDatasetResponse | None: """Move a dataset to a different project Moves a dataset to a different project. The underlying S3 data is not transferred and will need to diff --git a/cirro_api_client/v1/api/users/get_user.py b/cirro_api_client/v1/api/users/get_user.py index d92c1c6..c778ed9 100644 --- a/cirro_api_client/v1/api/users/get_user.py +++ b/cirro_api_client/v1/api/users/get_user.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -11,8 +11,8 @@ def _get_kwargs( username: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/users/{username}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[UserDetail]: +def _parse_response(*, client: Client, response: httpx.Response) -> UserDetail | None: if response.status_code == HTTPStatus.OK: response_200 = UserDetail.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( username: str, *, client: Client, -) -> Optional[UserDetail]: +) -> UserDetail | None: """Get user Get user information @@ -135,7 +135,7 @@ async def asyncio( username: str, *, client: Client, -) -> Optional[UserDetail]: +) -> UserDetail | None: """Get user Get user information diff --git a/cirro_api_client/v1/api/users/invite_user.py b/cirro_api_client/v1/api/users/invite_user.py index 4ee4734..a17e1d6 100644 --- a/cirro_api_client/v1/api/users/invite_user.py +++ b/cirro_api_client/v1/api/users/invite_user.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: InviteUserRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/users", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[InviteUserResponse]: +def _parse_response(*, client: Client, response: httpx.Response) -> InviteUserResponse | None: if response.status_code == HTTPStatus.OK: response_200 = InviteUserResponse.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: InviteUserRequest, -) -> Optional[InviteUserResponse]: +) -> InviteUserResponse | None: """Invite user Invites a user to the system @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: InviteUserRequest, -) -> Optional[InviteUserResponse]: +) -> InviteUserResponse | None: """Invite user Invites a user to the system diff --git a/cirro_api_client/v1/api/users/list_users.py b/cirro_api_client/v1/api/users/list_users.py index af6323c..78ea692 100644 --- a/cirro_api_client/v1/api/users/list_users.py +++ b/cirro_api_client/v1/api/users/list_users.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any import httpx @@ -11,13 +11,13 @@ def _get_kwargs( *, - username: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} + username: None | Unset | str = UNSET, + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} - json_username: Union[None, Unset, str] + json_username: None | Unset | str if isinstance(username, Unset): json_username = UNSET else: @@ -30,7 +30,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/users", "params": params, @@ -39,7 +39,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseUserDto]: +def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseUserDto | None: if response.status_code == HTTPStatus.OK: response_200 = PaginatedResponseUserDto.from_dict(response.json()) @@ -60,9 +60,9 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Pag def sync_detailed( *, client: Client, - username: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + username: None | Unset | str = UNSET, + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, ) -> Response[PaginatedResponseUserDto]: """List users @@ -99,10 +99,10 @@ def sync_detailed( def sync( *, client: Client, - username: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseUserDto]: + username: None | Unset | str = UNSET, + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, +) -> PaginatedResponseUserDto | None: """List users Gets a list of users, matching an optional username pattern @@ -135,9 +135,9 @@ def sync( async def asyncio_detailed( *, client: Client, - username: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, + username: None | Unset | str = UNSET, + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, ) -> Response[PaginatedResponseUserDto]: """List users @@ -171,10 +171,10 @@ async def asyncio_detailed( async def asyncio( *, client: Client, - username: Union[None, Unset, str] = UNSET, - limit: Union[Unset, int] = 5000, - next_token: Union[Unset, str] = UNSET, -) -> Optional[PaginatedResponseUserDto]: + username: None | Unset | str = UNSET, + limit: Unset | int = 5000, + next_token: Unset | str = UNSET, +) -> PaginatedResponseUserDto | None: """List users Gets a list of users, matching an optional username pattern diff --git a/cirro_api_client/v1/api/users/sign_out_user.py b/cirro_api_client/v1/api/users/sign_out_user.py index c290d4d..9471e34 100644 --- a/cirro_api_client/v1/api/users/sign_out_user.py +++ b/cirro_api_client/v1/api/users/sign_out_user.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -10,8 +10,8 @@ def _get_kwargs( username: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "put", "url": f"/users/{username}:signOut", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/users/update_user.py b/cirro_api_client/v1/api/users/update_user.py index e3dad7f..4ab01f2 100644 --- a/cirro_api_client/v1/api/users/update_user.py +++ b/cirro_api_client/v1/api/users/update_user.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional +from typing import Any import httpx @@ -14,10 +14,10 @@ def _get_kwargs( username: str, *, body: UpdateUserRequest, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "put", "url": f"/users/{username}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Optional[User]: +def _parse_response(*, client: Client, response: httpx.Response) -> User | None: if response.status_code == HTTPStatus.OK: response_200 = User.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: UpdateUserRequest, -) -> Optional[User]: +) -> User | None: """Update user Update user information @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: UpdateUserRequest, -) -> Optional[User]: +) -> User | None: """Update user Update user information diff --git a/cirro_api_client/v1/api/workspaces/__init__.py b/cirro_api_client/v1/api/workspaces/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/cirro_api_client/v1/api/workspaces/connect_workspace.py b/cirro_api_client/v1/api/workspaces/connect_workspace.py new file mode 100644 index 0000000..e5f6eb6 --- /dev/null +++ b/cirro_api_client/v1/api/workspaces/connect_workspace.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import Client +from ...models.workspace_connection_response import WorkspaceConnectionResponse +from ...types import Response + + +def _get_kwargs( + project_id: str, + workspace_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/projects/{project_id}/workspaces/{workspace_id}:connect", + } + + return _kwargs + + +def _parse_response(*, client: Client, response: httpx.Response) -> WorkspaceConnectionResponse | None: + if response.status_code == HTTPStatus.ACCEPTED: + response_202 = WorkspaceConnectionResponse.from_dict(response.json()) + + return response_202 + + errors.handle_error_response(response, client.raise_on_unexpected_status) + + +def _build_response(*, client: Client, response: httpx.Response) -> Response[WorkspaceConnectionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, +) -> Response[WorkspaceConnectionResponse]: + """Connect to workspace + + Generates a URL to connect to the given workspace + + Args: + project_id (str): + workspace_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[WorkspaceConnectionResponse] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + ) + + response = client.get_httpx_client().request( + auth=client.get_auth(), + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + workspace_id: str, + *, + client: Client, +) -> WorkspaceConnectionResponse | None: + """Connect to workspace + + Generates a URL to connect to the given workspace + + Args: + project_id (str): + workspace_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + WorkspaceConnectionResponse + """ + + try: + return sync_detailed( + project_id=project_id, + workspace_id=workspace_id, + client=client, + ).parsed + except errors.NotFoundException: + return None + + +async def asyncio_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, +) -> Response[WorkspaceConnectionResponse]: + """Connect to workspace + + Generates a URL to connect to the given workspace + + Args: + project_id (str): + workspace_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[WorkspaceConnectionResponse] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + ) + + response = await client.get_async_httpx_client().request(auth=client.get_auth(), **kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + workspace_id: str, + *, + client: Client, +) -> WorkspaceConnectionResponse | None: + """Connect to workspace + + Generates a URL to connect to the given workspace + + Args: + project_id (str): + workspace_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + WorkspaceConnectionResponse + """ + + try: + return ( + await asyncio_detailed( + project_id=project_id, + workspace_id=workspace_id, + client=client, + ) + ).parsed + except errors.NotFoundException: + return None diff --git a/cirro_api_client/v1/api/workspaces/create_workspace.py b/cirro_api_client/v1/api/workspaces/create_workspace.py new file mode 100644 index 0000000..d3e4617 --- /dev/null +++ b/cirro_api_client/v1/api/workspaces/create_workspace.py @@ -0,0 +1,186 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import Client +from ...models.create_response import CreateResponse +from ...models.workspace_input import WorkspaceInput +from ...types import Response + + +def _get_kwargs( + project_id: str, + *, + body: WorkspaceInput, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/projects/{project_id}/workspaces", + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: + if response.status_code == HTTPStatus.CREATED: + response_201 = CreateResponse.from_dict(response.json()) + + return response_201 + + errors.handle_error_response(response, client.raise_on_unexpected_status) + + +def _build_response(*, client: Client, response: httpx.Response) -> Response[CreateResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + *, + client: Client, + body: WorkspaceInput, +) -> Response[CreateResponse]: + """Create workspace + + Creates a workspace within a project + + Args: + project_id (str): + body (WorkspaceInput): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CreateResponse] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = client.get_httpx_client().request( + auth=client.get_auth(), + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + *, + client: Client, + body: WorkspaceInput, +) -> CreateResponse | None: + """Create workspace + + Creates a workspace within a project + + Args: + project_id (str): + body (WorkspaceInput): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CreateResponse + """ + + try: + return sync_detailed( + project_id=project_id, + client=client, + body=body, + ).parsed + except errors.NotFoundException: + return None + + +async def asyncio_detailed( + project_id: str, + *, + client: Client, + body: WorkspaceInput, +) -> Response[CreateResponse]: + """Create workspace + + Creates a workspace within a project + + Args: + project_id (str): + body (WorkspaceInput): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CreateResponse] + """ + + kwargs = _get_kwargs( + project_id=project_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(auth=client.get_auth(), **kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + *, + client: Client, + body: WorkspaceInput, +) -> CreateResponse | None: + """Create workspace + + Creates a workspace within a project + + Args: + project_id (str): + body (WorkspaceInput): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CreateResponse + """ + + try: + return ( + await asyncio_detailed( + project_id=project_id, + client=client, + body=body, + ) + ).parsed + except errors.NotFoundException: + return None diff --git a/cirro_api_client/v1/api/workspaces/delete_workspace.py b/cirro_api_client/v1/api/workspaces/delete_workspace.py new file mode 100644 index 0000000..70abdd2 --- /dev/null +++ b/cirro_api_client/v1/api/workspaces/delete_workspace.py @@ -0,0 +1,105 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import Client +from ...types import Response + + +def _get_kwargs( + project_id: str, + workspace_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/projects/{project_id}/workspaces/{workspace_id}", + } + + return _kwargs + + +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == HTTPStatus.ACCEPTED: + return None + + errors.handle_error_response(response, client.raise_on_unexpected_status) + + +def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, +) -> Response[Any]: + """Delete workspace + + Deletes a workspace within a project + + Args: + project_id (str): + workspace_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + ) + + response = client.get_httpx_client().request( + auth=client.get_auth(), + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, +) -> Response[Any]: + """Delete workspace + + Deletes a workspace within a project + + Args: + project_id (str): + workspace_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + ) + + response = await client.get_async_httpx_client().request(auth=client.get_auth(), **kwargs) + + return _build_response(client=client, response=response) diff --git a/cirro_api_client/v1/api/workspaces/disconnect_workspace.py b/cirro_api_client/v1/api/workspaces/disconnect_workspace.py new file mode 100644 index 0000000..033d3c3 --- /dev/null +++ b/cirro_api_client/v1/api/workspaces/disconnect_workspace.py @@ -0,0 +1,120 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import Client +from ...types import UNSET, Response + + +def _get_kwargs( + project_id: str, + workspace_id: str, + *, + session_id: str, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["sessionId"] = session_id + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/projects/{project_id}/workspaces/{workspace_id}:disconnect", + "params": params, + } + + return _kwargs + + +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == HTTPStatus.ACCEPTED: + return None + + errors.handle_error_response(response, client.raise_on_unexpected_status) + + +def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, + session_id: str, +) -> Response[Any]: + """Disconnect from workspace + + Closes the connection to the given workspace + + Args: + project_id (str): + workspace_id (str): + session_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + session_id=session_id, + ) + + response = client.get_httpx_client().request( + auth=client.get_auth(), + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, + session_id: str, +) -> Response[Any]: + """Disconnect from workspace + + Closes the connection to the given workspace + + Args: + project_id (str): + workspace_id (str): + session_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + session_id=session_id, + ) + + response = await client.get_async_httpx_client().request(auth=client.get_auth(), **kwargs) + + return _build_response(client=client, response=response) diff --git a/cirro_api_client/v1/api/workspaces/get_workspace.py b/cirro_api_client/v1/api/workspaces/get_workspace.py new file mode 100644 index 0000000..cc137bd --- /dev/null +++ b/cirro_api_client/v1/api/workspaces/get_workspace.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import Client +from ...models.workspace import Workspace +from ...types import Response + + +def _get_kwargs( + project_id: str, + workspace_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/projects/{project_id}/workspaces/{workspace_id}", + } + + return _kwargs + + +def _parse_response(*, client: Client, response: httpx.Response) -> Workspace | None: + if response.status_code == HTTPStatus.OK: + response_200 = Workspace.from_dict(response.json()) + + return response_200 + + errors.handle_error_response(response, client.raise_on_unexpected_status) + + +def _build_response(*, client: Client, response: httpx.Response) -> Response[Workspace]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, +) -> Response[Workspace]: + """Get workspace + + Get details of a particular workspace + + Args: + project_id (str): + workspace_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Workspace] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + ) + + response = client.get_httpx_client().request( + auth=client.get_auth(), + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + workspace_id: str, + *, + client: Client, +) -> Workspace | None: + """Get workspace + + Get details of a particular workspace + + Args: + project_id (str): + workspace_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Workspace + """ + + try: + return sync_detailed( + project_id=project_id, + workspace_id=workspace_id, + client=client, + ).parsed + except errors.NotFoundException: + return None + + +async def asyncio_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, +) -> Response[Workspace]: + """Get workspace + + Get details of a particular workspace + + Args: + project_id (str): + workspace_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Workspace] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + ) + + response = await client.get_async_httpx_client().request(auth=client.get_auth(), **kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + workspace_id: str, + *, + client: Client, +) -> Workspace | None: + """Get workspace + + Get details of a particular workspace + + Args: + project_id (str): + workspace_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Workspace + """ + + try: + return ( + await asyncio_detailed( + project_id=project_id, + workspace_id=workspace_id, + client=client, + ) + ).parsed + except errors.NotFoundException: + return None diff --git a/cirro_api_client/v1/api/workspaces/get_workspace_environments.py b/cirro_api_client/v1/api/workspaces/get_workspace_environments.py new file mode 100644 index 0000000..37f839e --- /dev/null +++ b/cirro_api_client/v1/api/workspaces/get_workspace_environments.py @@ -0,0 +1,140 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import Client +from ...models.workspace_environment import WorkspaceEnvironment +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/workspace-environments", + } + + return _kwargs + + +def _parse_response(*, client: Client, response: httpx.Response) -> list["WorkspaceEnvironment"] | None: + if response.status_code == HTTPStatus.OK: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = WorkspaceEnvironment.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + + errors.handle_error_response(response, client.raise_on_unexpected_status) + + +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["WorkspaceEnvironment"]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[list["WorkspaceEnvironment"]]: + """Get workspace environments + + Retrieves a list of pre-defined workspace environments available to use + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[List['WorkspaceEnvironment']] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + auth=client.get_auth(), + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: Client, +) -> list["WorkspaceEnvironment"] | None: + """Get workspace environments + + Retrieves a list of pre-defined workspace environments available to use + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + List['WorkspaceEnvironment'] + """ + + try: + return sync_detailed( + client=client, + ).parsed + except errors.NotFoundException: + return None + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[list["WorkspaceEnvironment"]]: + """Get workspace environments + + Retrieves a list of pre-defined workspace environments available to use + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[List['WorkspaceEnvironment']] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(auth=client.get_auth(), **kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: Client, +) -> list["WorkspaceEnvironment"] | None: + """Get workspace environments + + Retrieves a list of pre-defined workspace environments available to use + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + List['WorkspaceEnvironment'] + """ + + try: + return ( + await asyncio_detailed( + client=client, + ) + ).parsed + except errors.NotFoundException: + return None diff --git a/cirro_api_client/v1/api/workspaces/get_workspaces.py b/cirro_api_client/v1/api/workspaces/get_workspaces.py new file mode 100644 index 0000000..efd8a9f --- /dev/null +++ b/cirro_api_client/v1/api/workspaces/get_workspaces.py @@ -0,0 +1,168 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import Client +from ...models.workspace import Workspace +from ...types import Response + + +def _get_kwargs( + project_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/projects/{project_id}/workspaces", + } + + return _kwargs + + +def _parse_response(*, client: Client, response: httpx.Response) -> list["Workspace"] | None: + if response.status_code == HTTPStatus.OK: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = Workspace.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + + errors.handle_error_response(response, client.raise_on_unexpected_status) + + +def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Workspace"]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + *, + client: Client, +) -> Response[list["Workspace"]]: + """Get workspaces + + Retrieves a list of workspaces that the user has access to + + Args: + project_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[List['Workspace']] + """ + + kwargs = _get_kwargs( + project_id=project_id, + ) + + response = client.get_httpx_client().request( + auth=client.get_auth(), + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_id: str, + *, + client: Client, +) -> list["Workspace"] | None: + """Get workspaces + + Retrieves a list of workspaces that the user has access to + + Args: + project_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + List['Workspace'] + """ + + try: + return sync_detailed( + project_id=project_id, + client=client, + ).parsed + except errors.NotFoundException: + return None + + +async def asyncio_detailed( + project_id: str, + *, + client: Client, +) -> Response[list["Workspace"]]: + """Get workspaces + + Retrieves a list of workspaces that the user has access to + + Args: + project_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[List['Workspace']] + """ + + kwargs = _get_kwargs( + project_id=project_id, + ) + + response = await client.get_async_httpx_client().request(auth=client.get_auth(), **kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_id: str, + *, + client: Client, +) -> list["Workspace"] | None: + """Get workspaces + + Retrieves a list of workspaces that the user has access to + + Args: + project_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + List['Workspace'] + """ + + try: + return ( + await asyncio_detailed( + project_id=project_id, + client=client, + ) + ).parsed + except errors.NotFoundException: + return None diff --git a/cirro_api_client/v1/api/workspaces/start_workspace.py b/cirro_api_client/v1/api/workspaces/start_workspace.py new file mode 100644 index 0000000..db66f8c --- /dev/null +++ b/cirro_api_client/v1/api/workspaces/start_workspace.py @@ -0,0 +1,105 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import Client +from ...types import Response + + +def _get_kwargs( + project_id: str, + workspace_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/projects/{project_id}/workspaces/{workspace_id}:start", + } + + return _kwargs + + +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == HTTPStatus.ACCEPTED: + return None + + errors.handle_error_response(response, client.raise_on_unexpected_status) + + +def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, +) -> Response[Any]: + """Start workspace + + Starts a workspace instance + + Args: + project_id (str): + workspace_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + ) + + response = client.get_httpx_client().request( + auth=client.get_auth(), + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, +) -> Response[Any]: + """Start workspace + + Starts a workspace instance + + Args: + project_id (str): + workspace_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + ) + + response = await client.get_async_httpx_client().request(auth=client.get_auth(), **kwargs) + + return _build_response(client=client, response=response) diff --git a/cirro_api_client/v1/api/workspaces/stop_workspace.py b/cirro_api_client/v1/api/workspaces/stop_workspace.py new file mode 100644 index 0000000..22e0a7d --- /dev/null +++ b/cirro_api_client/v1/api/workspaces/stop_workspace.py @@ -0,0 +1,105 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import Client +from ...types import Response + + +def _get_kwargs( + project_id: str, + workspace_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/projects/{project_id}/workspaces/{workspace_id}:stop", + } + + return _kwargs + + +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == HTTPStatus.ACCEPTED: + return None + + errors.handle_error_response(response, client.raise_on_unexpected_status) + + +def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, +) -> Response[Any]: + """Stop workspace + + Shuts down a running workspace instance + + Args: + project_id (str): + workspace_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + ) + + response = client.get_httpx_client().request( + auth=client.get_auth(), + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, +) -> Response[Any]: + """Stop workspace + + Shuts down a running workspace instance + + Args: + project_id (str): + workspace_id (str): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + ) + + response = await client.get_async_httpx_client().request(auth=client.get_auth(), **kwargs) + + return _build_response(client=client, response=response) diff --git a/cirro_api_client/v1/api/workspaces/update_workspace.py b/cirro_api_client/v1/api/workspaces/update_workspace.py new file mode 100644 index 0000000..cb4ad95 --- /dev/null +++ b/cirro_api_client/v1/api/workspaces/update_workspace.py @@ -0,0 +1,122 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import Client +from ...models.workspace_input import WorkspaceInput +from ...types import Response + + +def _get_kwargs( + project_id: str, + workspace_id: str, + *, + body: WorkspaceInput, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": f"/projects/{project_id}/workspaces/{workspace_id}", + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: + if response.status_code == HTTPStatus.OK: + return None + + errors.handle_error_response(response, client.raise_on_unexpected_status) + + +def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, + body: WorkspaceInput, +) -> Response[Any]: + """Update workspace + + Updates a workspace within a project + + Args: + project_id (str): + workspace_id (str): + body (WorkspaceInput): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + body=body, + ) + + response = client.get_httpx_client().request( + auth=client.get_auth(), + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_id: str, + workspace_id: str, + *, + client: Client, + body: WorkspaceInput, +) -> Response[Any]: + """Update workspace + + Updates a workspace within a project + + Args: + project_id (str): + workspace_id (str): + body (WorkspaceInput): + client (Client): instance of the API client + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_id=project_id, + workspace_id=workspace_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(auth=client.get_auth(), **kwargs) + + return _build_response(client=client, response=response) diff --git a/cirro_api_client/v1/client.py b/cirro_api_client/v1/client.py index f2816dc..2de3fa6 100644 --- a/cirro_api_client/v1/client.py +++ b/cirro_api_client/v1/client.py @@ -1,5 +1,5 @@ import ssl -from typing import Any, Dict, Optional, Union +from typing import Any import httpx from attrs import define, evolve, field @@ -39,19 +39,19 @@ class Client: raise_on_unexpected_status: bool = field(default=False, kw_only=True) auth_method: httpx.Auth = field(default=None, kw_only=True) _base_url: str - _cookies: Dict[str, str] = field(factory=dict, kw_only=True) - _headers: Dict[str, str] = field(factory=dict, kw_only=True) - _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True) - _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True) + _cookies: dict[str, str] = field(factory=dict, kw_only=True) + _headers: dict[str, str] = field(factory=dict, kw_only=True) + _timeout: httpx.Timeout | None = field(default=None, kw_only=True) + _verify_ssl: str | bool | ssl.SSLContext = field(default=True, kw_only=True) _follow_redirects: bool = field(default=False, kw_only=True) - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True) - _client: Optional[httpx.Client] = field(default=None, init=False) - _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True) + _client: httpx.Client | None = field(default=None, init=False) + _async_client: httpx.AsyncClient | None = field(default=None, init=False) def get_auth(self): return self.auth_method - def with_headers(self, headers: Dict[str, str]) -> "Client": + def with_headers(self, headers: dict[str, str]) -> "Client": """Get a new client matching this one with additional headers""" if self._client is not None: self._client.headers.update(headers) @@ -59,7 +59,7 @@ def with_headers(self, headers: Dict[str, str]) -> "Client": self._async_client.headers.update(headers) return evolve(self, headers={**self._headers, **headers}) - def with_cookies(self, cookies: Dict[str, str]) -> "Client": + def with_cookies(self, cookies: dict[str, str]) -> "Client": """Get a new client matching this one with additional cookies""" if self._client is not None: self._client.cookies.update(cookies) diff --git a/cirro_api_client/v1/errors.py b/cirro_api_client/v1/errors.py index c679971..413e2b4 100644 --- a/cirro_api_client/v1/errors.py +++ b/cirro_api_client/v1/errors.py @@ -1,7 +1,6 @@ """Contains shared errors types that can be raised from API functions""" from http import HTTPStatus -from typing import Dict import httpx @@ -38,7 +37,7 @@ def __init__(self, status_code: int, content: bytes): class CirroException(Exception): """Raised when the server returns a known error response""" - def __init__(self, error_response_data: Dict): + def __init__(self, error_response_data: dict): self.error_response = PortalErrorResponse.from_dict(error_response_data) super().__init__(self.error_response.error_detail) diff --git a/cirro_api_client/v1/models/__init__.py b/cirro_api_client/v1/models/__init__.py index 17617b0..5bdcb1d 100644 --- a/cirro_api_client/v1/models/__init__.py +++ b/cirro_api_client/v1/models/__init__.py @@ -35,6 +35,7 @@ from .compute_environment_configuration_properties import ComputeEnvironmentConfigurationProperties from .contact import Contact from .contact_input import ContactInput +from .cost_response import CostResponse from .create_notebook_instance_request import CreateNotebookInstanceRequest from .create_project_access_request import CreateProjectAccessRequest from .create_reference_request import CreateReferenceRequest @@ -59,6 +60,7 @@ from .dataset_detail_params import DatasetDetailParams from .dataset_detail_source_sample_files_map import DatasetDetailSourceSampleFilesMap from .dataset_viz import DatasetViz +from .dataset_viz_config import DatasetVizConfig from .discussion import Discussion from .discussion_input import DiscussionInput from .discussion_type import DiscussionType @@ -95,6 +97,7 @@ from .governance_scope import GovernanceScope from .governance_training_verification import GovernanceTrainingVerification from .governance_type import GovernanceType +from .group_cost import GroupCost from .import_data_request import ImportDataRequest from .invite_user_request import InviteUserRequest from .invite_user_response import InviteUserResponse @@ -106,6 +109,7 @@ from .message_type import MessageType from .metric_record import MetricRecord from .metric_record_services import MetricRecordServices +from .mounted_dataset import MountedDataset from .move_dataset_input import MoveDatasetInput from .move_dataset_response import MoveDatasetResponse from .named_item import NamedItem @@ -158,6 +162,7 @@ from .share_detail import ShareDetail from .share_input import ShareInput from .share_type import ShareType +from .sharing_type import SharingType from .sort_order import SortOrder from .status import Status from .stop_execution_response import StopExecutionResponse @@ -166,6 +171,7 @@ from .table import Table from .tag import Tag from .task import Task +from .task_cost import TaskCost from .tenant_info import TenantInfo from .update_dataset_request import UpdateDatasetRequest from .update_user_request import UpdateUserRequest @@ -177,6 +183,14 @@ from .user_settings import UserSettings from .validate_file_name_patterns_request import ValidateFileNamePatternsRequest from .validate_file_requirements_request import ValidateFileRequirementsRequest +from .version_specification import VersionSpecification +from .workspace import Workspace +from .workspace_compute_config import WorkspaceComputeConfig +from .workspace_compute_config_environment_variables_type_0 import WorkspaceComputeConfigEnvironmentVariablesType0 +from .workspace_connection_response import WorkspaceConnectionResponse +from .workspace_environment import WorkspaceEnvironment +from .workspace_input import WorkspaceInput +from .workspace_session import WorkspaceSession __all__ = ( "Agent", @@ -214,6 +228,7 @@ "ComputeEnvironmentConfigurationProperties", "Contact", "ContactInput", + "CostResponse", "CreateNotebookInstanceRequest", "CreateProjectAccessRequest", "CreateReferenceRequest", @@ -238,6 +253,7 @@ "DatasetDetailParams", "DatasetDetailSourceSampleFilesMap", "DatasetViz", + "DatasetVizConfig", "Discussion", "DiscussionInput", "DiscussionType", @@ -274,6 +290,7 @@ "GovernanceScope", "GovernanceTrainingVerification", "GovernanceType", + "GroupCost", "ImportDataRequest", "InviteUserRequest", "InviteUserResponse", @@ -285,6 +302,7 @@ "MessageType", "MetricRecord", "MetricRecordServices", + "MountedDataset", "MoveDatasetInput", "MoveDatasetResponse", "NamedItem", @@ -337,6 +355,7 @@ "ShareDetail", "ShareInput", "ShareType", + "SharingType", "SortOrder", "Status", "StopExecutionResponse", @@ -345,6 +364,7 @@ "Table", "Tag", "Task", + "TaskCost", "TenantInfo", "UpdateDatasetRequest", "UpdateUserRequest", @@ -356,4 +376,12 @@ "UserSettings", "ValidateFileNamePatternsRequest", "ValidateFileRequirementsRequest", + "VersionSpecification", + "Workspace", + "WorkspaceComputeConfig", + "WorkspaceComputeConfigEnvironmentVariablesType0", + "WorkspaceConnectionResponse", + "WorkspaceEnvironment", + "WorkspaceInput", + "WorkspaceSession", ) diff --git a/cirro_api_client/v1/models/agent.py b/cirro_api_client/v1/models/agent.py index 54f6f68..12d91cd 100644 --- a/cirro_api_client/v1/models/agent.py +++ b/cirro_api_client/v1/models/agent.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,23 +25,23 @@ class Agent: """ status: AgentStatus - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET + id: Unset | str = UNSET + name: Unset | str = UNSET tags: Union[Unset, "AgentTags"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: status = self.status.value id = self.id name = self.name - tags: Union[Unset, Dict[str, Any]] = UNSET + tags: Unset | dict[str, Any] = UNSET if not isinstance(self.tags, Unset): tags = self.tags.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -58,7 +58,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.agent_tags import AgentTags d = src_dict.copy() @@ -69,7 +69,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: name = d.pop("name", UNSET) _tags = d.pop("tags", UNSET) - tags: Union[Unset, AgentTags] + tags: Unset | AgentTags if isinstance(_tags, Unset): tags = UNSET else: @@ -86,5 +86,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return agent @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_detail.py b/cirro_api_client/v1/models/agent_detail.py index f5a09c2..3ec130a 100644 --- a/cirro_api_client/v1/models/agent_detail.py +++ b/cirro_api_client/v1/models/agent_detail.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -43,9 +43,9 @@ class AgentDetail: registration: Union["AgentRegistration", None, Unset] = UNSET tags: Union["AgentDetailTags", None, Unset] = UNSET environment_configuration: Union["AgentDetailEnvironmentConfiguration", None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.agent_detail_environment_configuration import AgentDetailEnvironmentConfiguration from ..models.agent_detail_tags import AgentDetailTags from ..models.agent_registration import AgentRegistration @@ -64,7 +64,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - registration: Union[Dict[str, Any], None, Unset] + registration: dict[str, Any] | None | Unset if isinstance(self.registration, Unset): registration = UNSET elif isinstance(self.registration, AgentRegistration): @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: else: registration = self.registration - tags: Union[Dict[str, Any], None, Unset] + tags: dict[str, Any] | None | Unset if isinstance(self.tags, Unset): tags = UNSET elif isinstance(self.tags, AgentDetailTags): @@ -80,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: else: tags = self.tags - environment_configuration: Union[Dict[str, Any], None, Unset] + environment_configuration: dict[str, Any] | None | Unset if isinstance(self.environment_configuration, Unset): environment_configuration = UNSET elif isinstance(self.environment_configuration, AgentDetailEnvironmentConfiguration): @@ -88,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: else: environment_configuration = self.environment_configuration - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -111,7 +111,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.agent_detail_environment_configuration import AgentDetailEnvironmentConfiguration from ..models.agent_detail_tags import AgentDetailTags from ..models.agent_registration import AgentRegistration @@ -199,5 +199,5 @@ def _parse_environment_configuration(data: object) -> Union["AgentDetailEnvironm return agent_detail @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_detail_environment_configuration.py b/cirro_api_client/v1/models/agent_detail_environment_configuration.py index f0990c5..9cbcaa4 100644 --- a/cirro_api_client/v1/models/agent_detail_environment_configuration.py +++ b/cirro_api_client/v1/models/agent_detail_environment_configuration.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class AgentDetailEnvironmentConfiguration: """ """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() agent_detail_environment_configuration = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return agent_detail_environment_configuration @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_detail_tags.py b/cirro_api_client/v1/models/agent_detail_tags.py index fdd3e93..bb67ec2 100644 --- a/cirro_api_client/v1/models/agent_detail_tags.py +++ b/cirro_api_client/v1/models/agent_detail_tags.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class AgentDetailTags: """ """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() agent_detail_tags = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return agent_detail_tags @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_input.py b/cirro_api_client/v1/models/agent_input.py index bf7447e..0238673 100644 --- a/cirro_api_client/v1/models/agent_input.py +++ b/cirro_api_client/v1/models/agent_input.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -31,13 +31,13 @@ class AgentInput: name: str agent_role_arn: str - id: Union[None, Unset, str] = UNSET + id: None | Unset | str = UNSET configuration_options_schema: Union["AgentInputConfigurationOptionsSchema", None, Unset] = UNSET environment_configuration: Union["AgentInputEnvironmentConfiguration", None, Unset] = UNSET tags: Union["AgentInputTags", None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.agent_input_configuration_options_schema import AgentInputConfigurationOptionsSchema from ..models.agent_input_environment_configuration import AgentInputEnvironmentConfiguration from ..models.agent_input_tags import AgentInputTags @@ -46,13 +46,13 @@ def to_dict(self) -> Dict[str, Any]: agent_role_arn = self.agent_role_arn - id: Union[None, Unset, str] + id: None | Unset | str if isinstance(self.id, Unset): id = UNSET else: id = self.id - configuration_options_schema: Union[Dict[str, Any], None, Unset] + configuration_options_schema: dict[str, Any] | None | Unset if isinstance(self.configuration_options_schema, Unset): configuration_options_schema = UNSET elif isinstance(self.configuration_options_schema, AgentInputConfigurationOptionsSchema): @@ -60,7 +60,7 @@ def to_dict(self) -> Dict[str, Any]: else: configuration_options_schema = self.configuration_options_schema - environment_configuration: Union[Dict[str, Any], None, Unset] + environment_configuration: dict[str, Any] | None | Unset if isinstance(self.environment_configuration, Unset): environment_configuration = UNSET elif isinstance(self.environment_configuration, AgentInputEnvironmentConfiguration): @@ -68,7 +68,7 @@ def to_dict(self) -> Dict[str, Any]: else: environment_configuration = self.environment_configuration - tags: Union[Dict[str, Any], None, Unset] + tags: dict[str, Any] | None | Unset if isinstance(self.tags, Unset): tags = UNSET elif isinstance(self.tags, AgentInputTags): @@ -76,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: else: tags = self.tags - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -96,7 +96,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.agent_input_configuration_options_schema import AgentInputConfigurationOptionsSchema from ..models.agent_input_environment_configuration import AgentInputEnvironmentConfiguration from ..models.agent_input_tags import AgentInputTags @@ -106,12 +106,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: agent_role_arn = d.pop("agentRoleArn") - def _parse_id(data: object) -> Union[None, Unset, str]: + def _parse_id(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) id = _parse_id(d.pop("id", UNSET)) @@ -181,5 +181,5 @@ def _parse_tags(data: object) -> Union["AgentInputTags", None, Unset]: return agent_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_input_configuration_options_schema.py b/cirro_api_client/v1/models/agent_input_configuration_options_schema.py index af170ad..18fece7 100644 --- a/cirro_api_client/v1/models/agent_input_configuration_options_schema.py +++ b/cirro_api_client/v1/models/agent_input_configuration_options_schema.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class AgentInputConfigurationOptionsSchema: """The configuration options available for the agent""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() agent_input_configuration_options_schema = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return agent_input_configuration_options_schema @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_input_environment_configuration.py b/cirro_api_client/v1/models/agent_input_environment_configuration.py index 7c5ac6d..a3d34fd 100644 --- a/cirro_api_client/v1/models/agent_input_environment_configuration.py +++ b/cirro_api_client/v1/models/agent_input_environment_configuration.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,17 +15,17 @@ class AgentInputEnvironmentConfiguration: """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() agent_input_environment_configuration = cls() @@ -33,5 +33,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return agent_input_environment_configuration @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_input_tags.py b/cirro_api_client/v1/models/agent_input_tags.py index ccfba73..1cc7580 100644 --- a/cirro_api_client/v1/models/agent_input_tags.py +++ b/cirro_api_client/v1/models/agent_input_tags.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,17 +15,17 @@ class AgentInputTags: """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() agent_input_tags = cls() @@ -33,5 +33,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return agent_input_tags @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_registration.py b/cirro_api_client/v1/models/agent_registration.py index 1f2914f..c3f18a5 100644 --- a/cirro_api_client/v1/models/agent_registration.py +++ b/cirro_api_client/v1/models/agent_registration.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +22,9 @@ class AgentRegistration: agent_version: str hostname: str os: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: local_ip = self.local_ip remote_ip = self.remote_ip @@ -35,7 +35,7 @@ def to_dict(self) -> Dict[str, Any]: os = self.os - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -50,7 +50,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() local_ip = d.pop("localIp") @@ -74,5 +74,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return agent_registration @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_tags.py b/cirro_api_client/v1/models/agent_tags.py index 2da7cc5..8ef63d0 100644 --- a/cirro_api_client/v1/models/agent_tags.py +++ b/cirro_api_client/v1/models/agent_tags.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class AgentTags: """Tags associated with the agent""" - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() agent_tags = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return agent_tags @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/allowed_data_type.py b/cirro_api_client/v1/models/allowed_data_type.py index f584e2c..a1e305d 100644 --- a/cirro_api_client/v1/models/allowed_data_type.py +++ b/cirro_api_client/v1/models/allowed_data_type.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,10 +21,10 @@ class AllowedDataType: description: str error_msg: str - allowed_patterns: List["FileNamePattern"] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + allowed_patterns: list["FileNamePattern"] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: description = self.description error_msg = self.error_msg @@ -34,7 +34,7 @@ def to_dict(self) -> Dict[str, Any]: allowed_patterns_item = allowed_patterns_item_data.to_dict() allowed_patterns.append(allowed_patterns_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -47,7 +47,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.file_name_pattern import FileNamePattern d = src_dict.copy() @@ -72,5 +72,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return allowed_data_type @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/approve_project_access_request.py b/cirro_api_client/v1/models/approve_project_access_request.py index 5f47c56..2770484 100644 --- a/cirro_api_client/v1/models/approve_project_access_request.py +++ b/cirro_api_client/v1/models/approve_project_access_request.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,12 +16,12 @@ class ApproveProjectAccessRequest: """ role: ProjectRole - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: role = self.role.value - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -32,7 +32,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() role = ProjectRole(d.pop("role")) @@ -44,5 +44,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return approve_project_access_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/artifact.py b/cirro_api_client/v1/models/artifact.py index f9c70fd..a2ecd4f 100644 --- a/cirro_api_client/v1/models/artifact.py +++ b/cirro_api_client/v1/models/artifact.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,14 +19,14 @@ class Artifact: type: ArtifactType path: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: type = self.type.value path = self.path - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -38,7 +38,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() type = ArtifactType(d.pop("type")) @@ -53,5 +53,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return artifact @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/artifact_type.py b/cirro_api_client/v1/models/artifact_type.py index 7bc0eee..6732628 100644 --- a/cirro_api_client/v1/models/artifact_type.py +++ b/cirro_api_client/v1/models/artifact_type.py @@ -3,31 +3,18 @@ class ArtifactType(str, Enum): FILES = "FILES" - """ Files used in the workflow """ INGEST_MANIFEST = "INGEST_MANIFEST" - """ Files expected to upload """ METADATA = "METADATA" - """ Snapshot of metadata at the time of execution """ SAMPLE_SHEET = "SAMPLE_SHEET" - """ Samples used in the workflow """ WORKFLOW_COMPUTE_CONFIG = "WORKFLOW_COMPUTE_CONFIG" - """ Compute overrides used in the workflow """ WORKFLOW_DAG = "WORKFLOW_DAG" - """ Direct acyclic graph of workflow execution """ WORKFLOW_DEBUG_LOGS = "WORKFLOW_DEBUG_LOGS" - """ Debug logs from workflow engine """ WORKFLOW_LOGS = "WORKFLOW_LOGS" - """ Logs from workflow engine """ WORKFLOW_OPTIONS = "WORKFLOW_OPTIONS" - """ Options used in the workflow """ WORKFLOW_PARAMETERS = "WORKFLOW_PARAMETERS" - """ Parameters used in the workflow """ WORKFLOW_REPORT = "WORKFLOW_REPORT" - """ Execution report from workflow engine """ WORKFLOW_TIMELINE = "WORKFLOW_TIMELINE" - """ Timeline of workflow execution """ WORKFLOW_TRACE = "WORKFLOW_TRACE" - """ Trace of workflow execution """ UNKNOWN = "UNKNOWN" """ This is a fallback value for when the value is not known, do not use this value when making requests """ diff --git a/cirro_api_client/v1/models/audit_event.py b/cirro_api_client/v1/models/audit_event.py index 6376582..7700104 100644 --- a/cirro_api_client/v1/models/audit_event.py +++ b/cirro_api_client/v1/models/audit_event.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -33,19 +33,19 @@ class AuditEvent: created_at (Union[Unset, datetime.datetime]): The date and time the event was created """ - id: Union[Unset, str] = UNSET - event_type: Union[Unset, str] = UNSET - project_id: Union[Unset, str] = UNSET - entity_id: Union[Unset, str] = UNSET - entity_type: Union[Unset, str] = UNSET + id: Unset | str = UNSET + event_type: Unset | str = UNSET + project_id: Unset | str = UNSET + entity_id: Unset | str = UNSET + entity_type: Unset | str = UNSET event_detail: Union["AuditEventEventDetail", None, Unset] = UNSET changes: Union["AuditEventChanges", None, Unset] = UNSET - username: Union[Unset, str] = UNSET - ip_address: Union[Unset, str] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + username: Unset | str = UNSET + ip_address: Unset | str = UNSET + created_at: Unset | datetime.datetime = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.audit_event_changes import AuditEventChanges from ..models.audit_event_event_detail import AuditEventEventDetail @@ -59,7 +59,7 @@ def to_dict(self) -> Dict[str, Any]: entity_type = self.entity_type - event_detail: Union[Dict[str, Any], None, Unset] + event_detail: dict[str, Any] | None | Unset if isinstance(self.event_detail, Unset): event_detail = UNSET elif isinstance(self.event_detail, AuditEventEventDetail): @@ -67,7 +67,7 @@ def to_dict(self) -> Dict[str, Any]: else: event_detail = self.event_detail - changes: Union[Dict[str, Any], None, Unset] + changes: dict[str, Any] | None | Unset if isinstance(self.changes, Unset): changes = UNSET elif isinstance(self.changes, AuditEventChanges): @@ -79,11 +79,11 @@ def to_dict(self) -> Dict[str, Any]: ip_address = self.ip_address - created_at: Union[Unset, str] = UNSET + created_at: Unset | str = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if id is not UNSET: @@ -110,7 +110,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.audit_event_changes import AuditEventChanges from ..models.audit_event_event_detail import AuditEventEventDetail @@ -164,7 +164,7 @@ def _parse_changes(data: object) -> Union["AuditEventChanges", None, Unset]: ip_address = d.pop("ipAddress", UNSET) _created_at = d.pop("createdAt", UNSET) - created_at: Union[Unset, datetime.datetime] + created_at: Unset | datetime.datetime if isinstance(_created_at, Unset): created_at = UNSET else: @@ -187,5 +187,5 @@ def _parse_changes(data: object) -> Union["AuditEventChanges", None, Unset]: return audit_event @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/audit_event_changes.py b/cirro_api_client/v1/models/audit_event_changes.py index c99871f..fc814c5 100644 --- a/cirro_api_client/v1/models/audit_event_changes.py +++ b/cirro_api_client/v1/models/audit_event_changes.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,17 +15,17 @@ class AuditEventChanges: """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() audit_event_changes = cls() @@ -33,5 +33,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return audit_event_changes @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/audit_event_event_detail.py b/cirro_api_client/v1/models/audit_event_event_detail.py index ca9ab44..c05d037 100644 --- a/cirro_api_client/v1/models/audit_event_event_detail.py +++ b/cirro_api_client/v1/models/audit_event_event_detail.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class AuditEventEventDetail: """The details of the event, such as the request details sent from the client""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() audit_event_event_detail = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return audit_event_event_detail @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/auth_info.py b/cirro_api_client/v1/models/auth_info.py index 50cbf3a..3776f89 100644 --- a/cirro_api_client/v1/models/auth_info.py +++ b/cirro_api_client/v1/models/auth_info.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +22,9 @@ class AuthInfo: ui_app_id: str drive_app_id: str endpoint: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: user_pool_id = self.user_pool_id sdk_app_id = self.sdk_app_id @@ -35,7 +35,7 @@ def to_dict(self) -> Dict[str, Any]: endpoint = self.endpoint - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -50,7 +50,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() user_pool_id = d.pop("userPoolId") @@ -74,5 +74,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return auth_info @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/aws_credentials.py b/cirro_api_client/v1/models/aws_credentials.py index b3854a6..b66f042 100644 --- a/cirro_api_client/v1/models/aws_credentials.py +++ b/cirro_api_client/v1/models/aws_credentials.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,10 +25,10 @@ class AWSCredentials: secret_access_key: str session_token: str expiration: datetime.datetime - region: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + region: Unset | str = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: access_key_id = self.access_key_id secret_access_key = self.secret_access_key @@ -39,7 +39,7 @@ def to_dict(self) -> Dict[str, Any]: region = self.region - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -55,7 +55,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() access_key_id = d.pop("accessKeyId") @@ -79,5 +79,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return aws_credentials @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/billing_account.py b/cirro_api_client/v1/models/billing_account.py index 9c162a2..86989d9 100644 --- a/cirro_api_client/v1/models/billing_account.py +++ b/cirro_api_client/v1/models/billing_account.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -32,16 +32,16 @@ class BillingAccount: id: str name: str organization: str - contacts: List["Contact"] + contacts: list["Contact"] customer_type: CustomerType billing_method: BillingMethod primary_budget_number: str owner: str - shared_with: List[str] + shared_with: list[str] is_archived: bool - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -65,7 +65,7 @@ def to_dict(self) -> Dict[str, Any]: is_archived = self.is_archived - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -85,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.contact import Contact d = src_dict.copy() @@ -110,7 +110,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: owner = d.pop("owner") - shared_with = cast(List[str], d.pop("sharedWith")) + shared_with = cast(list[str], d.pop("sharedWith")) is_archived = d.pop("isArchived") @@ -131,5 +131,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return billing_account @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/billing_account_request.py b/cirro_api_client/v1/models/billing_account_request.py index 7351d24..cd83db2 100644 --- a/cirro_api_client/v1/models/billing_account_request.py +++ b/cirro_api_client/v1/models/billing_account_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -27,15 +27,15 @@ class BillingAccountRequest: """ name: str - contacts: List["Contact"] + contacts: list["Contact"] customer_type: CustomerType billing_method: BillingMethod primary_budget_number: str owner: str - shared_with: List[str] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + shared_with: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name contacts = [] @@ -53,7 +53,7 @@ def to_dict(self) -> Dict[str, Any]: shared_with = self.shared_with - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -70,7 +70,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.contact import Contact d = src_dict.copy() @@ -91,7 +91,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: owner = d.pop("owner") - shared_with = cast(List[str], d.pop("sharedWith")) + shared_with = cast(list[str], d.pop("sharedWith")) billing_account_request = cls( name=name, @@ -107,5 +107,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return billing_account_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/calculate_pipeline_cost_request.py b/cirro_api_client/v1/models/calculate_pipeline_cost_request.py index 98ea5c6..b22e89e 100644 --- a/cirro_api_client/v1/models/calculate_pipeline_cost_request.py +++ b/cirro_api_client/v1/models/calculate_pipeline_cost_request.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class CalculatePipelineCostRequest: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() calculate_pipeline_cost_request = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return calculate_pipeline_cost_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/classification_input.py b/cirro_api_client/v1/models/classification_input.py index e202904..0b2432a 100644 --- a/cirro_api_client/v1/models/classification_input.py +++ b/cirro_api_client/v1/models/classification_input.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,17 +17,17 @@ class ClassificationInput: name: str description: str - requirement_ids: List[str] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + requirement_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description requirement_ids = self.requirement_ids - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,13 +40,13 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") description = d.pop("description") - requirement_ids = cast(List[str], d.pop("requirementIds")) + requirement_ids = cast(list[str], d.pop("requirementIds")) classification_input = cls( name=name, @@ -58,5 +58,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return classification_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/cloud_account.py b/cirro_api_client/v1/models/cloud_account.py index 04bade4..3f8d18d 100644 --- a/cirro_api_client/v1/models/cloud_account.py +++ b/cirro_api_client/v1/models/cloud_account.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,12 +21,12 @@ class CloudAccount: """ account_type: CloudAccountType - account_id: Union[Unset, str] = UNSET - account_name: Union[Unset, str] = UNSET - region_name: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + account_id: Unset | str = UNSET + account_name: Unset | str = UNSET + region_name: Unset | str = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: account_type = self.account_type.value account_id = self.account_id @@ -35,7 +35,7 @@ def to_dict(self) -> Dict[str, Any]: region_name = self.region_name - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -52,7 +52,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() account_type = CloudAccountType(d.pop("accountType")) @@ -73,5 +73,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return cloud_account @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/column_definition.py b/cirro_api_client/v1/models/column_definition.py index 9b93224..339de1b 100644 --- a/cirro_api_client/v1/models/column_definition.py +++ b/cirro_api_client/v1/models/column_definition.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,19 +17,19 @@ class ColumnDefinition: desc (Union[Unset, str]): Description of the column """ - col: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - desc: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + col: Unset | str = UNSET + name: Unset | str = UNSET + desc: Unset | str = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: col = self.col name = self.name desc = self.desc - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if col is not UNSET: @@ -42,7 +42,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() col = d.pop("col", UNSET) @@ -60,5 +60,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return column_definition @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/compute_environment_configuration.py b/cirro_api_client/v1/models/compute_environment_configuration.py index d4bbbb7..da9be40 100644 --- a/cirro_api_client/v1/models/compute_environment_configuration.py +++ b/cirro_api_client/v1/models/compute_environment_configuration.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -34,14 +34,14 @@ class ComputeEnvironmentConfiguration: environment_type: EnvironmentType created_at: datetime.datetime updated_at: datetime.datetime - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET + id: Unset | str = UNSET + name: Unset | str = UNSET properties: Union[Unset, "ComputeEnvironmentConfigurationProperties"] = UNSET agent: Union["Agent", None, Unset] = UNSET - created_by: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + created_by: Unset | str = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.agent import Agent environment_type = self.environment_type.value @@ -54,11 +54,11 @@ def to_dict(self) -> Dict[str, Any]: name = self.name - properties: Union[Unset, Dict[str, Any]] = UNSET + properties: Unset | dict[str, Any] = UNSET if not isinstance(self.properties, Unset): properties = self.properties.to_dict() - agent: Union[Dict[str, Any], None, Unset] + agent: dict[str, Any] | None | Unset if isinstance(self.agent, Unset): agent = UNSET elif isinstance(self.agent, Agent): @@ -68,7 +68,7 @@ def to_dict(self) -> Dict[str, Any]: created_by = self.created_by - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -91,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.agent import Agent from ..models.compute_environment_configuration_properties import ComputeEnvironmentConfigurationProperties @@ -107,7 +107,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: name = d.pop("name", UNSET) _properties = d.pop("properties", UNSET) - properties: Union[Unset, ComputeEnvironmentConfigurationProperties] + properties: Unset | ComputeEnvironmentConfigurationProperties if isinstance(_properties, Unset): properties = UNSET else: @@ -147,5 +147,5 @@ def _parse_agent(data: object) -> Union["Agent", None, Unset]: return compute_environment_configuration @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/compute_environment_configuration_input.py b/cirro_api_client/v1/models/compute_environment_configuration_input.py index 61591cc..1a4fc4d 100644 --- a/cirro_api_client/v1/models/compute_environment_configuration_input.py +++ b/cirro_api_client/v1/models/compute_environment_configuration_input.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,24 +24,24 @@ class ComputeEnvironmentConfigurationInput: """ name: str - agent_id: Union[None, Unset, str] = UNSET + agent_id: None | Unset | str = UNSET properties: Union["ComputeEnvironmentConfigurationInputProperties", None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.compute_environment_configuration_input_properties import ( ComputeEnvironmentConfigurationInputProperties, ) name = self.name - agent_id: Union[None, Unset, str] + agent_id: None | Unset | str if isinstance(self.agent_id, Unset): agent_id = UNSET else: agent_id = self.agent_id - properties: Union[Dict[str, Any], None, Unset] + properties: dict[str, Any] | None | Unset if isinstance(self.properties, Unset): properties = UNSET elif isinstance(self.properties, ComputeEnvironmentConfigurationInputProperties): @@ -49,7 +49,7 @@ def to_dict(self) -> Dict[str, Any]: else: properties = self.properties - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -64,7 +64,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.compute_environment_configuration_input_properties import ( ComputeEnvironmentConfigurationInputProperties, ) @@ -72,12 +72,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") - def _parse_agent_id(data: object) -> Union[None, Unset, str]: + def _parse_agent_id(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) agent_id = _parse_agent_id(d.pop("agentId", UNSET)) @@ -108,5 +108,5 @@ def _parse_properties(data: object) -> Union["ComputeEnvironmentConfigurationInp return compute_environment_configuration_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/compute_environment_configuration_input_properties.py b/cirro_api_client/v1/models/compute_environment_configuration_input_properties.py index 0b06d10..22e33f3 100644 --- a/cirro_api_client/v1/models/compute_environment_configuration_input_properties.py +++ b/cirro_api_client/v1/models/compute_environment_configuration_input_properties.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class ComputeEnvironmentConfigurationInputProperties: """ """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() compute_environment_configuration_input_properties = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return compute_environment_configuration_input_properties @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/compute_environment_configuration_properties.py b/cirro_api_client/v1/models/compute_environment_configuration_properties.py index 88d17ce..11de835 100644 --- a/cirro_api_client/v1/models/compute_environment_configuration_properties.py +++ b/cirro_api_client/v1/models/compute_environment_configuration_properties.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class ComputeEnvironmentConfigurationProperties: """Configuration properties passed to the environment""" - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() compute_environment_configuration_properties = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return compute_environment_configuration_properties @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/contact.py b/cirro_api_client/v1/models/contact.py index 163daed..36c1064 100644 --- a/cirro_api_client/v1/models/contact.py +++ b/cirro_api_client/v1/models/contact.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,9 +20,9 @@ class Contact: organization: str email: str phone: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name organization = self.organization @@ -31,7 +31,7 @@ def to_dict(self) -> Dict[str, Any]: phone = self.phone - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -45,7 +45,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -66,5 +66,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return contact @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/contact_input.py b/cirro_api_client/v1/models/contact_input.py index 0a8a160..306d178 100644 --- a/cirro_api_client/v1/models/contact_input.py +++ b/cirro_api_client/v1/models/contact_input.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +22,9 @@ class ContactInput: name: str phone: str email: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: title = self.title description = self.description @@ -35,7 +35,7 @@ def to_dict(self) -> Dict[str, Any]: email = self.email - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -50,7 +50,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() title = d.pop("title") @@ -74,5 +74,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return contact_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/cost_response.py b/cirro_api_client/v1/models/cost_response.py new file mode 100644 index 0000000..0b3492d --- /dev/null +++ b/cirro_api_client/v1/models/cost_response.py @@ -0,0 +1,101 @@ +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.group_cost import GroupCost + from ..models.task_cost import TaskCost + + +T = TypeVar("T", bound="CostResponse") + + +@_attrs_define +class CostResponse: + """ + Attributes: + total_cost (Union[Unset, float]): Total cost + groups (Union[Unset, List['GroupCost']]): Costs grouped by the task status + tasks (Union[Unset, List['TaskCost']]): Costs for each workflow task + is_estimate (Union[Unset, bool]): Whether this is an estimated cost + """ + + total_cost: Unset | float = UNSET + groups: Unset | list["GroupCost"] = UNSET + tasks: Unset | list["TaskCost"] = UNSET + is_estimate: Unset | bool = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + total_cost = self.total_cost + + groups: Unset | list[dict[str, Any]] = UNSET + if not isinstance(self.groups, Unset): + groups = [] + for groups_item_data in self.groups: + groups_item = groups_item_data.to_dict() + groups.append(groups_item) + + tasks: Unset | list[dict[str, Any]] = UNSET + if not isinstance(self.tasks, Unset): + tasks = [] + for tasks_item_data in self.tasks: + tasks_item = tasks_item_data.to_dict() + tasks.append(tasks_item) + + is_estimate = self.is_estimate + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if total_cost is not UNSET: + field_dict["totalCost"] = total_cost + if groups is not UNSET: + field_dict["groups"] = groups + if tasks is not UNSET: + field_dict["tasks"] = tasks + if is_estimate is not UNSET: + field_dict["isEstimate"] = is_estimate + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + from ..models.group_cost import GroupCost + from ..models.task_cost import TaskCost + + d = src_dict.copy() + total_cost = d.pop("totalCost", UNSET) + + groups = [] + _groups = d.pop("groups", UNSET) + for groups_item_data in _groups or []: + groups_item = GroupCost.from_dict(groups_item_data) + + groups.append(groups_item) + + tasks = [] + _tasks = d.pop("tasks", UNSET) + for tasks_item_data in _tasks or []: + tasks_item = TaskCost.from_dict(tasks_item_data) + + tasks.append(tasks_item) + + is_estimate = d.pop("isEstimate", UNSET) + + cost_response = cls( + total_cost=total_cost, + groups=groups, + tasks=tasks, + is_estimate=is_estimate, + ) + + cost_response.additional_properties = d + return cost_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/create_notebook_instance_request.py b/cirro_api_client/v1/models/create_notebook_instance_request.py index e08e2d0..991b8c0 100644 --- a/cirro_api_client/v1/models/create_notebook_instance_request.py +++ b/cirro_api_client/v1/models/create_notebook_instance_request.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,13 +23,13 @@ class CreateNotebookInstanceRequest: name: str instance_type: str - accelerator_types: List[str] + accelerator_types: list[str] volume_size_gb: int - git_repositories: Union[List[str], None, Unset] = UNSET - is_shared_with_project: Union[Unset, bool] = False - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + git_repositories: list[str] | None | Unset = UNSET + is_shared_with_project: Unset | bool = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name instance_type = self.instance_type @@ -38,7 +38,7 @@ def to_dict(self) -> Dict[str, Any]: volume_size_gb = self.volume_size_gb - git_repositories: Union[List[str], None, Unset] + git_repositories: list[str] | None | Unset if isinstance(self.git_repositories, Unset): git_repositories = UNSET elif isinstance(self.git_repositories, list): @@ -49,7 +49,7 @@ def to_dict(self) -> Dict[str, Any]: is_shared_with_project = self.is_shared_with_project - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -67,17 +67,17 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") instance_type = d.pop("instanceType") - accelerator_types = cast(List[str], d.pop("acceleratorTypes")) + accelerator_types = cast(list[str], d.pop("acceleratorTypes")) volume_size_gb = d.pop("volumeSizeGB") - def _parse_git_repositories(data: object) -> Union[List[str], None, Unset]: + def _parse_git_repositories(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -85,12 +85,12 @@ def _parse_git_repositories(data: object) -> Union[List[str], None, Unset]: try: if not isinstance(data, list): raise TypeError() - git_repositories_type_0 = cast(List[str], data) + git_repositories_type_0 = cast(list[str], data) return git_repositories_type_0 except: # noqa: E722 pass - return cast(Union[List[str], None, Unset], data) + return cast(list[str] | None | Unset, data) git_repositories = _parse_git_repositories(d.pop("gitRepositories", UNSET)) @@ -109,5 +109,5 @@ def _parse_git_repositories(data: object) -> Union[List[str], None, Unset]: return create_notebook_instance_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/create_project_access_request.py b/cirro_api_client/v1/models/create_project_access_request.py index 494fb21..bde7483 100644 --- a/cirro_api_client/v1/models/create_project_access_request.py +++ b/cirro_api_client/v1/models/create_project_access_request.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,14 +18,14 @@ class CreateProjectAccessRequest: role: ProjectRole message: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: role = self.role.value message = self.message - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -37,7 +37,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() role = ProjectRole(d.pop("role")) @@ -52,5 +52,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return create_project_access_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/create_reference_request.py b/cirro_api_client/v1/models/create_reference_request.py index 7e860f1..2e42104 100644 --- a/cirro_api_client/v1/models/create_reference_request.py +++ b/cirro_api_client/v1/models/create_reference_request.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,10 +19,10 @@ class CreateReferenceRequest: name: str description: str type: str - expected_files: List[str] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + expected_files: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description @@ -31,7 +31,7 @@ def to_dict(self) -> Dict[str, Any]: expected_files = self.expected_files - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -45,7 +45,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -53,7 +53,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: type = d.pop("type") - expected_files = cast(List[str], d.pop("expectedFiles")) + expected_files = cast(list[str], d.pop("expectedFiles")) create_reference_request = cls( name=name, @@ -66,5 +66,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return create_reference_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/create_response.py b/cirro_api_client/v1/models/create_response.py index 2798030..f8927b3 100644 --- a/cirro_api_client/v1/models/create_response.py +++ b/cirro_api_client/v1/models/create_response.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class CreateResponse: id: str message: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id message = self.message - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,7 +35,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -50,5 +50,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return create_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/custom_pipeline_settings.py b/cirro_api_client/v1/models/custom_pipeline_settings.py index aba1b06..018b43f 100644 --- a/cirro_api_client/v1/models/custom_pipeline_settings.py +++ b/cirro_api_client/v1/models/custom_pipeline_settings.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -29,23 +29,23 @@ class CustomPipelineSettings: """ repository: str - branch: Union[Unset, str] = "main" - folder: Union[Unset, str] = ".cirro" - repository_type: Union[None, RepositoryType, Unset] = UNSET - last_sync: Union[None, Unset, datetime.datetime] = UNSET - sync_status: Union[None, SyncStatus, Unset] = UNSET - commit_hash: Union[None, Unset, str] = UNSET - is_authorized: Union[Unset, bool] = False - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + branch: Unset | str = "main" + folder: Unset | str = ".cirro" + repository_type: None | RepositoryType | Unset = UNSET + last_sync: None | Unset | datetime.datetime = UNSET + sync_status: None | SyncStatus | Unset = UNSET + commit_hash: None | Unset | str = UNSET + is_authorized: Unset | bool = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: repository = self.repository branch = self.branch folder = self.folder - repository_type: Union[None, Unset, str] + repository_type: None | Unset | str if isinstance(self.repository_type, Unset): repository_type = UNSET elif isinstance(self.repository_type, RepositoryType): @@ -53,7 +53,7 @@ def to_dict(self) -> Dict[str, Any]: else: repository_type = self.repository_type - last_sync: Union[None, Unset, str] + last_sync: None | Unset | str if isinstance(self.last_sync, Unset): last_sync = UNSET elif isinstance(self.last_sync, datetime.datetime): @@ -61,7 +61,7 @@ def to_dict(self) -> Dict[str, Any]: else: last_sync = self.last_sync - sync_status: Union[None, Unset, str] + sync_status: None | Unset | str if isinstance(self.sync_status, Unset): sync_status = UNSET elif isinstance(self.sync_status, SyncStatus): @@ -69,7 +69,7 @@ def to_dict(self) -> Dict[str, Any]: else: sync_status = self.sync_status - commit_hash: Union[None, Unset, str] + commit_hash: None | Unset | str if isinstance(self.commit_hash, Unset): commit_hash = UNSET else: @@ -77,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: is_authorized = self.is_authorized - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -102,7 +102,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() repository = d.pop("repository") @@ -110,7 +110,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: folder = d.pop("folder", UNSET) - def _parse_repository_type(data: object) -> Union[None, RepositoryType, Unset]: + def _parse_repository_type(data: object) -> None | RepositoryType | Unset: if data is None: return data if isinstance(data, Unset): @@ -123,11 +123,11 @@ def _parse_repository_type(data: object) -> Union[None, RepositoryType, Unset]: return repository_type_type_1 except: # noqa: E722 pass - return cast(Union[None, RepositoryType, Unset], data) + return cast(None | RepositoryType | Unset, data) repository_type = _parse_repository_type(d.pop("repositoryType", UNSET)) - def _parse_last_sync(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_last_sync(data: object) -> None | Unset | datetime.datetime: if data is None: return data if isinstance(data, Unset): @@ -140,11 +140,11 @@ def _parse_last_sync(data: object) -> Union[None, Unset, datetime.datetime]: return last_sync_type_0 except: # noqa: E722 pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(None | Unset | datetime.datetime, data) last_sync = _parse_last_sync(d.pop("lastSync", UNSET)) - def _parse_sync_status(data: object) -> Union[None, SyncStatus, Unset]: + def _parse_sync_status(data: object) -> None | SyncStatus | Unset: if data is None: return data if isinstance(data, Unset): @@ -157,16 +157,16 @@ def _parse_sync_status(data: object) -> Union[None, SyncStatus, Unset]: return sync_status_type_1 except: # noqa: E722 pass - return cast(Union[None, SyncStatus, Unset], data) + return cast(None | SyncStatus | Unset, data) sync_status = _parse_sync_status(d.pop("syncStatus", UNSET)) - def _parse_commit_hash(data: object) -> Union[None, Unset, str]: + def _parse_commit_hash(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) commit_hash = _parse_commit_hash(d.pop("commitHash", UNSET)) @@ -187,5 +187,5 @@ def _parse_commit_hash(data: object) -> Union[None, Unset, str]: return custom_pipeline_settings @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/custom_process_input.py b/cirro_api_client/v1/models/custom_process_input.py index 5ccb4c9..36839fe 100644 --- a/cirro_api_client/v1/models/custom_process_input.py +++ b/cirro_api_client/v1/models/custom_process_input.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -45,22 +45,22 @@ class CustomProcessInput: name: str description: str executor: Executor - child_process_ids: List[str] - parent_process_ids: List[str] - linked_project_ids: List[str] - data_type: Union[None, Unset, str] = UNSET - category: Union[Unset, str] = UNSET - documentation_url: Union[None, Unset, str] = UNSET - file_requirements_message: Union[None, Unset, str] = UNSET + child_process_ids: list[str] + parent_process_ids: list[str] + linked_project_ids: list[str] + data_type: None | Unset | str = UNSET + category: Unset | str = UNSET + documentation_url: None | Unset | str = UNSET + file_requirements_message: None | Unset | str = UNSET pipeline_code: Union["PipelineCode", None, Unset] = UNSET - is_tenant_wide: Union[Unset, bool] = UNSET - allow_multiple_sources: Union[Unset, bool] = UNSET - uses_sample_sheet: Union[Unset, bool] = UNSET + is_tenant_wide: Unset | bool = UNSET + allow_multiple_sources: Unset | bool = UNSET + uses_sample_sheet: Unset | bool = UNSET custom_settings: Union["CustomPipelineSettings", None, Unset] = UNSET - file_mapping_rules: Union[List["FileMappingRule"], None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + file_mapping_rules: list["FileMappingRule"] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.custom_pipeline_settings import CustomPipelineSettings from ..models.pipeline_code import PipelineCode @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: linked_project_ids = self.linked_project_ids - data_type: Union[None, Unset, str] + data_type: None | Unset | str if isinstance(self.data_type, Unset): data_type = UNSET else: @@ -86,19 +86,19 @@ def to_dict(self) -> Dict[str, Any]: category = self.category - documentation_url: Union[None, Unset, str] + documentation_url: None | Unset | str if isinstance(self.documentation_url, Unset): documentation_url = UNSET else: documentation_url = self.documentation_url - file_requirements_message: Union[None, Unset, str] + file_requirements_message: None | Unset | str if isinstance(self.file_requirements_message, Unset): file_requirements_message = UNSET else: file_requirements_message = self.file_requirements_message - pipeline_code: Union[Dict[str, Any], None, Unset] + pipeline_code: dict[str, Any] | None | Unset if isinstance(self.pipeline_code, Unset): pipeline_code = UNSET elif isinstance(self.pipeline_code, PipelineCode): @@ -112,7 +112,7 @@ def to_dict(self) -> Dict[str, Any]: uses_sample_sheet = self.uses_sample_sheet - custom_settings: Union[Dict[str, Any], None, Unset] + custom_settings: dict[str, Any] | None | Unset if isinstance(self.custom_settings, Unset): custom_settings = UNSET elif isinstance(self.custom_settings, CustomPipelineSettings): @@ -120,7 +120,7 @@ def to_dict(self) -> Dict[str, Any]: else: custom_settings = self.custom_settings - file_mapping_rules: Union[List[Dict[str, Any]], None, Unset] + file_mapping_rules: list[dict[str, Any]] | None | Unset if isinstance(self.file_mapping_rules, Unset): file_mapping_rules = UNSET elif isinstance(self.file_mapping_rules, list): @@ -132,7 +132,7 @@ def to_dict(self) -> Dict[str, Any]: else: file_mapping_rules = self.file_mapping_rules - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -169,7 +169,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.custom_pipeline_settings import CustomPipelineSettings from ..models.file_mapping_rule import FileMappingRule from ..models.pipeline_code import PipelineCode @@ -183,38 +183,38 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: executor = Executor(d.pop("executor")) - child_process_ids = cast(List[str], d.pop("childProcessIds")) + child_process_ids = cast(list[str], d.pop("childProcessIds")) - parent_process_ids = cast(List[str], d.pop("parentProcessIds")) + parent_process_ids = cast(list[str], d.pop("parentProcessIds")) - linked_project_ids = cast(List[str], d.pop("linkedProjectIds")) + linked_project_ids = cast(list[str], d.pop("linkedProjectIds")) - def _parse_data_type(data: object) -> Union[None, Unset, str]: + def _parse_data_type(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) data_type = _parse_data_type(d.pop("dataType", UNSET)) category = d.pop("category", UNSET) - def _parse_documentation_url(data: object) -> Union[None, Unset, str]: + def _parse_documentation_url(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) documentation_url = _parse_documentation_url(d.pop("documentationUrl", UNSET)) - def _parse_file_requirements_message(data: object) -> Union[None, Unset, str]: + def _parse_file_requirements_message(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) file_requirements_message = _parse_file_requirements_message(d.pop("fileRequirementsMessage", UNSET)) @@ -258,7 +258,7 @@ def _parse_custom_settings(data: object) -> Union["CustomPipelineSettings", None custom_settings = _parse_custom_settings(d.pop("customSettings", UNSET)) - def _parse_file_mapping_rules(data: object) -> Union[List["FileMappingRule"], None, Unset]: + def _parse_file_mapping_rules(data: object) -> list["FileMappingRule"] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -276,7 +276,7 @@ def _parse_file_mapping_rules(data: object) -> Union[List["FileMappingRule"], No return file_mapping_rules_type_0 except: # noqa: E722 pass - return cast(Union[List["FileMappingRule"], None, Unset], data) + return cast(list["FileMappingRule"] | None | Unset, data) file_mapping_rules = _parse_file_mapping_rules(d.pop("fileMappingRules", UNSET)) @@ -304,5 +304,5 @@ def _parse_file_mapping_rules(data: object) -> Union[List["FileMappingRule"], No return custom_process_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dashboard.py b/cirro_api_client/v1/models/dashboard.py index d929804..434c052 100644 --- a/cirro_api_client/v1/models/dashboard.py +++ b/cirro_api_client/v1/models/dashboard.py @@ -1,10 +1,12 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from dateutil.parser import isoparse +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.dashboard_dashboard_data import DashboardDashboardData from ..models.dashboard_info import DashboardInfo @@ -21,25 +23,25 @@ class Dashboard: name (str): description (str): process_ids (List[str]): - dashboard_data (DashboardDashboardData): - info (DashboardInfo): created_by (str): created_at (datetime.datetime): updated_at (datetime.datetime): + dashboard_data (Union[Unset, DashboardDashboardData]): + info (Union[Unset, DashboardInfo]): """ id: str name: str description: str - process_ids: List[str] - dashboard_data: "DashboardDashboardData" - info: "DashboardInfo" + process_ids: list[str] created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + dashboard_data: Union[Unset, "DashboardDashboardData"] = UNSET + info: Union[Unset, "DashboardInfo"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -48,17 +50,21 @@ def to_dict(self) -> Dict[str, Any]: process_ids = self.process_ids - dashboard_data = self.dashboard_data.to_dict() - - info = self.info.to_dict() - created_by = self.created_by created_at = self.created_at.isoformat() updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + dashboard_data: Unset | dict[str, Any] = UNSET + if not isinstance(self.dashboard_data, Unset): + dashboard_data = self.dashboard_data.to_dict() + + info: Unset | dict[str, Any] = UNSET + if not isinstance(self.info, Unset): + info = self.info.to_dict() + + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -66,18 +72,20 @@ def to_dict(self) -> Dict[str, Any]: "name": name, "description": description, "processIds": process_ids, - "dashboardData": dashboard_data, - "info": info, "createdBy": created_by, "createdAt": created_at, "updatedAt": updated_at, } ) + if dashboard_data is not UNSET: + field_dict["dashboardData"] = dashboard_data + if info is not UNSET: + field_dict["info"] = info return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.dashboard_dashboard_data import DashboardDashboardData from ..models.dashboard_info import DashboardInfo @@ -88,11 +96,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: description = d.pop("description") - process_ids = cast(List[str], d.pop("processIds")) - - dashboard_data = DashboardDashboardData.from_dict(d.pop("dashboardData")) - - info = DashboardInfo.from_dict(d.pop("info")) + process_ids = cast(list[str], d.pop("processIds")) created_by = d.pop("createdBy") @@ -100,21 +104,35 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: updated_at = isoparse(d.pop("updatedAt")) + _dashboard_data = d.pop("dashboardData", UNSET) + dashboard_data: Unset | DashboardDashboardData + if isinstance(_dashboard_data, Unset): + dashboard_data = UNSET + else: + dashboard_data = DashboardDashboardData.from_dict(_dashboard_data) + + _info = d.pop("info", UNSET) + info: Unset | DashboardInfo + if isinstance(_info, Unset): + info = UNSET + else: + info = DashboardInfo.from_dict(_info) + dashboard = cls( id=id, name=name, description=description, process_ids=process_ids, - dashboard_data=dashboard_data, - info=info, created_by=created_by, created_at=created_at, updated_at=updated_at, + dashboard_data=dashboard_data, + info=info, ) dashboard.additional_properties = d return dashboard @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dashboard_dashboard_data.py b/cirro_api_client/v1/models/dashboard_dashboard_data.py index f65feee..1af0f2e 100644 --- a/cirro_api_client/v1/models/dashboard_dashboard_data.py +++ b/cirro_api_client/v1/models/dashboard_dashboard_data.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class DashboardDashboardData: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() dashboard_dashboard_data = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dashboard_dashboard_data @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dashboard_info.py b/cirro_api_client/v1/models/dashboard_info.py index 9df6aff..71785ca 100644 --- a/cirro_api_client/v1/models/dashboard_info.py +++ b/cirro_api_client/v1/models/dashboard_info.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class DashboardInfo: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() dashboard_info = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dashboard_info @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dashboard_request.py b/cirro_api_client/v1/models/dashboard_request.py index 80d7523..be0d9f6 100644 --- a/cirro_api_client/v1/models/dashboard_request.py +++ b/cirro_api_client/v1/models/dashboard_request.py @@ -1,8 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.dashboard_request_dashboard_data import DashboardRequestDashboardData from ..models.dashboard_request_info import DashboardRequestInfo @@ -18,44 +20,50 @@ class DashboardRequest: name (str): description (str): process_ids (List[str]): - dashboard_data (DashboardRequestDashboardData): - info (DashboardRequestInfo): + dashboard_data (Union[Unset, DashboardRequestDashboardData]): + info (Union[Unset, DashboardRequestInfo]): """ name: str description: str - process_ids: List[str] - dashboard_data: "DashboardRequestDashboardData" - info: "DashboardRequestInfo" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + process_ids: list[str] + dashboard_data: Union[Unset, "DashboardRequestDashboardData"] = UNSET + info: Union[Unset, "DashboardRequestInfo"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description process_ids = self.process_ids - dashboard_data = self.dashboard_data.to_dict() + dashboard_data: Unset | dict[str, Any] = UNSET + if not isinstance(self.dashboard_data, Unset): + dashboard_data = self.dashboard_data.to_dict() - info = self.info.to_dict() + info: Unset | dict[str, Any] = UNSET + if not isinstance(self.info, Unset): + info = self.info.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "name": name, "description": description, "processIds": process_ids, - "dashboardData": dashboard_data, - "info": info, } ) + if dashboard_data is not UNSET: + field_dict["dashboardData"] = dashboard_data + if info is not UNSET: + field_dict["info"] = info return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.dashboard_request_dashboard_data import DashboardRequestDashboardData from ..models.dashboard_request_info import DashboardRequestInfo @@ -64,11 +72,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: description = d.pop("description") - process_ids = cast(List[str], d.pop("processIds")) + process_ids = cast(list[str], d.pop("processIds")) - dashboard_data = DashboardRequestDashboardData.from_dict(d.pop("dashboardData")) + _dashboard_data = d.pop("dashboardData", UNSET) + dashboard_data: Unset | DashboardRequestDashboardData + if isinstance(_dashboard_data, Unset): + dashboard_data = UNSET + else: + dashboard_data = DashboardRequestDashboardData.from_dict(_dashboard_data) - info = DashboardRequestInfo.from_dict(d.pop("info")) + _info = d.pop("info", UNSET) + info: Unset | DashboardRequestInfo + if isinstance(_info, Unset): + info = UNSET + else: + info = DashboardRequestInfo.from_dict(_info) dashboard_request = cls( name=name, @@ -82,5 +100,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dashboard_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dashboard_request_dashboard_data.py b/cirro_api_client/v1/models/dashboard_request_dashboard_data.py index 21e68ab..53a3fb3 100644 --- a/cirro_api_client/v1/models/dashboard_request_dashboard_data.py +++ b/cirro_api_client/v1/models/dashboard_request_dashboard_data.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class DashboardRequestDashboardData: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() dashboard_request_dashboard_data = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dashboard_request_dashboard_data @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dashboard_request_info.py b/cirro_api_client/v1/models/dashboard_request_info.py index 69c7b1d..2381482 100644 --- a/cirro_api_client/v1/models/dashboard_request_info.py +++ b/cirro_api_client/v1/models/dashboard_request_info.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class DashboardRequestInfo: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() dashboard_request_info = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dashboard_request_info @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/data_file.py b/cirro_api_client/v1/models/data_file.py index 86a00cc..158e080 100644 --- a/cirro_api_client/v1/models/data_file.py +++ b/cirro_api_client/v1/models/data_file.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,14 +20,14 @@ class DataFile: path: str metadata: "DataFileMetadata" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: path = self.path metadata = self.metadata.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -39,7 +39,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.data_file_metadata import DataFileMetadata d = src_dict.copy() @@ -56,5 +56,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return data_file @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/data_file_metadata.py b/cirro_api_client/v1/models/data_file_metadata.py index 1080d87..e6dc777 100644 --- a/cirro_api_client/v1/models/data_file_metadata.py +++ b/cirro_api_client/v1/models/data_file_metadata.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class DataFileMetadata: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() data_file_metadata = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return data_file_metadata @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset.py b/cirro_api_client/v1/models/dataset.py index b60afaf..c8f5e73 100644 --- a/cirro_api_client/v1/models/dataset.py +++ b/cirro_api_client/v1/models/dataset.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -36,15 +36,15 @@ class Dataset: description: str project_id: str process_id: str - source_dataset_ids: List[str] + source_dataset_ids: list[str] status: Status - tags: List["Tag"] + tags: list["Tag"] created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -70,7 +70,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -91,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.tag import Tag d = src_dict.copy() @@ -105,7 +105,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: process_id = d.pop("processId") - source_dataset_ids = cast(List[str], d.pop("sourceDatasetIds")) + source_dataset_ids = cast(list[str], d.pop("sourceDatasetIds")) status = Status(d.pop("status")) @@ -140,5 +140,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dataset @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_assets_manifest.py b/cirro_api_client/v1/models/dataset_assets_manifest.py index 1890850..2eaaae7 100644 --- a/cirro_api_client/v1/models/dataset_assets_manifest.py +++ b/cirro_api_client/v1/models/dataset_assets_manifest.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -27,18 +27,18 @@ class DatasetAssetsManifest: artifacts (Union[Unset, List['Artifact']]): Artifacts associated with the dataset """ - domain: Union[Unset, str] = UNSET - files: Union[Unset, List["FileEntry"]] = UNSET - total_files: Union[Unset, int] = UNSET - viz: Union[Unset, List["DatasetViz"]] = UNSET - tables: Union[Unset, List["Table"]] = UNSET - artifacts: Union[Unset, List["Artifact"]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + domain: Unset | str = UNSET + files: Unset | list["FileEntry"] = UNSET + total_files: Unset | int = UNSET + viz: Unset | list["DatasetViz"] = UNSET + tables: Unset | list["Table"] = UNSET + artifacts: Unset | list["Artifact"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: domain = self.domain - files: Union[Unset, List[Dict[str, Any]]] = UNSET + files: Unset | list[dict[str, Any]] = UNSET if not isinstance(self.files, Unset): files = [] for files_item_data in self.files: @@ -47,28 +47,28 @@ def to_dict(self) -> Dict[str, Any]: total_files = self.total_files - viz: Union[Unset, List[Dict[str, Any]]] = UNSET + viz: Unset | list[dict[str, Any]] = UNSET if not isinstance(self.viz, Unset): viz = [] for viz_item_data in self.viz: viz_item = viz_item_data.to_dict() viz.append(viz_item) - tables: Union[Unset, List[Dict[str, Any]]] = UNSET + tables: Unset | list[dict[str, Any]] = UNSET if not isinstance(self.tables, Unset): tables = [] for tables_item_data in self.tables: tables_item = tables_item_data.to_dict() tables.append(tables_item) - artifacts: Union[Unset, List[Dict[str, Any]]] = UNSET + artifacts: Unset | list[dict[str, Any]] = UNSET if not isinstance(self.artifacts, Unset): artifacts = [] for artifacts_item_data in self.artifacts: artifacts_item = artifacts_item_data.to_dict() artifacts.append(artifacts_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if domain is not UNSET: @@ -87,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.artifact import Artifact from ..models.dataset_viz import DatasetViz from ..models.file_entry import FileEntry @@ -139,5 +139,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dataset_assets_manifest @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_condition.py b/cirro_api_client/v1/models/dataset_condition.py index 208ea02..5e5b161 100644 --- a/cirro_api_client/v1/models/dataset_condition.py +++ b/cirro_api_client/v1/models/dataset_condition.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,14 +18,14 @@ class DatasetCondition: field: DatasetConditionField value: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: field = self.field.value value = self.value - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -37,7 +37,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() field = DatasetConditionField(d.pop("field")) @@ -52,5 +52,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dataset_condition @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_detail.py b/cirro_api_client/v1/models/dataset_detail.py index c706b1e..77b4275 100644 --- a/cirro_api_client/v1/models/dataset_detail.py +++ b/cirro_api_client/v1/models/dataset_detail.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -46,6 +46,7 @@ class DatasetDetail: originating_project_id (Union[Unset, str]): The originating project ID might be different if the dataset was shared from another project. share (Union['NamedItem', None, Unset]): + total_size_bytes (Union[None, Unset, int]): Total size of dataset files (in bytes) """ id: str @@ -54,24 +55,25 @@ class DatasetDetail: s3: str process_id: str project_id: str - source_dataset_ids: List[str] - source_datasets: List["NamedItem"] - source_sample_ids: List[str] + source_dataset_ids: list[str] + source_datasets: list["NamedItem"] + source_sample_ids: list[str] source_sample_files_map: "DatasetDetailSourceSampleFilesMap" status: Status status_message: str - tags: List["Tag"] + tags: list["Tag"] params: "DatasetDetailParams" info: "DatasetDetailInfo" is_view_restricted: bool created_by: str created_at: datetime.datetime updated_at: datetime.datetime - originating_project_id: Union[Unset, str] = UNSET + originating_project_id: Unset | str = UNSET share: Union["NamedItem", None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + total_size_bytes: None | Unset | int = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.named_item import NamedItem id = self.id @@ -120,7 +122,7 @@ def to_dict(self) -> Dict[str, Any]: originating_project_id = self.originating_project_id - share: Union[Dict[str, Any], None, Unset] + share: dict[str, Any] | None | Unset if isinstance(self.share, Unset): share = UNSET elif isinstance(self.share, NamedItem): @@ -128,7 +130,13 @@ def to_dict(self) -> Dict[str, Any]: else: share = self.share - field_dict: Dict[str, Any] = {} + total_size_bytes: None | Unset | int + if isinstance(self.total_size_bytes, Unset): + total_size_bytes = UNSET + else: + total_size_bytes = self.total_size_bytes + + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -157,11 +165,13 @@ def to_dict(self) -> Dict[str, Any]: field_dict["originatingProjectId"] = originating_project_id if share is not UNSET: field_dict["share"] = share + if total_size_bytes is not UNSET: + field_dict["totalSizeBytes"] = total_size_bytes return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.dataset_detail_info import DatasetDetailInfo from ..models.dataset_detail_params import DatasetDetailParams from ..models.dataset_detail_source_sample_files_map import DatasetDetailSourceSampleFilesMap @@ -181,7 +191,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: project_id = d.pop("projectId") - source_dataset_ids = cast(List[str], d.pop("sourceDatasetIds")) + source_dataset_ids = cast(list[str], d.pop("sourceDatasetIds")) source_datasets = [] _source_datasets = d.pop("sourceDatasets") @@ -190,7 +200,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: source_datasets.append(source_datasets_item) - source_sample_ids = cast(List[str], d.pop("sourceSampleIds")) + source_sample_ids = cast(list[str], d.pop("sourceSampleIds")) source_sample_files_map = DatasetDetailSourceSampleFilesMap.from_dict(d.pop("sourceSampleFilesMap")) @@ -236,6 +246,15 @@ def _parse_share(data: object) -> Union["NamedItem", None, Unset]: share = _parse_share(d.pop("share", UNSET)) + def _parse_total_size_bytes(data: object) -> None | Unset | int: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | Unset | int, data) + + total_size_bytes = _parse_total_size_bytes(d.pop("totalSizeBytes", UNSET)) + dataset_detail = cls( id=id, name=name, @@ -258,11 +277,12 @@ def _parse_share(data: object) -> Union["NamedItem", None, Unset]: updated_at=updated_at, originating_project_id=originating_project_id, share=share, + total_size_bytes=total_size_bytes, ) dataset_detail.additional_properties = d return dataset_detail @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_detail_info.py b/cirro_api_client/v1/models/dataset_detail_info.py index 81e6604..9638afb 100644 --- a/cirro_api_client/v1/models/dataset_detail_info.py +++ b/cirro_api_client/v1/models/dataset_detail_info.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class DatasetDetailInfo: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() dataset_detail_info = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dataset_detail_info @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_detail_params.py b/cirro_api_client/v1/models/dataset_detail_params.py index 30c09a3..2f11055 100644 --- a/cirro_api_client/v1/models/dataset_detail_params.py +++ b/cirro_api_client/v1/models/dataset_detail_params.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class DatasetDetailParams: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() dataset_detail_params = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dataset_detail_params @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_detail_source_sample_files_map.py b/cirro_api_client/v1/models/dataset_detail_source_sample_files_map.py index 9dc26ef..52778c7 100644 --- a/cirro_api_client/v1/models/dataset_detail_source_sample_files_map.py +++ b/cirro_api_client/v1/models/dataset_detail_source_sample_files_map.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,10 +10,10 @@ class DatasetDetailSourceSampleFilesMap: """Keys are sampleIds, and the lists are file paths to include.""" - additional_properties: Dict[str, List[str]] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = prop @@ -22,13 +22,13 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() dataset_detail_source_sample_files_map = cls() additional_properties = {} for prop_name, prop_dict in d.items(): - additional_property = cast(List[str], prop_dict) + additional_property = cast(list[str], prop_dict) additional_properties[prop_name] = additional_property @@ -36,5 +36,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dataset_detail_source_sample_files_map @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_viz.py b/cirro_api_client/v1/models/dataset_viz.py index 278e989..9c12578 100644 --- a/cirro_api_client/v1/models/dataset_viz.py +++ b/cirro_api_client/v1/models/dataset_viz.py @@ -1,10 +1,15 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +import builtins +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.dataset_viz_config import DatasetVizConfig + + T = TypeVar("T", bound="DatasetViz") @@ -16,17 +21,17 @@ class DatasetViz: name (Union[Unset, str]): Name of viz desc (Union[Unset, str]): Description of viz type (Union[Unset, str]): Type of viz Example: vitescce. - config (Union[Unset, Any]): Config or path to config used to render viz + config (Union[Unset, DatasetVizConfig]): Config or path to config used to render viz """ - path: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - desc: Union[Unset, str] = UNSET - type: Union[Unset, str] = UNSET - config: Union[Unset, Any] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + path: Unset | str = UNSET + name: Unset | str = UNSET + desc: Unset | str = UNSET + type: Unset | str = UNSET + config: Union[Unset, "DatasetVizConfig"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: path = self.path name = self.name @@ -35,9 +40,11 @@ def to_dict(self) -> Dict[str, Any]: type = self.type - config = self.config + config: Unset | dict[str, Any] = UNSET + if not isinstance(self.config, Unset): + config = self.config.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if path is not UNSET: @@ -54,7 +61,9 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: builtins.type[T], src_dict: dict[str, Any]) -> T: + from ..models.dataset_viz_config import DatasetVizConfig + d = src_dict.copy() path = d.pop("path", UNSET) @@ -64,7 +73,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: type = d.pop("type", UNSET) - config = d.pop("config", UNSET) + _config = d.pop("config", UNSET) + config: Unset | DatasetVizConfig + if isinstance(_config, Unset): + config = UNSET + else: + config = DatasetVizConfig.from_dict(_config) dataset_viz = cls( path=path, @@ -78,5 +92,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return dataset_viz @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_viz_config.py b/cirro_api_client/v1/models/dataset_viz_config.py new file mode 100644 index 0000000..7486442 --- /dev/null +++ b/cirro_api_client/v1/models/dataset_viz_config.py @@ -0,0 +1,32 @@ +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DatasetVizConfig") + + +@_attrs_define +class DatasetVizConfig: + """Config or path to config used to render viz""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + d = src_dict.copy() + dataset_viz_config = cls() + + dataset_viz_config.additional_properties = d + return dataset_viz_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/discussion.py b/cirro_api_client/v1/models/discussion.py index 51e0f57..6f1bb96 100644 --- a/cirro_api_client/v1/models/discussion.py +++ b/cirro_api_client/v1/models/discussion.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -40,9 +40,9 @@ class Discussion: last_message_time: datetime.datetime created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -63,7 +63,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -83,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.entity import Entity d = src_dict.copy() @@ -124,5 +124,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return discussion @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/discussion_input.py b/cirro_api_client/v1/models/discussion_input.py index a158b86..3e5a19e 100644 --- a/cirro_api_client/v1/models/discussion_input.py +++ b/cirro_api_client/v1/models/discussion_input.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,9 +28,9 @@ class DiscussionInput: entity: "Entity" type: DiscussionType project_id: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description @@ -41,7 +41,7 @@ def to_dict(self) -> Dict[str, Any]: project_id = self.project_id - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -56,7 +56,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.entity import Entity d = src_dict.copy() @@ -82,5 +82,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return discussion_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/entity.py b/cirro_api_client/v1/models/entity.py index 3dfcd49..92ad5c2 100644 --- a/cirro_api_client/v1/models/entity.py +++ b/cirro_api_client/v1/models/entity.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,14 +18,14 @@ class Entity: type: EntityType id: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: type = self.type.value id = self.id - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -37,7 +37,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() type = EntityType(d.pop("type")) @@ -52,5 +52,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return entity @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/entity_type.py b/cirro_api_client/v1/models/entity_type.py index 84a0500..dd9e295 100644 --- a/cirro_api_client/v1/models/entity_type.py +++ b/cirro_api_client/v1/models/entity_type.py @@ -11,8 +11,9 @@ class EntityType(str, Enum): SAMPLE = "SAMPLE" SHARE = "SHARE" TAG = "TAG" - UNKNOWN = "UNKNOWN" USER = "USER" + UNKNOWN = "UNKNOWN" + """ This is a fallback value for when the value is not known, do not use this value when making requests """ def __str__(self) -> str: return str(self.value) diff --git a/cirro_api_client/v1/models/error_message.py b/cirro_api_client/v1/models/error_message.py index c25cfd9..7e7b7c3 100644 --- a/cirro_api_client/v1/models/error_message.py +++ b/cirro_api_client/v1/models/error_message.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,12 +14,12 @@ class ErrorMessage: """ message: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: message = self.message - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() message = d.pop("message") @@ -42,5 +42,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return error_message @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/feature_flags.py b/cirro_api_client/v1/models/feature_flags.py index d74ced4..7615466 100644 --- a/cirro_api_client/v1/models/feature_flags.py +++ b/cirro_api_client/v1/models/feature_flags.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -13,34 +13,44 @@ class FeatureFlags: sftp_enabled (bool): governance_enabled (bool): project_requests_enabled (bool): + workspaces_enabled (bool): + drive_enabled (bool): """ sftp_enabled: bool governance_enabled: bool project_requests_enabled: bool - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + workspaces_enabled: bool + drive_enabled: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: sftp_enabled = self.sftp_enabled governance_enabled = self.governance_enabled project_requests_enabled = self.project_requests_enabled - field_dict: Dict[str, Any] = {} + workspaces_enabled = self.workspaces_enabled + + drive_enabled = self.drive_enabled + + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "sftpEnabled": sftp_enabled, "governanceEnabled": governance_enabled, "projectRequestsEnabled": project_requests_enabled, + "workspacesEnabled": workspaces_enabled, + "driveEnabled": drive_enabled, } ) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() sftp_enabled = d.pop("sftpEnabled") @@ -48,15 +58,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: project_requests_enabled = d.pop("projectRequestsEnabled") + workspaces_enabled = d.pop("workspacesEnabled") + + drive_enabled = d.pop("driveEnabled") + feature_flags = cls( sftp_enabled=sftp_enabled, governance_enabled=governance_enabled, project_requests_enabled=project_requests_enabled, + workspaces_enabled=workspaces_enabled, + drive_enabled=drive_enabled, ) feature_flags.additional_properties = d return feature_flags @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/file_entry.py b/cirro_api_client/v1/models/file_entry.py index 9aa3602..86b41b7 100644 --- a/cirro_api_client/v1/models/file_entry.py +++ b/cirro_api_client/v1/models/file_entry.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,21 +21,21 @@ class FileEntry: metadata (Union[Unset, FileEntryMetadata]): Metadata associated with the file Example: {'read': 1}. """ - path: Union[Unset, str] = UNSET - size: Union[Unset, int] = UNSET + path: Unset | str = UNSET + size: Unset | int = UNSET metadata: Union[Unset, "FileEntryMetadata"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: path = self.path size = self.size - metadata: Union[Unset, Dict[str, Any]] = UNSET + metadata: Unset | dict[str, Any] = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if path is not UNSET: @@ -48,7 +48,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.file_entry_metadata import FileEntryMetadata d = src_dict.copy() @@ -57,7 +57,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: size = d.pop("size", UNSET) _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, FileEntryMetadata] + metadata: Unset | FileEntryMetadata if isinstance(_metadata, Unset): metadata = UNSET else: @@ -73,5 +73,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return file_entry @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/file_entry_metadata.py b/cirro_api_client/v1/models/file_entry_metadata.py index b44803d..3ca09c8 100644 --- a/cirro_api_client/v1/models/file_entry_metadata.py +++ b/cirro_api_client/v1/models/file_entry_metadata.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,17 +15,17 @@ class FileEntryMetadata: """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() file_entry_metadata = cls() @@ -33,5 +33,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return file_entry_metadata @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/file_mapping_rule.py b/cirro_api_client/v1/models/file_mapping_rule.py index 6a322e8..0caa0f7 100644 --- a/cirro_api_client/v1/models/file_mapping_rule.py +++ b/cirro_api_client/v1/models/file_mapping_rule.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,13 +25,13 @@ class FileMappingRule: """ description: str - file_name_patterns: List["FileNamePattern"] - min_: Union[Unset, int] = UNSET - max_: Union[Unset, int] = UNSET - is_sample: Union[Unset, bool] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + file_name_patterns: list["FileNamePattern"] + min_: Unset | int = UNSET + max_: Unset | int = UNSET + is_sample: Unset | bool = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: description = self.description file_name_patterns = [] @@ -45,7 +45,7 @@ def to_dict(self) -> Dict[str, Any]: is_sample = self.is_sample - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -63,7 +63,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.file_name_pattern import FileNamePattern d = src_dict.copy() @@ -94,5 +94,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return file_mapping_rule @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/file_name_match.py b/cirro_api_client/v1/models/file_name_match.py index dc89802..77dd615 100644 --- a/cirro_api_client/v1/models/file_name_match.py +++ b/cirro_api_client/v1/models/file_name_match.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,16 +18,16 @@ class FileNameMatch: file_name: str sample_name: str regex_pattern_match: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: file_name = self.file_name sample_name = self.sample_name regex_pattern_match = self.regex_pattern_match - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,7 +40,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() file_name = d.pop("fileName") @@ -58,5 +58,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return file_name_match @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/file_name_pattern.py b/cirro_api_client/v1/models/file_name_pattern.py index 1dbc48f..b9cc4bd 100644 --- a/cirro_api_client/v1/models/file_name_pattern.py +++ b/cirro_api_client/v1/models/file_name_pattern.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,21 +20,21 @@ class FileNamePattern: example_name: str sample_matching_pattern: str - description: Union[None, Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + description: None | Unset | str = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: example_name = self.example_name sample_matching_pattern = self.sample_matching_pattern - description: Union[None, Unset, str] + description: None | Unset | str if isinstance(self.description, Unset): description = UNSET else: description = self.description - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -48,18 +48,18 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() example_name = d.pop("exampleName") sample_matching_pattern = d.pop("sampleMatchingPattern") - def _parse_description(data: object) -> Union[None, Unset, str]: + def _parse_description(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) description = _parse_description(d.pop("description", UNSET)) @@ -73,5 +73,5 @@ def _parse_description(data: object) -> Union[None, Unset, str]: return file_name_pattern @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/file_requirements.py b/cirro_api_client/v1/models/file_requirements.py index 0c01843..6ebd0e6 100644 --- a/cirro_api_client/v1/models/file_requirements.py +++ b/cirro_api_client/v1/models/file_requirements.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,12 +19,12 @@ class FileRequirements: allowed_data_types (List['AllowedDataType']): """ - files: List[str] + files: list[str] error_msg: str - allowed_data_types: List["AllowedDataType"] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + allowed_data_types: list["AllowedDataType"] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: files = self.files error_msg = self.error_msg @@ -34,7 +34,7 @@ def to_dict(self) -> Dict[str, Any]: allowed_data_types_item = allowed_data_types_item_data.to_dict() allowed_data_types.append(allowed_data_types_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -47,11 +47,11 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.allowed_data_type import AllowedDataType d = src_dict.copy() - files = cast(List[str], d.pop("files")) + files = cast(list[str], d.pop("files")) error_msg = d.pop("errorMsg") @@ -72,5 +72,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return file_requirements @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/form_schema.py b/cirro_api_client/v1/models/form_schema.py index 28357ca..df7d530 100644 --- a/cirro_api_client/v1/models/form_schema.py +++ b/cirro_api_client/v1/models/form_schema.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,18 +23,18 @@ class FormSchema: form: Union[Unset, "FormSchemaForm"] = UNSET ui: Union[Unset, "FormSchemaUi"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - form: Union[Unset, Dict[str, Any]] = UNSET + def to_dict(self) -> dict[str, Any]: + form: Unset | dict[str, Any] = UNSET if not isinstance(self.form, Unset): form = self.form.to_dict() - ui: Union[Unset, Dict[str, Any]] = UNSET + ui: Unset | dict[str, Any] = UNSET if not isinstance(self.ui, Unset): ui = self.ui.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if form is not UNSET: @@ -45,20 +45,20 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.form_schema_form import FormSchemaForm from ..models.form_schema_ui import FormSchemaUi d = src_dict.copy() _form = d.pop("form", UNSET) - form: Union[Unset, FormSchemaForm] + form: Unset | FormSchemaForm if isinstance(_form, Unset): form = UNSET else: form = FormSchemaForm.from_dict(_form) _ui = d.pop("ui", UNSET) - ui: Union[Unset, FormSchemaUi] + ui: Unset | FormSchemaUi if isinstance(_ui, Unset): ui = UNSET else: @@ -73,5 +73,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return form_schema @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/form_schema_form.py b/cirro_api_client/v1/models/form_schema_form.py index eaf6c96..632cb51 100644 --- a/cirro_api_client/v1/models/form_schema_form.py +++ b/cirro_api_client/v1/models/form_schema_form.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class FormSchemaForm: """JSONSchema representation of the parameters""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() form_schema_form = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return form_schema_form @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/form_schema_ui.py b/cirro_api_client/v1/models/form_schema_ui.py index eceb456..0eaa050 100644 --- a/cirro_api_client/v1/models/form_schema_ui.py +++ b/cirro_api_client/v1/models/form_schema_ui.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class FormSchemaUi: """Describes how the form should be rendered, see rjsf""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() form_schema_ui = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return form_schema_ui @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/fulfillment_response.py b/cirro_api_client/v1/models/fulfillment_response.py index 018b21a..1b28b61 100644 --- a/cirro_api_client/v1/models/fulfillment_response.py +++ b/cirro_api_client/v1/models/fulfillment_response.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class FulfillmentResponse: fulfillment_id: str path: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: fulfillment_id = self.fulfillment_id path = self.path - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,7 +35,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() fulfillment_id = d.pop("fulfillmentId") @@ -50,5 +50,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return fulfillment_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/generate_sftp_credentials_request.py b/cirro_api_client/v1/models/generate_sftp_credentials_request.py index 9809148..ec07406 100644 --- a/cirro_api_client/v1/models/generate_sftp_credentials_request.py +++ b/cirro_api_client/v1/models/generate_sftp_credentials_request.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,13 +15,13 @@ class GenerateSftpCredentialsRequest: lifetime_days (Union[Unset, int]): Number of days the credentials are valid for Default: 1. """ - lifetime_days: Union[Unset, int] = 1 - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + lifetime_days: Unset | int = 1 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: lifetime_days = self.lifetime_days - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if lifetime_days is not UNSET: @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() lifetime_days = d.pop("lifetimeDays", UNSET) @@ -42,5 +42,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return generate_sftp_credentials_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/get_execution_logs_response.py b/cirro_api_client/v1/models/get_execution_logs_response.py index e9de414..9ca54e6 100644 --- a/cirro_api_client/v1/models/get_execution_logs_response.py +++ b/cirro_api_client/v1/models/get_execution_logs_response.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,16 +17,16 @@ class GetExecutionLogsResponse: events (List['LogEntry']): """ - events: List["LogEntry"] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + events: list["LogEntry"] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: events = [] for events_item_data in self.events: events_item = events_item_data.to_dict() events.append(events_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -37,7 +37,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.log_entry import LogEntry d = src_dict.copy() @@ -56,5 +56,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return get_execution_logs_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/get_project_summary_response_200.py b/cirro_api_client/v1/models/get_project_summary_response_200.py index 9552fcd..f914745 100644 --- a/cirro_api_client/v1/models/get_project_summary_response_200.py +++ b/cirro_api_client/v1/models/get_project_summary_response_200.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,10 +14,10 @@ class GetProjectSummaryResponse200: """ """ - additional_properties: Dict[str, List["Task"]] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, list["Task"]] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = [] for additional_property_item_data in prop: @@ -29,7 +29,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.task import Task d = src_dict.copy() @@ -50,5 +50,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return get_project_summary_response_200 @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_classification.py b/cirro_api_client/v1/models/governance_classification.py index 88e9446..eac8897 100644 --- a/cirro_api_client/v1/models/governance_classification.py +++ b/cirro_api_client/v1/models/governance_classification.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,13 +24,13 @@ class GovernanceClassification: id: str name: str description: str - requirement_ids: List[str] + requirement_ids: list[str] created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -45,7 +45,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -62,7 +62,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -70,7 +70,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: description = d.pop("description") - requirement_ids = cast(List[str], d.pop("requirementIds")) + requirement_ids = cast(list[str], d.pop("requirementIds")) created_by = d.pop("createdBy") @@ -92,5 +92,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return governance_classification @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_contact.py b/cirro_api_client/v1/models/governance_contact.py index 9d66a9b..c095442 100644 --- a/cirro_api_client/v1/models/governance_contact.py +++ b/cirro_api_client/v1/models/governance_contact.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -32,9 +32,9 @@ class GovernanceContact: created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id title = self.title @@ -53,7 +53,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -108,5 +108,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return governance_contact @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_expiry.py b/cirro_api_client/v1/models/governance_expiry.py index 7eecbc4..514d13f 100644 --- a/cirro_api_client/v1/models/governance_expiry.py +++ b/cirro_api_client/v1/models/governance_expiry.py @@ -1,5 +1,6 @@ +import builtins import datetime -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,23 +21,23 @@ class GovernanceExpiry: date (Union[None, Unset, datetime.datetime]): The date for an absolute expiration """ - type: Union[Unset, GovernanceExpiryType] = UNSET - days: Union[None, Unset, int] = UNSET - date: Union[None, Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + type: Unset | GovernanceExpiryType = UNSET + days: None | Unset | int = UNSET + date: None | Unset | datetime.datetime = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - type: Union[Unset, str] = UNSET + def to_dict(self) -> dict[str, Any]: + type: Unset | str = UNSET if not isinstance(self.type, Unset): type = self.type.value - days: Union[None, Unset, int] + days: None | Unset | int if isinstance(self.days, Unset): days = UNSET else: days = self.days - date: Union[None, Unset, str] + date: None | Unset | str if isinstance(self.date, Unset): date = UNSET elif isinstance(self.date, datetime.datetime): @@ -44,7 +45,7 @@ def to_dict(self) -> Dict[str, Any]: else: date = self.date - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if type is not UNSET: @@ -57,25 +58,25 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: builtins.type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() _type = d.pop("type", UNSET) - type: Union[Unset, GovernanceExpiryType] + type: Unset | GovernanceExpiryType if isinstance(_type, Unset): type = UNSET else: type = GovernanceExpiryType(_type) - def _parse_days(data: object) -> Union[None, Unset, int]: + def _parse_days(data: object) -> None | Unset | int: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, int], data) + return cast(None | Unset | int, data) days = _parse_days(d.pop("days", UNSET)) - def _parse_date(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_date(data: object) -> None | Unset | datetime.datetime: if data is None: return data if isinstance(data, Unset): @@ -88,7 +89,7 @@ def _parse_date(data: object) -> Union[None, Unset, datetime.datetime]: return date_type_0 except: # noqa: E722 pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(None | Unset | datetime.datetime, data) date = _parse_date(d.pop("date", UNSET)) @@ -102,5 +103,5 @@ def _parse_date(data: object) -> Union[None, Unset, datetime.datetime]: return governance_expiry @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_file.py b/cirro_api_client/v1/models/governance_file.py index cdd0327..74c4260 100644 --- a/cirro_api_client/v1/models/governance_file.py +++ b/cirro_api_client/v1/models/governance_file.py @@ -1,4 +1,5 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +import builtins +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,24 +20,24 @@ class GovernanceFile: type (Union[Unset, GovernanceFileType]): The options for supplementals for governance requirements """ - name: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - src: Union[Unset, str] = UNSET - type: Union[Unset, GovernanceFileType] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + name: Unset | str = UNSET + description: Unset | str = UNSET + src: Unset | str = UNSET + type: Unset | GovernanceFileType = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description src = self.src - type: Union[Unset, str] = UNSET + type: Unset | str = UNSET if not isinstance(self.type, Unset): type = self.type.value - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if name is not UNSET: @@ -51,7 +52,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: builtins.type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name", UNSET) @@ -60,7 +61,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: src = d.pop("src", UNSET) _type = d.pop("type", UNSET) - type: Union[Unset, GovernanceFileType] + type: Unset | GovernanceFileType if isinstance(_type, Unset): type = UNSET else: @@ -77,5 +78,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return governance_file @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_file_access_request.py b/cirro_api_client/v1/models/governance_file_access_request.py index 4c7fad1..ece154a 100644 --- a/cirro_api_client/v1/models/governance_file_access_request.py +++ b/cirro_api_client/v1/models/governance_file_access_request.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,33 +20,33 @@ class GovernanceFileAccessRequest: """ access_type: GovernanceAccessType - fulfillment_id: Union[None, Unset, str] = UNSET - project_id: Union[None, Unset, str] = UNSET - token_lifetime_hours: Union[None, Unset, int] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + fulfillment_id: None | Unset | str = UNSET + project_id: None | Unset | str = UNSET + token_lifetime_hours: None | Unset | int = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: access_type = self.access_type.value - fulfillment_id: Union[None, Unset, str] + fulfillment_id: None | Unset | str if isinstance(self.fulfillment_id, Unset): fulfillment_id = UNSET else: fulfillment_id = self.fulfillment_id - project_id: Union[None, Unset, str] + project_id: None | Unset | str if isinstance(self.project_id, Unset): project_id = UNSET else: project_id = self.project_id - token_lifetime_hours: Union[None, Unset, int] + token_lifetime_hours: None | Unset | int if isinstance(self.token_lifetime_hours, Unset): token_lifetime_hours = UNSET else: token_lifetime_hours = self.token_lifetime_hours - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -63,34 +63,34 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() access_type = GovernanceAccessType(d.pop("accessType")) - def _parse_fulfillment_id(data: object) -> Union[None, Unset, str]: + def _parse_fulfillment_id(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) fulfillment_id = _parse_fulfillment_id(d.pop("fulfillmentId", UNSET)) - def _parse_project_id(data: object) -> Union[None, Unset, str]: + def _parse_project_id(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) project_id = _parse_project_id(d.pop("projectId", UNSET)) - def _parse_token_lifetime_hours(data: object) -> Union[None, Unset, int]: + def _parse_token_lifetime_hours(data: object) -> None | Unset | int: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, int], data) + return cast(None | Unset | int, data) token_lifetime_hours = _parse_token_lifetime_hours(d.pop("tokenLifetimeHours", UNSET)) @@ -105,5 +105,5 @@ def _parse_token_lifetime_hours(data: object) -> Union[None, Unset, int]: return governance_file_access_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_file_input.py b/cirro_api_client/v1/models/governance_file_input.py index f37a99a..e90e1d9 100644 --- a/cirro_api_client/v1/models/governance_file_input.py +++ b/cirro_api_client/v1/models/governance_file_input.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +22,9 @@ class GovernanceFileInput: description: str src: str type: GovernanceFileType - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description @@ -33,7 +33,7 @@ def to_dict(self) -> Dict[str, Any]: type = self.type.value - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -47,7 +47,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -68,5 +68,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return governance_file_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_requirement.py b/cirro_api_client/v1/models/governance_requirement.py index bfe8c7f..8c1811e 100644 --- a/cirro_api_client/v1/models/governance_requirement.py +++ b/cirro_api_client/v1/models/governance_requirement.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -53,22 +53,22 @@ class GovernanceRequirement: type: GovernanceType path: str scope: GovernanceScope - contact_ids: List[str] + contact_ids: list[str] expiration: "GovernanceExpiry" created_by: str created_at: datetime.datetime updated_at: datetime.datetime - project_id: Union[Unset, str] = UNSET - acceptance: Union[GovernanceScope, None, Unset] = UNSET - enactment_date: Union[None, Unset, datetime.datetime] = UNSET - supplemental_docs: Union[List["GovernanceFile"], None, Unset] = UNSET + project_id: Unset | str = UNSET + acceptance: GovernanceScope | None | Unset = UNSET + enactment_date: None | Unset | datetime.datetime = UNSET + supplemental_docs: list["GovernanceFile"] | None | Unset = UNSET file: Union["GovernanceFile", None, Unset] = UNSET - authorship: Union[GovernanceScope, None, Unset] = UNSET + authorship: GovernanceScope | None | Unset = UNSET project_file_map: Union["GovernanceRequirementProjectFileMap", None, Unset] = UNSET - verification_method: Union[GovernanceTrainingVerification, None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + verification_method: GovernanceTrainingVerification | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.governance_file import GovernanceFile from ..models.governance_requirement_project_file_map import GovernanceRequirementProjectFileMap @@ -96,7 +96,7 @@ def to_dict(self) -> Dict[str, Any]: project_id = self.project_id - acceptance: Union[None, Unset, str] + acceptance: None | Unset | str if isinstance(self.acceptance, Unset): acceptance = UNSET elif isinstance(self.acceptance, GovernanceScope): @@ -104,7 +104,7 @@ def to_dict(self) -> Dict[str, Any]: else: acceptance = self.acceptance - enactment_date: Union[None, Unset, str] + enactment_date: None | Unset | str if isinstance(self.enactment_date, Unset): enactment_date = UNSET elif isinstance(self.enactment_date, datetime.datetime): @@ -112,7 +112,7 @@ def to_dict(self) -> Dict[str, Any]: else: enactment_date = self.enactment_date - supplemental_docs: Union[List[Dict[str, Any]], None, Unset] + supplemental_docs: list[dict[str, Any]] | None | Unset if isinstance(self.supplemental_docs, Unset): supplemental_docs = UNSET elif isinstance(self.supplemental_docs, list): @@ -124,7 +124,7 @@ def to_dict(self) -> Dict[str, Any]: else: supplemental_docs = self.supplemental_docs - file: Union[Dict[str, Any], None, Unset] + file: dict[str, Any] | None | Unset if isinstance(self.file, Unset): file = UNSET elif isinstance(self.file, GovernanceFile): @@ -132,7 +132,7 @@ def to_dict(self) -> Dict[str, Any]: else: file = self.file - authorship: Union[None, Unset, str] + authorship: None | Unset | str if isinstance(self.authorship, Unset): authorship = UNSET elif isinstance(self.authorship, GovernanceScope): @@ -140,7 +140,7 @@ def to_dict(self) -> Dict[str, Any]: else: authorship = self.authorship - project_file_map: Union[Dict[str, Any], None, Unset] + project_file_map: dict[str, Any] | None | Unset if isinstance(self.project_file_map, Unset): project_file_map = UNSET elif isinstance(self.project_file_map, GovernanceRequirementProjectFileMap): @@ -148,7 +148,7 @@ def to_dict(self) -> Dict[str, Any]: else: project_file_map = self.project_file_map - verification_method: Union[None, Unset, str] + verification_method: None | Unset | str if isinstance(self.verification_method, Unset): verification_method = UNSET elif isinstance(self.verification_method, GovernanceTrainingVerification): @@ -156,7 +156,7 @@ def to_dict(self) -> Dict[str, Any]: else: verification_method = self.verification_method - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -193,7 +193,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.governance_expiry import GovernanceExpiry from ..models.governance_file import GovernanceFile from ..models.governance_requirement_project_file_map import GovernanceRequirementProjectFileMap @@ -211,7 +211,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: scope = GovernanceScope(d.pop("scope")) - contact_ids = cast(List[str], d.pop("contactIds")) + contact_ids = cast(list[str], d.pop("contactIds")) expiration = GovernanceExpiry.from_dict(d.pop("expiration")) @@ -223,7 +223,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: project_id = d.pop("projectId", UNSET) - def _parse_acceptance(data: object) -> Union[GovernanceScope, None, Unset]: + def _parse_acceptance(data: object) -> GovernanceScope | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -236,11 +236,11 @@ def _parse_acceptance(data: object) -> Union[GovernanceScope, None, Unset]: return acceptance_type_1 except: # noqa: E722 pass - return cast(Union[GovernanceScope, None, Unset], data) + return cast(GovernanceScope | None | Unset, data) acceptance = _parse_acceptance(d.pop("acceptance", UNSET)) - def _parse_enactment_date(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_enactment_date(data: object) -> None | Unset | datetime.datetime: if data is None: return data if isinstance(data, Unset): @@ -253,11 +253,11 @@ def _parse_enactment_date(data: object) -> Union[None, Unset, datetime.datetime] return enactment_date_type_0 except: # noqa: E722 pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(None | Unset | datetime.datetime, data) enactment_date = _parse_enactment_date(d.pop("enactmentDate", UNSET)) - def _parse_supplemental_docs(data: object) -> Union[List["GovernanceFile"], None, Unset]: + def _parse_supplemental_docs(data: object) -> list["GovernanceFile"] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -275,7 +275,7 @@ def _parse_supplemental_docs(data: object) -> Union[List["GovernanceFile"], None return supplemental_docs_type_0 except: # noqa: E722 pass - return cast(Union[List["GovernanceFile"], None, Unset], data) + return cast(list["GovernanceFile"] | None | Unset, data) supplemental_docs = _parse_supplemental_docs(d.pop("supplementalDocs", UNSET)) @@ -296,7 +296,7 @@ def _parse_file(data: object) -> Union["GovernanceFile", None, Unset]: file = _parse_file(d.pop("file", UNSET)) - def _parse_authorship(data: object) -> Union[GovernanceScope, None, Unset]: + def _parse_authorship(data: object) -> GovernanceScope | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -309,7 +309,7 @@ def _parse_authorship(data: object) -> Union[GovernanceScope, None, Unset]: return authorship_type_1 except: # noqa: E722 pass - return cast(Union[GovernanceScope, None, Unset], data) + return cast(GovernanceScope | None | Unset, data) authorship = _parse_authorship(d.pop("authorship", UNSET)) @@ -330,7 +330,7 @@ def _parse_project_file_map(data: object) -> Union["GovernanceRequirementProject project_file_map = _parse_project_file_map(d.pop("projectFileMap", UNSET)) - def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerification, None, Unset]: + def _parse_verification_method(data: object) -> GovernanceTrainingVerification | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -343,7 +343,7 @@ def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerifica return verification_method_type_1 except: # noqa: E722 pass - return cast(Union[GovernanceTrainingVerification, None, Unset], data) + return cast(GovernanceTrainingVerification | None | Unset, data) verification_method = _parse_verification_method(d.pop("verificationMethod", UNSET)) @@ -373,5 +373,5 @@ def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerifica return governance_requirement @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_requirement_project_file_map.py b/cirro_api_client/v1/models/governance_requirement_project_file_map.py index 274aabf..5519eff 100644 --- a/cirro_api_client/v1/models/governance_requirement_project_file_map.py +++ b/cirro_api_client/v1/models/governance_requirement_project_file_map.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,10 +14,10 @@ class GovernanceRequirementProjectFileMap: """Files supplied by each project when authorship is project""" - additional_properties: Dict[str, "GovernanceFile"] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, "GovernanceFile"] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = prop.to_dict() field_dict.update({}) @@ -25,7 +25,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.governance_file import GovernanceFile d = src_dict.copy() @@ -41,5 +41,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return governance_requirement_project_file_map @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/group_cost.py b/cirro_api_client/v1/models/group_cost.py new file mode 100644 index 0000000..13d2ea5 --- /dev/null +++ b/cirro_api_client/v1/models/group_cost.py @@ -0,0 +1,55 @@ +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GroupCost") + + +@_attrs_define +class GroupCost: + """ + Attributes: + name (Union[Unset, str]): Task status group Example: CACHED. + cost (Union[Unset, float]): Cost + """ + + name: Unset | str = UNSET + cost: Unset | float = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + cost = self.cost + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if cost is not UNSET: + field_dict["cost"] = cost + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name", UNSET) + + cost = d.pop("cost", UNSET) + + group_cost = cls( + name=name, + cost=cost, + ) + + group_cost.additional_properties = d + return group_cost + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/import_data_request.py b/cirro_api_client/v1/models/import_data_request.py index c8c3c92..afe0ec4 100644 --- a/cirro_api_client/v1/models/import_data_request.py +++ b/cirro_api_client/v1/models/import_data_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,19 +23,19 @@ class ImportDataRequest: """ name: str - public_ids: List[str] - description: Union[Unset, str] = UNSET - tags: Union[List["Tag"], None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + public_ids: list[str] + description: Unset | str = UNSET + tags: list["Tag"] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name public_ids = self.public_ids description = self.description - tags: Union[List[Dict[str, Any]], None, Unset] + tags: list[dict[str, Any]] | None | Unset if isinstance(self.tags, Unset): tags = UNSET elif isinstance(self.tags, list): @@ -47,7 +47,7 @@ def to_dict(self) -> Dict[str, Any]: else: tags = self.tags - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -63,17 +63,17 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.tag import Tag d = src_dict.copy() name = d.pop("name") - public_ids = cast(List[str], d.pop("publicIds")) + public_ids = cast(list[str], d.pop("publicIds")) description = d.pop("description", UNSET) - def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: + def _parse_tags(data: object) -> list["Tag"] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -91,7 +91,7 @@ def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: return tags_type_0 except: # noqa: E722 pass - return cast(Union[List["Tag"], None, Unset], data) + return cast(list["Tag"] | None | Unset, data) tags = _parse_tags(d.pop("tags", UNSET)) @@ -106,5 +106,5 @@ def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: return import_data_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/invite_user_request.py b/cirro_api_client/v1/models/invite_user_request.py index 82762b0..8c457d6 100644 --- a/cirro_api_client/v1/models/invite_user_request.py +++ b/cirro_api_client/v1/models/invite_user_request.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,16 +18,16 @@ class InviteUserRequest: name: str organization: str email: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name organization = self.organization email = self.email - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,7 +40,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -58,5 +58,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return invite_user_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/invite_user_response.py b/cirro_api_client/v1/models/invite_user_response.py index ee42ed6..5fa148a 100644 --- a/cirro_api_client/v1/models/invite_user_response.py +++ b/cirro_api_client/v1/models/invite_user_response.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,12 +14,12 @@ class InviteUserResponse: """ message: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: message = self.message - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() message = d.pop("message") @@ -42,5 +42,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return invite_user_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/log_entry.py b/cirro_api_client/v1/models/log_entry.py index 0e570c6..949a47a 100644 --- a/cirro_api_client/v1/models/log_entry.py +++ b/cirro_api_client/v1/models/log_entry.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,15 +17,15 @@ class LogEntry: """ message: str - timestamp: Union[Unset, int] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + timestamp: Unset | int = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: message = self.message timestamp = self.timestamp - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -38,7 +38,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() message = d.pop("message") @@ -53,5 +53,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return log_entry @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/login_provider.py b/cirro_api_client/v1/models/login_provider.py index babf40e..e6fb9f9 100644 --- a/cirro_api_client/v1/models/login_provider.py +++ b/cirro_api_client/v1/models/login_provider.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,9 +20,9 @@ class LoginProvider: name: str description: str logo_url: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -31,7 +31,7 @@ def to_dict(self) -> Dict[str, Any]: logo_url = self.logo_url - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -45,7 +45,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -66,5 +66,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return login_provider @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/message.py b/cirro_api_client/v1/models/message.py index 32b120d..5ae1306 100644 --- a/cirro_api_client/v1/models/message.py +++ b/cirro_api_client/v1/models/message.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -33,15 +33,15 @@ class Message: message_type: MessageType id: str message: str - links: List["Entity"] + links: list["Entity"] has_replies: bool created_by: str created_at: datetime.datetime updated_at: datetime.datetime - parent_message_id: Union[None, Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + parent_message_id: None | Unset | str = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: message_type = self.message_type.value id = self.id @@ -61,13 +61,13 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - parent_message_id: Union[None, Unset, str] + parent_message_id: None | Unset | str if isinstance(self.parent_message_id, Unset): parent_message_id = UNSET else: parent_message_id = self.parent_message_id - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -87,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.entity import Entity d = src_dict.copy() @@ -112,12 +112,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: updated_at = isoparse(d.pop("updatedAt")) - def _parse_parent_message_id(data: object) -> Union[None, Unset, str]: + def _parse_parent_message_id(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) parent_message_id = _parse_parent_message_id(d.pop("parentMessageId", UNSET)) @@ -137,5 +137,5 @@ def _parse_parent_message_id(data: object) -> Union[None, Unset, str]: return message @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/message_input.py b/cirro_api_client/v1/models/message_input.py index 613adea..9a7811b 100644 --- a/cirro_api_client/v1/models/message_input.py +++ b/cirro_api_client/v1/models/message_input.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,19 +17,19 @@ class MessageInput: """ message: str - parent_message_id: Union[None, Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + parent_message_id: None | Unset | str = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: message = self.message - parent_message_id: Union[None, Unset, str] + parent_message_id: None | Unset | str if isinstance(self.parent_message_id, Unset): parent_message_id = UNSET else: parent_message_id = self.parent_message_id - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,16 +42,16 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() message = d.pop("message") - def _parse_parent_message_id(data: object) -> Union[None, Unset, str]: + def _parse_parent_message_id(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) parent_message_id = _parse_parent_message_id(d.pop("parentMessageId", UNSET)) @@ -64,5 +64,5 @@ def _parse_parent_message_id(data: object) -> Union[None, Unset, str]: return message_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/metric_record.py b/cirro_api_client/v1/models/metric_record.py index ad5bc21..d37abec 100644 --- a/cirro_api_client/v1/models/metric_record.py +++ b/cirro_api_client/v1/models/metric_record.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,22 +25,22 @@ class MetricRecord: """ unit: str - date: Union[Unset, datetime.date] = UNSET + date: Unset | datetime.date = UNSET services: Union[Unset, "MetricRecordServices"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: unit = self.unit - date: Union[Unset, str] = UNSET + date: Unset | str = UNSET if not isinstance(self.date, Unset): date = self.date.isoformat() - services: Union[Unset, Dict[str, Any]] = UNSET + services: Unset | dict[str, Any] = UNSET if not isinstance(self.services, Unset): services = self.services.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -55,21 +55,21 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.metric_record_services import MetricRecordServices d = src_dict.copy() unit = d.pop("unit") _date = d.pop("date", UNSET) - date: Union[Unset, datetime.date] + date: Unset | datetime.date if isinstance(_date, Unset): date = UNSET else: date = isoparse(_date).date() _services = d.pop("services", UNSET) - services: Union[Unset, MetricRecordServices] + services: Unset | MetricRecordServices if isinstance(_services, Unset): services = UNSET else: @@ -85,5 +85,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return metric_record @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/metric_record_services.py b/cirro_api_client/v1/models/metric_record_services.py index 5649a8f..d06daff 100644 --- a/cirro_api_client/v1/models/metric_record_services.py +++ b/cirro_api_client/v1/models/metric_record_services.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,17 +15,17 @@ class MetricRecordServices: """ - additional_properties: Dict[str, float] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, float] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() metric_record_services = cls() @@ -33,5 +33,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return metric_record_services @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/mounted_dataset.py b/cirro_api_client/v1/models/mounted_dataset.py new file mode 100644 index 0000000..b47898f --- /dev/null +++ b/cirro_api_client/v1/models/mounted_dataset.py @@ -0,0 +1,55 @@ +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MountedDataset") + + +@_attrs_define +class MountedDataset: + """Represents a mounted dataset in a workspace + + Attributes: + name (str): Folder name that appears in the workspace + uri (str): Full S3 prefix to the data + """ + + name: str + uri: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + uri = self.uri + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "uri": uri, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + uri = d.pop("uri") + + mounted_dataset = cls( + name=name, + uri=uri, + ) + + mounted_dataset.additional_properties = d + return mounted_dataset + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/move_dataset_input.py b/cirro_api_client/v1/models/move_dataset_input.py index 5d3182c..9e3844d 100644 --- a/cirro_api_client/v1/models/move_dataset_input.py +++ b/cirro_api_client/v1/models/move_dataset_input.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,16 +18,16 @@ class MoveDatasetInput: dataset_id: str source_project_id: str target_project_id: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: dataset_id = self.dataset_id source_project_id = self.source_project_id target_project_id = self.target_project_id - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,7 +40,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() dataset_id = d.pop("datasetId") @@ -58,5 +58,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return move_dataset_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/move_dataset_response.py b/cirro_api_client/v1/models/move_dataset_response.py index 2180e35..ccbea4f 100644 --- a/cirro_api_client/v1/models/move_dataset_response.py +++ b/cirro_api_client/v1/models/move_dataset_response.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,17 +17,17 @@ class MoveDatasetResponse: s_3_copy_command: str s_3_delete_command: str - samples_not_moved: List[str] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + samples_not_moved: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: s_3_copy_command = self.s_3_copy_command s_3_delete_command = self.s_3_delete_command samples_not_moved = self.samples_not_moved - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,13 +40,13 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() s_3_copy_command = d.pop("s3CopyCommand") s_3_delete_command = d.pop("s3DeleteCommand") - samples_not_moved = cast(List[str], d.pop("samplesNotMoved")) + samples_not_moved = cast(list[str], d.pop("samplesNotMoved")) move_dataset_response = cls( s_3_copy_command=s_3_copy_command, @@ -58,5 +58,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return move_dataset_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/named_item.py b/cirro_api_client/v1/models/named_item.py index 2350132..967aa6d 100644 --- a/cirro_api_client/v1/models/named_item.py +++ b/cirro_api_client/v1/models/named_item.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class NamedItem: id: str name: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,7 +35,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -50,5 +50,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return named_item @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/notebook_instance.py b/cirro_api_client/v1/models/notebook_instance.py index 6917f63..0e92783 100644 --- a/cirro_api_client/v1/models/notebook_instance.py +++ b/cirro_api_client/v1/models/notebook_instance.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -33,16 +33,16 @@ class NotebookInstance: status: Status status_message: str instance_type: str - accelerator_types: List[str] - git_repositories: List[str] + accelerator_types: list[str] + git_repositories: list[str] volume_size_gb: int is_shared_with_project: bool created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -67,7 +67,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -101,9 +101,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: instance_type = d.pop("instanceType") - accelerator_types = cast(List[str], d.pop("acceleratorTypes")) + accelerator_types = cast(list[str], d.pop("acceleratorTypes")) - git_repositories = cast(List[str], d.pop("gitRepositories")) + git_repositories = cast(list[str], d.pop("gitRepositories")) volume_size_gb = d.pop("volumeSizeGB") @@ -134,5 +134,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return notebook_instance @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/notebook_instance_status_response.py b/cirro_api_client/v1/models/notebook_instance_status_response.py index 8042a48..68182d0 100644 --- a/cirro_api_client/v1/models/notebook_instance_status_response.py +++ b/cirro_api_client/v1/models/notebook_instance_status_response.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class NotebookInstanceStatusResponse: status: str status_message: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: status = self.status status_message = self.status_message - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,7 +35,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() status = d.pop("status") @@ -50,5 +50,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return notebook_instance_status_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/open_notebook_instance_response.py b/cirro_api_client/v1/models/open_notebook_instance_response.py index de09606..1c56285 100644 --- a/cirro_api_client/v1/models/open_notebook_instance_response.py +++ b/cirro_api_client/v1/models/open_notebook_instance_response.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class OpenNotebookInstanceResponse: url: str message: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: url = self.url message = self.message - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,7 +35,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() url = d.pop("url") @@ -50,5 +50,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return open_notebook_instance_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/paginated_response_dataset_list_dto.py b/cirro_api_client/v1/models/paginated_response_dataset_list_dto.py index 02f7cd2..2a48ecd 100644 --- a/cirro_api_client/v1/models/paginated_response_dataset_list_dto.py +++ b/cirro_api_client/v1/models/paginated_response_dataset_list_dto.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,11 +18,11 @@ class PaginatedResponseDatasetListDto: next_token (str): """ - data: List["Dataset"] + data: list["Dataset"] next_token: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: next_token = self.next_token - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,7 +42,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.dataset import Dataset d = src_dict.copy() @@ -64,5 +64,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return paginated_response_dataset_list_dto @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/paginated_response_discussion.py b/cirro_api_client/v1/models/paginated_response_discussion.py index c0ed35f..cedec65 100644 --- a/cirro_api_client/v1/models/paginated_response_discussion.py +++ b/cirro_api_client/v1/models/paginated_response_discussion.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,11 +18,11 @@ class PaginatedResponseDiscussion: next_token (str): """ - data: List["Discussion"] + data: list["Discussion"] next_token: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: next_token = self.next_token - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,7 +42,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.discussion import Discussion d = src_dict.copy() @@ -64,5 +64,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return paginated_response_discussion @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/paginated_response_message.py b/cirro_api_client/v1/models/paginated_response_message.py index 17022c9..cce6f2b 100644 --- a/cirro_api_client/v1/models/paginated_response_message.py +++ b/cirro_api_client/v1/models/paginated_response_message.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,11 +18,11 @@ class PaginatedResponseMessage: next_token (str): """ - data: List["Message"] + data: list["Message"] next_token: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: next_token = self.next_token - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,7 +42,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.message import Message d = src_dict.copy() @@ -64,5 +64,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return paginated_response_message @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/paginated_response_sample_dto.py b/cirro_api_client/v1/models/paginated_response_sample_dto.py index 75b4995..116f6c7 100644 --- a/cirro_api_client/v1/models/paginated_response_sample_dto.py +++ b/cirro_api_client/v1/models/paginated_response_sample_dto.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,11 +18,11 @@ class PaginatedResponseSampleDto: next_token (str): """ - data: List["Sample"] + data: list["Sample"] next_token: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: next_token = self.next_token - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,7 +42,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.sample import Sample d = src_dict.copy() @@ -64,5 +64,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return paginated_response_sample_dto @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/paginated_response_user_dto.py b/cirro_api_client/v1/models/paginated_response_user_dto.py index 65f185a..0a30e8b 100644 --- a/cirro_api_client/v1/models/paginated_response_user_dto.py +++ b/cirro_api_client/v1/models/paginated_response_user_dto.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,11 +18,11 @@ class PaginatedResponseUserDto: next_token (str): """ - data: List["User"] + data: list["User"] next_token: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: next_token = self.next_token - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,7 +42,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.user import User d = src_dict.copy() @@ -64,5 +64,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return paginated_response_user_dto @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/pipeline_code.py b/cirro_api_client/v1/models/pipeline_code.py index bd60ed8..7e4d4f9 100644 --- a/cirro_api_client/v1/models/pipeline_code.py +++ b/cirro_api_client/v1/models/pipeline_code.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,9 +23,9 @@ class PipelineCode: version: str repository_type: RepositoryType entry_point: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: repository_path = self.repository_path version = self.version @@ -34,7 +34,7 @@ def to_dict(self) -> Dict[str, Any]: entry_point = self.entry_point - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -48,7 +48,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() repository_path = d.pop("repositoryPath") @@ -69,5 +69,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return pipeline_code @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/pipeline_cost.py b/cirro_api_client/v1/models/pipeline_cost.py index 4a9e401..9650495 100644 --- a/cirro_api_client/v1/models/pipeline_cost.py +++ b/cirro_api_client/v1/models/pipeline_cost.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,13 +17,13 @@ class PipelineCost: description (Union[Unset, str]): Description of the cost calculation """ - total_cost: Union[None, Unset, float] = UNSET - is_estimate: Union[Unset, bool] = UNSET - description: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + total_cost: None | Unset | float = UNSET + is_estimate: Unset | bool = UNSET + description: Unset | str = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - total_cost: Union[None, Unset, float] + def to_dict(self) -> dict[str, Any]: + total_cost: None | Unset | float if isinstance(self.total_cost, Unset): total_cost = UNSET else: @@ -33,7 +33,7 @@ def to_dict(self) -> Dict[str, Any]: description = self.description - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if total_cost is not UNSET: @@ -46,15 +46,15 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() - def _parse_total_cost(data: object) -> Union[None, Unset, float]: + def _parse_total_cost(data: object) -> None | Unset | float: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, float], data) + return cast(None | Unset | float, data) total_cost = _parse_total_cost(d.pop("totalCost", UNSET)) @@ -72,5 +72,5 @@ def _parse_total_cost(data: object) -> Union[None, Unset, float]: return pipeline_cost @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/portal_error_response.py b/cirro_api_client/v1/models/portal_error_response.py index e7f445f..87edcd5 100644 --- a/cirro_api_client/v1/models/portal_error_response.py +++ b/cirro_api_client/v1/models/portal_error_response.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,10 +23,10 @@ class PortalErrorResponse: status_code: int error_code: str error_detail: str - errors: List["ErrorMessage"] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + errors: list["ErrorMessage"] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: status_code = self.status_code error_code = self.error_code @@ -38,7 +38,7 @@ def to_dict(self) -> Dict[str, Any]: errors_item = errors_item_data.to_dict() errors.append(errors_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -52,7 +52,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.error_message import ErrorMessage d = src_dict.copy() @@ -80,5 +80,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return portal_error_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/process.py b/cirro_api_client/v1/models/process.py index 513eb8d..c0572a3 100644 --- a/cirro_api_client/v1/models/process.py +++ b/cirro_api_client/v1/models/process.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -44,23 +44,23 @@ class Process: description: str data_type: str executor: Executor - child_process_ids: List[str] - parent_process_ids: List[str] - linked_project_ids: List[str] + child_process_ids: list[str] + parent_process_ids: list[str] + linked_project_ids: list[str] is_tenant_wide: bool allow_multiple_sources: bool uses_sample_sheet: bool is_archived: bool - category: Union[Unset, str] = UNSET - pipeline_type: Union[Unset, str] = UNSET - documentation_url: Union[Unset, str] = UNSET - file_requirements_message: Union[Unset, str] = UNSET - owner: Union[None, Unset, str] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + category: Unset | str = UNSET + pipeline_type: Unset | str = UNSET + documentation_url: Unset | str = UNSET + file_requirements_message: Unset | str = UNSET + owner: None | Unset | str = UNSET + created_at: Unset | datetime.datetime = UNSET + updated_at: Unset | datetime.datetime = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -93,21 +93,21 @@ def to_dict(self) -> Dict[str, Any]: file_requirements_message = self.file_requirements_message - owner: Union[None, Unset, str] + owner: None | Unset | str if isinstance(self.owner, Unset): owner = UNSET else: owner = self.owner - created_at: Union[Unset, str] = UNSET + created_at: Unset | str = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - updated_at: Union[Unset, str] = UNSET + updated_at: Unset | str = UNSET if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -143,7 +143,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -155,11 +155,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: executor = Executor(d.pop("executor")) - child_process_ids = cast(List[str], d.pop("childProcessIds")) + child_process_ids = cast(list[str], d.pop("childProcessIds")) - parent_process_ids = cast(List[str], d.pop("parentProcessIds")) + parent_process_ids = cast(list[str], d.pop("parentProcessIds")) - linked_project_ids = cast(List[str], d.pop("linkedProjectIds")) + linked_project_ids = cast(list[str], d.pop("linkedProjectIds")) is_tenant_wide = d.pop("isTenantWide") @@ -177,24 +177,24 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: file_requirements_message = d.pop("fileRequirementsMessage", UNSET) - def _parse_owner(data: object) -> Union[None, Unset, str]: + def _parse_owner(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) owner = _parse_owner(d.pop("owner", UNSET)) _created_at = d.pop("createdAt", UNSET) - created_at: Union[Unset, datetime.datetime] + created_at: Unset | datetime.datetime if isinstance(_created_at, Unset): created_at = UNSET else: created_at = isoparse(_created_at) _updated_at = d.pop("updatedAt", UNSET) - updated_at: Union[Unset, datetime.datetime] + updated_at: Unset | datetime.datetime if isinstance(_updated_at, Unset): updated_at = UNSET else: @@ -226,5 +226,5 @@ def _parse_owner(data: object) -> Union[None, Unset, str]: return process @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/process_detail.py b/cirro_api_client/v1/models/process_detail.py index d362c70..da73a3b 100644 --- a/cirro_api_client/v1/models/process_detail.py +++ b/cirro_api_client/v1/models/process_detail.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -53,26 +53,26 @@ class ProcessDetail: description: str data_type: str executor: Executor - child_process_ids: List[str] - parent_process_ids: List[str] - linked_project_ids: List[str] + child_process_ids: list[str] + parent_process_ids: list[str] + linked_project_ids: list[str] is_tenant_wide: bool allow_multiple_sources: bool uses_sample_sheet: bool is_archived: bool - category: Union[Unset, str] = UNSET - pipeline_type: Union[Unset, str] = UNSET - documentation_url: Union[Unset, str] = UNSET - file_requirements_message: Union[Unset, str] = UNSET + category: Unset | str = UNSET + pipeline_type: Unset | str = UNSET + documentation_url: Unset | str = UNSET + file_requirements_message: Unset | str = UNSET pipeline_code: Union["PipelineCode", None, Unset] = UNSET - owner: Union[None, Unset, str] = UNSET + owner: None | Unset | str = UNSET custom_settings: Union["CustomPipelineSettings", None, Unset] = UNSET - file_mapping_rules: Union[List["FileMappingRule"], None, Unset] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + file_mapping_rules: list["FileMappingRule"] | None | Unset = UNSET + created_at: Unset | datetime.datetime = UNSET + updated_at: Unset | datetime.datetime = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.custom_pipeline_settings import CustomPipelineSettings from ..models.pipeline_code import PipelineCode @@ -108,7 +108,7 @@ def to_dict(self) -> Dict[str, Any]: file_requirements_message = self.file_requirements_message - pipeline_code: Union[Dict[str, Any], None, Unset] + pipeline_code: dict[str, Any] | None | Unset if isinstance(self.pipeline_code, Unset): pipeline_code = UNSET elif isinstance(self.pipeline_code, PipelineCode): @@ -116,13 +116,13 @@ def to_dict(self) -> Dict[str, Any]: else: pipeline_code = self.pipeline_code - owner: Union[None, Unset, str] + owner: None | Unset | str if isinstance(self.owner, Unset): owner = UNSET else: owner = self.owner - custom_settings: Union[Dict[str, Any], None, Unset] + custom_settings: dict[str, Any] | None | Unset if isinstance(self.custom_settings, Unset): custom_settings = UNSET elif isinstance(self.custom_settings, CustomPipelineSettings): @@ -130,7 +130,7 @@ def to_dict(self) -> Dict[str, Any]: else: custom_settings = self.custom_settings - file_mapping_rules: Union[List[Dict[str, Any]], None, Unset] + file_mapping_rules: list[dict[str, Any]] | None | Unset if isinstance(self.file_mapping_rules, Unset): file_mapping_rules = UNSET elif isinstance(self.file_mapping_rules, list): @@ -142,15 +142,15 @@ def to_dict(self) -> Dict[str, Any]: else: file_mapping_rules = self.file_mapping_rules - created_at: Union[Unset, str] = UNSET + created_at: Unset | str = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - updated_at: Union[Unset, str] = UNSET + updated_at: Unset | str = UNSET if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -192,7 +192,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.custom_pipeline_settings import CustomPipelineSettings from ..models.file_mapping_rule import FileMappingRule from ..models.pipeline_code import PipelineCode @@ -208,11 +208,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: executor = Executor(d.pop("executor")) - child_process_ids = cast(List[str], d.pop("childProcessIds")) + child_process_ids = cast(list[str], d.pop("childProcessIds")) - parent_process_ids = cast(List[str], d.pop("parentProcessIds")) + parent_process_ids = cast(list[str], d.pop("parentProcessIds")) - linked_project_ids = cast(List[str], d.pop("linkedProjectIds")) + linked_project_ids = cast(list[str], d.pop("linkedProjectIds")) is_tenant_wide = d.pop("isTenantWide") @@ -247,12 +247,12 @@ def _parse_pipeline_code(data: object) -> Union["PipelineCode", None, Unset]: pipeline_code = _parse_pipeline_code(d.pop("pipelineCode", UNSET)) - def _parse_owner(data: object) -> Union[None, Unset, str]: + def _parse_owner(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) owner = _parse_owner(d.pop("owner", UNSET)) @@ -273,7 +273,7 @@ def _parse_custom_settings(data: object) -> Union["CustomPipelineSettings", None custom_settings = _parse_custom_settings(d.pop("customSettings", UNSET)) - def _parse_file_mapping_rules(data: object) -> Union[List["FileMappingRule"], None, Unset]: + def _parse_file_mapping_rules(data: object) -> list["FileMappingRule"] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -291,19 +291,19 @@ def _parse_file_mapping_rules(data: object) -> Union[List["FileMappingRule"], No return file_mapping_rules_type_0 except: # noqa: E722 pass - return cast(Union[List["FileMappingRule"], None, Unset], data) + return cast(list["FileMappingRule"] | None | Unset, data) file_mapping_rules = _parse_file_mapping_rules(d.pop("fileMappingRules", UNSET)) _created_at = d.pop("createdAt", UNSET) - created_at: Union[Unset, datetime.datetime] + created_at: Unset | datetime.datetime if isinstance(_created_at, Unset): created_at = UNSET else: created_at = isoparse(_created_at) _updated_at = d.pop("updatedAt", UNSET) - updated_at: Union[Unset, datetime.datetime] + updated_at: Unset | datetime.datetime if isinstance(_updated_at, Unset): updated_at = UNSET else: @@ -338,5 +338,5 @@ def _parse_file_mapping_rules(data: object) -> Union[List["FileMappingRule"], No return process_detail @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project.py b/cirro_api_client/v1/models/project.py index b409ff2..59b885f 100644 --- a/cirro_api_client/v1/models/project.py +++ b/cirro_api_client/v1/models/project.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -30,13 +30,13 @@ class Project: name: str description: str status: Status - tags: List["Tag"] + tags: list["Tag"] organization: str - classification_ids: List[str] + classification_ids: list[str] billing_account_id: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -56,7 +56,7 @@ def to_dict(self) -> Dict[str, Any]: billing_account_id = self.billing_account_id - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.tag import Tag d = src_dict.copy() @@ -95,7 +95,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: organization = d.pop("organization") - classification_ids = cast(List[str], d.pop("classificationIds")) + classification_ids = cast(list[str], d.pop("classificationIds")) billing_account_id = d.pop("billingAccountId") @@ -114,5 +114,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return project @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_access_request.py b/cirro_api_client/v1/models/project_access_request.py index 7b0a13b..1e29e3b 100644 --- a/cirro_api_client/v1/models/project_access_request.py +++ b/cirro_api_client/v1/models/project_access_request.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -35,9 +35,9 @@ class ProjectAccessRequest: reviewer_username: str created_at: datetime.datetime expiry: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id username = self.username @@ -56,7 +56,7 @@ def to_dict(self) -> Dict[str, Any]: expiry = self.expiry.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -111,5 +111,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return project_access_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_create_options.py b/cirro_api_client/v1/models/project_create_options.py index df22131..8a12143 100644 --- a/cirro_api_client/v1/models/project_create_options.py +++ b/cirro_api_client/v1/models/project_create_options.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,14 +19,14 @@ class ProjectCreateOptions: wizard_url (str): """ - enabled_account_types: List[CloudAccountType] + enabled_account_types: list[CloudAccountType] portal_account_id: str portal_region: str template_url: str wizard_url: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: enabled_account_types = [] for enabled_account_types_item_data in self.enabled_account_types: enabled_account_types_item = enabled_account_types_item_data.value @@ -40,7 +40,7 @@ def to_dict(self) -> Dict[str, Any]: wizard_url = self.wizard_url - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -55,7 +55,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() enabled_account_types = [] _enabled_account_types = d.pop("enabledAccountTypes") @@ -84,5 +84,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return project_create_options @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_detail.py b/cirro_api_client/v1/models/project_detail.py index fe1d17c..f6d61b0 100644 --- a/cirro_api_client/v1/models/project_detail.py +++ b/cirro_api_client/v1/models/project_detail.py @@ -1,11 +1,12 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from dateutil.parser import isoparse from ..models.status import Status +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.cloud_account import CloudAccount @@ -36,26 +37,28 @@ class ProjectDetail: created_by (str): created_at (datetime.datetime): updated_at (datetime.datetime): + deployed_at (Union[None, Unset, datetime.datetime]): """ id: str name: str description: str billing_account_id: str - contacts: List["Contact"] + contacts: list["Contact"] organization: str status: Status settings: "ProjectSettings" account: "CloudAccount" status_message: str - tags: List["Tag"] - classification_ids: List[str] + tags: list["Tag"] + classification_ids: list[str] created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + deployed_at: None | Unset | datetime.datetime = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -92,7 +95,15 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + deployed_at: None | Unset | str + if isinstance(self.deployed_at, Unset): + deployed_at = UNSET + elif isinstance(self.deployed_at, datetime.datetime): + deployed_at = self.deployed_at.isoformat() + else: + deployed_at = self.deployed_at + + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -113,11 +124,13 @@ def to_dict(self) -> Dict[str, Any]: "updatedAt": updated_at, } ) + if deployed_at is not UNSET: + field_dict["deployedAt"] = deployed_at return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.cloud_account import CloudAccount from ..models.contact import Contact from ..models.project_settings import ProjectSettings @@ -156,7 +169,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: tags.append(tags_item) - classification_ids = cast(List[str], d.pop("classificationIds")) + classification_ids = cast(list[str], d.pop("classificationIds")) created_by = d.pop("createdBy") @@ -164,6 +177,23 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: updated_at = isoparse(d.pop("updatedAt")) + def _parse_deployed_at(data: object) -> None | Unset | datetime.datetime: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + deployed_at_type_0 = isoparse(data) + + return deployed_at_type_0 + except: # noqa: E722 + pass + return cast(None | Unset | datetime.datetime, data) + + deployed_at = _parse_deployed_at(d.pop("deployedAt", UNSET)) + project_detail = cls( id=id, name=name, @@ -180,11 +210,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: created_by=created_by, created_at=created_at, updated_at=updated_at, + deployed_at=deployed_at, ) project_detail.additional_properties = d return project_detail @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_file_access_request.py b/cirro_api_client/v1/models/project_file_access_request.py index a2a3f6c..4b24171 100644 --- a/cirro_api_client/v1/models/project_file_access_request.py +++ b/cirro_api_client/v1/models/project_file_access_request.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,26 +19,26 @@ class ProjectFileAccessRequest: """ access_type: ProjectAccessType - dataset_id: Union[None, Unset, str] = UNSET - token_lifetime_hours: Union[None, Unset, int] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + dataset_id: None | Unset | str = UNSET + token_lifetime_hours: None | Unset | int = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: access_type = self.access_type.value - dataset_id: Union[None, Unset, str] + dataset_id: None | Unset | str if isinstance(self.dataset_id, Unset): dataset_id = UNSET else: dataset_id = self.dataset_id - token_lifetime_hours: Union[None, Unset, int] + token_lifetime_hours: None | Unset | int if isinstance(self.token_lifetime_hours, Unset): token_lifetime_hours = UNSET else: token_lifetime_hours = self.token_lifetime_hours - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -53,25 +53,25 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() access_type = ProjectAccessType(d.pop("accessType")) - def _parse_dataset_id(data: object) -> Union[None, Unset, str]: + def _parse_dataset_id(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) dataset_id = _parse_dataset_id(d.pop("datasetId", UNSET)) - def _parse_token_lifetime_hours(data: object) -> Union[None, Unset, int]: + def _parse_token_lifetime_hours(data: object) -> None | Unset | int: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, int], data) + return cast(None | Unset | int, data) token_lifetime_hours = _parse_token_lifetime_hours(d.pop("tokenLifetimeHours", UNSET)) @@ -85,5 +85,5 @@ def _parse_token_lifetime_hours(data: object) -> Union[None, Unset, int]: return project_file_access_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_input.py b/cirro_api_client/v1/models/project_input.py index 91a60ad..8dfd057 100644 --- a/cirro_api_client/v1/models/project_input.py +++ b/cirro_api_client/v1/models/project_input.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -33,13 +33,13 @@ class ProjectInput: description: str billing_account_id: str settings: "ProjectSettings" - contacts: List["Contact"] + contacts: list["Contact"] account: Union["CloudAccount", None, Unset] = UNSET - classification_ids: Union[List[str], None, Unset] = UNSET - tags: Union[List["Tag"], None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + classification_ids: list[str] | None | Unset = UNSET + tags: list["Tag"] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.cloud_account import CloudAccount name = self.name @@ -55,7 +55,7 @@ def to_dict(self) -> Dict[str, Any]: contacts_item = contacts_item_data.to_dict() contacts.append(contacts_item) - account: Union[Dict[str, Any], None, Unset] + account: dict[str, Any] | None | Unset if isinstance(self.account, Unset): account = UNSET elif isinstance(self.account, CloudAccount): @@ -63,7 +63,7 @@ def to_dict(self) -> Dict[str, Any]: else: account = self.account - classification_ids: Union[List[str], None, Unset] + classification_ids: list[str] | None | Unset if isinstance(self.classification_ids, Unset): classification_ids = UNSET elif isinstance(self.classification_ids, list): @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: else: classification_ids = self.classification_ids - tags: Union[List[Dict[str, Any]], None, Unset] + tags: list[dict[str, Any]] | None | Unset if isinstance(self.tags, Unset): tags = UNSET elif isinstance(self.tags, list): @@ -84,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: else: tags = self.tags - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -105,7 +105,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.cloud_account import CloudAccount from ..models.contact import Contact from ..models.project_settings import ProjectSettings @@ -144,7 +144,7 @@ def _parse_account(data: object) -> Union["CloudAccount", None, Unset]: account = _parse_account(d.pop("account", UNSET)) - def _parse_classification_ids(data: object) -> Union[List[str], None, Unset]: + def _parse_classification_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -152,16 +152,16 @@ def _parse_classification_ids(data: object) -> Union[List[str], None, Unset]: try: if not isinstance(data, list): raise TypeError() - classification_ids_type_0 = cast(List[str], data) + classification_ids_type_0 = cast(list[str], data) return classification_ids_type_0 except: # noqa: E722 pass - return cast(Union[List[str], None, Unset], data) + return cast(list[str] | None | Unset, data) classification_ids = _parse_classification_ids(d.pop("classificationIds", UNSET)) - def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: + def _parse_tags(data: object) -> list["Tag"] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -179,7 +179,7 @@ def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: return tags_type_0 except: # noqa: E722 pass - return cast(Union[List["Tag"], None, Unset], data) + return cast(list["Tag"] | None | Unset, data) tags = _parse_tags(d.pop("tags", UNSET)) @@ -198,5 +198,5 @@ def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: return project_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_metrics.py b/cirro_api_client/v1/models/project_metrics.py index 1c7de9f..46b52dd 100644 --- a/cirro_api_client/v1/models/project_metrics.py +++ b/cirro_api_client/v1/models/project_metrics.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,54 +17,37 @@ class ProjectMetrics: """ Attributes: project_id (str): - costs (Union[Unset, List['MetricRecord']]): Costs by service by month Example: [{ - "date": "2022-11-01", - "unit": "$", - "service": { - "Other": 26.47, - "EC2 - Other": 3.66, - "Amazon Elastic Compute Cloud - Compute": 140.59, - "Amazon Simple Storage Service": 24.91, - "AmazonCloudWatch": 2.09 - } - }] - . - storage_metrics (Union[Unset, List['MetricRecord']]): Storage usage by tier by day Example: [{ - "date": "2023-12-12", - "unit": "GB", - "service": { - "IntelligentTieringAIAStorage": 4198.95, - "IntelligentTieringFAStorage": 1516.48, - "StandardStorage": 1.9, - "IntelligentTieringIAStorage": 2154.6 - } - }] - . + costs (Union[Unset, List['MetricRecord']]): Costs by service by month Example: [{'date': datetime.date(2022, 11, + 1), 'unit': '$', 'service': {'Other': 26.47, 'EC2 - Other': 3.66, 'Amazon Elastic Compute Cloud - Compute': + 140.59, 'Amazon Simple Storage Service': 24.91, 'AmazonCloudWatch': 2.09}}]. + storage_metrics (Union[Unset, List['MetricRecord']]): Storage usage by tier by day Example: [{'date': + datetime.date(2023, 12, 12), 'unit': 'GB', 'service': {'IntelligentTieringAIAStorage': 4198.95, + 'IntelligentTieringFAStorage': 1516.48, 'StandardStorage': 1.9, 'IntelligentTieringIAStorage': 2154.6}}]. """ project_id: str - costs: Union[Unset, List["MetricRecord"]] = UNSET - storage_metrics: Union[Unset, List["MetricRecord"]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + costs: Unset | list["MetricRecord"] = UNSET + storage_metrics: Unset | list["MetricRecord"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: project_id = self.project_id - costs: Union[Unset, List[Dict[str, Any]]] = UNSET + costs: Unset | list[dict[str, Any]] = UNSET if not isinstance(self.costs, Unset): costs = [] for costs_item_data in self.costs: costs_item = costs_item_data.to_dict() costs.append(costs_item) - storage_metrics: Union[Unset, List[Dict[str, Any]]] = UNSET + storage_metrics: Unset | list[dict[str, Any]] = UNSET if not isinstance(self.storage_metrics, Unset): storage_metrics = [] for storage_metrics_item_data in self.storage_metrics: storage_metrics_item = storage_metrics_item_data.to_dict() storage_metrics.append(storage_metrics_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -79,7 +62,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.metric_record import MetricRecord d = src_dict.copy() @@ -109,5 +92,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return project_metrics @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_request.py b/cirro_api_client/v1/models/project_request.py index fdbf74a..dc9be52 100644 --- a/cirro_api_client/v1/models/project_request.py +++ b/cirro_api_client/v1/models/project_request.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,13 +20,13 @@ class ProjectRequest: name: str description: str - classification_ids: List[str] + classification_ids: list[str] billing_info: str admin_username: str message: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description @@ -39,7 +39,7 @@ def to_dict(self) -> Dict[str, Any]: message = self.message - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -55,13 +55,13 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") description = d.pop("description") - classification_ids = cast(List[str], d.pop("classificationIds")) + classification_ids = cast(list[str], d.pop("classificationIds")) billing_info = d.pop("billingInfo") @@ -82,5 +82,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return project_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_requirement.py b/cirro_api_client/v1/models/project_requirement.py index d73099b..6984b95 100644 --- a/cirro_api_client/v1/models/project_requirement.py +++ b/cirro_api_client/v1/models/project_requirement.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -52,6 +52,8 @@ class ProjectRequirement: fulfillment_date (Union[None, Unset, datetime.datetime]): The date the requirement was fulfilled by the user fulfillment_file (Union[None, Unset, str]): The optional file uploaded to fulfill the requirement fulfillment_path (Union[None, Unset, str]): The path to the optional fulfillment file + requires_user_fulfillment (Union[Unset, bool]): Whether this requirement requires the user to fulfill (it is + active, requires fulfillment, and user has not fulfilled """ id: str @@ -61,26 +63,27 @@ class ProjectRequirement: path: str supplemental_path: str scope: GovernanceScope - contacts: List["GovernanceContact"] + contacts: list["GovernanceContact"] is_enacted: bool is_project_configured: bool is_fulfilled: bool - acceptance: Union[GovernanceScope, None, Unset] = UNSET - enactment_date: Union[None, Unset, datetime.datetime] = UNSET - expiration_type: Union[Unset, GovernanceExpiryType] = UNSET - expiration_days_after_completion: Union[None, Unset, int] = UNSET - expiration_date: Union[None, Unset, datetime.datetime] = UNSET - supplemental_docs: Union[List["GovernanceFile"], None, Unset] = UNSET + acceptance: GovernanceScope | None | Unset = UNSET + enactment_date: None | Unset | datetime.datetime = UNSET + expiration_type: Unset | GovernanceExpiryType = UNSET + expiration_days_after_completion: None | Unset | int = UNSET + expiration_date: None | Unset | datetime.datetime = UNSET + supplemental_docs: list["GovernanceFile"] | None | Unset = UNSET file: Union["GovernanceFile", None, Unset] = UNSET - authorship: Union[GovernanceScope, None, Unset] = UNSET - verification_method: Union[GovernanceTrainingVerification, None, Unset] = UNSET - fulfillment_id: Union[None, Unset, str] = UNSET - fulfillment_date: Union[None, Unset, datetime.datetime] = UNSET - fulfillment_file: Union[None, Unset, str] = UNSET - fulfillment_path: Union[None, Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + authorship: GovernanceScope | None | Unset = UNSET + verification_method: GovernanceTrainingVerification | None | Unset = UNSET + fulfillment_id: None | Unset | str = UNSET + fulfillment_date: None | Unset | datetime.datetime = UNSET + fulfillment_file: None | Unset | str = UNSET + fulfillment_path: None | Unset | str = UNSET + requires_user_fulfillment: Unset | bool = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: from ..models.governance_file import GovernanceFile id = self.id @@ -108,7 +111,7 @@ def to_dict(self) -> Dict[str, Any]: is_fulfilled = self.is_fulfilled - acceptance: Union[None, Unset, str] + acceptance: None | Unset | str if isinstance(self.acceptance, Unset): acceptance = UNSET elif isinstance(self.acceptance, GovernanceScope): @@ -116,7 +119,7 @@ def to_dict(self) -> Dict[str, Any]: else: acceptance = self.acceptance - enactment_date: Union[None, Unset, str] + enactment_date: None | Unset | str if isinstance(self.enactment_date, Unset): enactment_date = UNSET elif isinstance(self.enactment_date, datetime.datetime): @@ -124,17 +127,17 @@ def to_dict(self) -> Dict[str, Any]: else: enactment_date = self.enactment_date - expiration_type: Union[Unset, str] = UNSET + expiration_type: Unset | str = UNSET if not isinstance(self.expiration_type, Unset): expiration_type = self.expiration_type.value - expiration_days_after_completion: Union[None, Unset, int] + expiration_days_after_completion: None | Unset | int if isinstance(self.expiration_days_after_completion, Unset): expiration_days_after_completion = UNSET else: expiration_days_after_completion = self.expiration_days_after_completion - expiration_date: Union[None, Unset, str] + expiration_date: None | Unset | str if isinstance(self.expiration_date, Unset): expiration_date = UNSET elif isinstance(self.expiration_date, datetime.datetime): @@ -142,7 +145,7 @@ def to_dict(self) -> Dict[str, Any]: else: expiration_date = self.expiration_date - supplemental_docs: Union[List[Dict[str, Any]], None, Unset] + supplemental_docs: list[dict[str, Any]] | None | Unset if isinstance(self.supplemental_docs, Unset): supplemental_docs = UNSET elif isinstance(self.supplemental_docs, list): @@ -154,7 +157,7 @@ def to_dict(self) -> Dict[str, Any]: else: supplemental_docs = self.supplemental_docs - file: Union[Dict[str, Any], None, Unset] + file: dict[str, Any] | None | Unset if isinstance(self.file, Unset): file = UNSET elif isinstance(self.file, GovernanceFile): @@ -162,7 +165,7 @@ def to_dict(self) -> Dict[str, Any]: else: file = self.file - authorship: Union[None, Unset, str] + authorship: None | Unset | str if isinstance(self.authorship, Unset): authorship = UNSET elif isinstance(self.authorship, GovernanceScope): @@ -170,7 +173,7 @@ def to_dict(self) -> Dict[str, Any]: else: authorship = self.authorship - verification_method: Union[None, Unset, str] + verification_method: None | Unset | str if isinstance(self.verification_method, Unset): verification_method = UNSET elif isinstance(self.verification_method, GovernanceTrainingVerification): @@ -178,13 +181,13 @@ def to_dict(self) -> Dict[str, Any]: else: verification_method = self.verification_method - fulfillment_id: Union[None, Unset, str] + fulfillment_id: None | Unset | str if isinstance(self.fulfillment_id, Unset): fulfillment_id = UNSET else: fulfillment_id = self.fulfillment_id - fulfillment_date: Union[None, Unset, str] + fulfillment_date: None | Unset | str if isinstance(self.fulfillment_date, Unset): fulfillment_date = UNSET elif isinstance(self.fulfillment_date, datetime.datetime): @@ -192,19 +195,21 @@ def to_dict(self) -> Dict[str, Any]: else: fulfillment_date = self.fulfillment_date - fulfillment_file: Union[None, Unset, str] + fulfillment_file: None | Unset | str if isinstance(self.fulfillment_file, Unset): fulfillment_file = UNSET else: fulfillment_file = self.fulfillment_file - fulfillment_path: Union[None, Unset, str] + fulfillment_path: None | Unset | str if isinstance(self.fulfillment_path, Unset): fulfillment_path = UNSET else: fulfillment_path = self.fulfillment_path - field_dict: Dict[str, Any] = {} + requires_user_fulfillment = self.requires_user_fulfillment + + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -247,11 +252,13 @@ def to_dict(self) -> Dict[str, Any]: field_dict["fulfillmentFile"] = fulfillment_file if fulfillment_path is not UNSET: field_dict["fulfillmentPath"] = fulfillment_path + if requires_user_fulfillment is not UNSET: + field_dict["requiresUserFulfillment"] = requires_user_fulfillment return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.governance_contact import GovernanceContact from ..models.governance_file import GovernanceFile @@ -283,7 +290,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: is_fulfilled = d.pop("isFulfilled") - def _parse_acceptance(data: object) -> Union[GovernanceScope, None, Unset]: + def _parse_acceptance(data: object) -> GovernanceScope | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -296,11 +303,11 @@ def _parse_acceptance(data: object) -> Union[GovernanceScope, None, Unset]: return acceptance_type_1 except: # noqa: E722 pass - return cast(Union[GovernanceScope, None, Unset], data) + return cast(GovernanceScope | None | Unset, data) acceptance = _parse_acceptance(d.pop("acceptance", UNSET)) - def _parse_enactment_date(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_enactment_date(data: object) -> None | Unset | datetime.datetime: if data is None: return data if isinstance(data, Unset): @@ -313,29 +320,29 @@ def _parse_enactment_date(data: object) -> Union[None, Unset, datetime.datetime] return enactment_date_type_0 except: # noqa: E722 pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(None | Unset | datetime.datetime, data) enactment_date = _parse_enactment_date(d.pop("enactmentDate", UNSET)) _expiration_type = d.pop("expirationType", UNSET) - expiration_type: Union[Unset, GovernanceExpiryType] + expiration_type: Unset | GovernanceExpiryType if isinstance(_expiration_type, Unset): expiration_type = UNSET else: expiration_type = GovernanceExpiryType(_expiration_type) - def _parse_expiration_days_after_completion(data: object) -> Union[None, Unset, int]: + def _parse_expiration_days_after_completion(data: object) -> None | Unset | int: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, int], data) + return cast(None | Unset | int, data) expiration_days_after_completion = _parse_expiration_days_after_completion( d.pop("expirationDaysAfterCompletion", UNSET) ) - def _parse_expiration_date(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_expiration_date(data: object) -> None | Unset | datetime.datetime: if data is None: return data if isinstance(data, Unset): @@ -348,11 +355,11 @@ def _parse_expiration_date(data: object) -> Union[None, Unset, datetime.datetime return expiration_date_type_0 except: # noqa: E722 pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(None | Unset | datetime.datetime, data) expiration_date = _parse_expiration_date(d.pop("expirationDate", UNSET)) - def _parse_supplemental_docs(data: object) -> Union[List["GovernanceFile"], None, Unset]: + def _parse_supplemental_docs(data: object) -> list["GovernanceFile"] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -370,7 +377,7 @@ def _parse_supplemental_docs(data: object) -> Union[List["GovernanceFile"], None return supplemental_docs_type_0 except: # noqa: E722 pass - return cast(Union[List["GovernanceFile"], None, Unset], data) + return cast(list["GovernanceFile"] | None | Unset, data) supplemental_docs = _parse_supplemental_docs(d.pop("supplementalDocs", UNSET)) @@ -391,7 +398,7 @@ def _parse_file(data: object) -> Union["GovernanceFile", None, Unset]: file = _parse_file(d.pop("file", UNSET)) - def _parse_authorship(data: object) -> Union[GovernanceScope, None, Unset]: + def _parse_authorship(data: object) -> GovernanceScope | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -404,11 +411,11 @@ def _parse_authorship(data: object) -> Union[GovernanceScope, None, Unset]: return authorship_type_1 except: # noqa: E722 pass - return cast(Union[GovernanceScope, None, Unset], data) + return cast(GovernanceScope | None | Unset, data) authorship = _parse_authorship(d.pop("authorship", UNSET)) - def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerification, None, Unset]: + def _parse_verification_method(data: object) -> GovernanceTrainingVerification | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -421,20 +428,20 @@ def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerifica return verification_method_type_1 except: # noqa: E722 pass - return cast(Union[GovernanceTrainingVerification, None, Unset], data) + return cast(GovernanceTrainingVerification | None | Unset, data) verification_method = _parse_verification_method(d.pop("verificationMethod", UNSET)) - def _parse_fulfillment_id(data: object) -> Union[None, Unset, str]: + def _parse_fulfillment_id(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) fulfillment_id = _parse_fulfillment_id(d.pop("fulfillmentId", UNSET)) - def _parse_fulfillment_date(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_fulfillment_date(data: object) -> None | Unset | datetime.datetime: if data is None: return data if isinstance(data, Unset): @@ -447,28 +454,30 @@ def _parse_fulfillment_date(data: object) -> Union[None, Unset, datetime.datetim return fulfillment_date_type_0 except: # noqa: E722 pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(None | Unset | datetime.datetime, data) fulfillment_date = _parse_fulfillment_date(d.pop("fulfillmentDate", UNSET)) - def _parse_fulfillment_file(data: object) -> Union[None, Unset, str]: + def _parse_fulfillment_file(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) fulfillment_file = _parse_fulfillment_file(d.pop("fulfillmentFile", UNSET)) - def _parse_fulfillment_path(data: object) -> Union[None, Unset, str]: + def _parse_fulfillment_path(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) fulfillment_path = _parse_fulfillment_path(d.pop("fulfillmentPath", UNSET)) + requires_user_fulfillment = d.pop("requiresUserFulfillment", UNSET) + project_requirement = cls( id=id, name=name, @@ -494,11 +503,12 @@ def _parse_fulfillment_path(data: object) -> Union[None, Unset, str]: fulfillment_date=fulfillment_date, fulfillment_file=fulfillment_file, fulfillment_path=fulfillment_path, + requires_user_fulfillment=requires_user_fulfillment, ) project_requirement.additional_properties = d return project_requirement @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_settings.py b/cirro_api_client/v1/models/project_settings.py index e7c8e57..3cb32b3 100644 --- a/cirro_api_client/v1/models/project_settings.py +++ b/cirro_api_client/v1/models/project_settings.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,92 +15,97 @@ class ProjectSettings: Attributes: budget_amount (int): Total allowed cost for the budget period budget_period (BudgetPeriod): Time period associated with the budget amount - dragen_ami (Union[None, Unset, str]): AMI ID for the DRAGEN compute environment (if enabled) - enable_compute (Union[Unset, bool]): Enables the default compute environment Default: True. - enable_dragen (Union[Unset, bool]): Enables the DRAGEN compute environment Default: False. enable_backup (Union[Unset, bool]): Enables the AWS Backup service for S3 Default: False. enable_sftp (Union[Unset, bool]): Enables access to files over SFTP Default: False. - max_f1vcpu (Union[Unset, int]): Service quota limit for On Demand F1 instances Default: 0. - max_spot_vcpu (Union[Unset, int]): Service quota limit for Spot instances Default: 0. - max_gpuvcpu (Union[Unset, int]): Service quota limit for GPU Spot instances Default: 0. + service_connections (Union[Unset, List[str]]): List of service connections to enable + kms_arn (Union[None, Unset, str]): KMS Key ARN to encrypt S3 objects, if not provided, default bucket encryption + will be used retention_policy_days (Union[Unset, int]): Days to keep deleted datasets before being permanently erased Default: 7. temporary_storage_lifetime_days (Union[Unset, int]): Days to keep temporary storage space (workflow executor cache) Default: 14. - service_connections (Union[Unset, List[str]]): List of service connections to enable vpc_id (Union[None, Unset, str]): VPC that the compute environment will use Example: vpc-00000000000000000. - batch_subnets (Union[List[str], None, Unset]): List of subnets that the compute environment will use Example: - ['subnet-00000000000000000']. + batch_subnets (Union[List[str], None, Unset]): List of subnets that the pipeline compute environment will use + Example: ['subnet-00000000000000000']. sagemaker_subnets (Union[List[str], None, Unset]): List of subnets that the sagemaker instances will use Example: ['subnet-00000000000000000']. - kms_arn (Union[None, Unset, str]): KMS Key ARN to encrypt S3 objects, if not provided, default bucket encryption - will be used + workspace_subnets (Union[List[str], None, Unset]): List of subnets that workspace instances will use Example: + ['subnet-00000000000000000']. + max_spot_vcpu (Union[Unset, int]): vCPU service quota limit for standard spot instances (pipelines) Default: 0. + max_fpgavcpu (Union[Unset, int]): vCPU service quota limit for FPGA-enabled instances (pipelines) Default: 0. + max_gpuvcpu (Union[Unset, int]): vCPU service quota limit for GPU-enabled spot instances (pipelines) Default: 0. + enable_dragen (Union[Unset, bool]): Enables the DRAGEN compute environment (pipelines) Default: False. + dragen_ami (Union[None, Unset, str]): AMI ID for the DRAGEN compute environment, if enabled (pipelines) + max_workspaces_vcpu (Union[Unset, int]): vCPU service quota limit for standard instances (workspaces) Default: + 0. + max_workspaces_gpuvcpu (Union[Unset, int]): vCPU service quota limit for GPU-enabled instances (workspaces) + Default: 0. + max_workspaces_per_user (Union[Unset, int]): Maximum number of workspaces per user (workspaces) Default: 0. is_discoverable (Union[None, Unset, bool]): Enables the project to be discoverable by other users Default: False. is_shareable (Union[None, Unset, bool]): Enables the project to be shared with other projects Default: False. + has_pipelines_enabled (Union[None, Unset, bool]): (Read-only) Whether this project has pipelines enabled + Default: False. + has_workspaces_enabled (Union[None, Unset, bool]): (Read-only) Whether this project has workspaces enabled + Default: False. """ budget_amount: int budget_period: BudgetPeriod - dragen_ami: Union[None, Unset, str] = UNSET - enable_compute: Union[Unset, bool] = True - enable_dragen: Union[Unset, bool] = False - enable_backup: Union[Unset, bool] = False - enable_sftp: Union[Unset, bool] = False - max_f1vcpu: Union[Unset, int] = 0 - max_spot_vcpu: Union[Unset, int] = 0 - max_gpuvcpu: Union[Unset, int] = 0 - retention_policy_days: Union[Unset, int] = 7 - temporary_storage_lifetime_days: Union[Unset, int] = 14 - service_connections: Union[Unset, List[str]] = UNSET - vpc_id: Union[None, Unset, str] = UNSET - batch_subnets: Union[List[str], None, Unset] = UNSET - sagemaker_subnets: Union[List[str], None, Unset] = UNSET - kms_arn: Union[None, Unset, str] = UNSET - is_discoverable: Union[None, Unset, bool] = False - is_shareable: Union[None, Unset, bool] = False - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + enable_backup: Unset | bool = False + enable_sftp: Unset | bool = False + service_connections: Unset | list[str] = UNSET + kms_arn: None | Unset | str = UNSET + retention_policy_days: Unset | int = 7 + temporary_storage_lifetime_days: Unset | int = 14 + vpc_id: None | Unset | str = UNSET + batch_subnets: list[str] | None | Unset = UNSET + sagemaker_subnets: list[str] | None | Unset = UNSET + workspace_subnets: list[str] | None | Unset = UNSET + max_spot_vcpu: Unset | int = 0 + max_fpgavcpu: Unset | int = 0 + max_gpuvcpu: Unset | int = 0 + enable_dragen: Unset | bool = False + dragen_ami: None | Unset | str = UNSET + max_workspaces_vcpu: Unset | int = 0 + max_workspaces_gpuvcpu: Unset | int = 0 + max_workspaces_per_user: Unset | int = 0 + is_discoverable: None | Unset | bool = False + is_shareable: None | Unset | bool = False + has_pipelines_enabled: None | Unset | bool = False + has_workspaces_enabled: None | Unset | bool = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: budget_amount = self.budget_amount budget_period = self.budget_period.value - dragen_ami: Union[None, Unset, str] - if isinstance(self.dragen_ami, Unset): - dragen_ami = UNSET - else: - dragen_ami = self.dragen_ami - - enable_compute = self.enable_compute - - enable_dragen = self.enable_dragen - enable_backup = self.enable_backup enable_sftp = self.enable_sftp - max_f1vcpu = self.max_f1vcpu - - max_spot_vcpu = self.max_spot_vcpu + service_connections: Unset | list[str] = UNSET + if not isinstance(self.service_connections, Unset): + service_connections = self.service_connections - max_gpuvcpu = self.max_gpuvcpu + kms_arn: None | Unset | str + if isinstance(self.kms_arn, Unset): + kms_arn = UNSET + else: + kms_arn = self.kms_arn retention_policy_days = self.retention_policy_days temporary_storage_lifetime_days = self.temporary_storage_lifetime_days - service_connections: Union[Unset, List[str]] = UNSET - if not isinstance(self.service_connections, Unset): - service_connections = self.service_connections - - vpc_id: Union[None, Unset, str] + vpc_id: None | Unset | str if isinstance(self.vpc_id, Unset): vpc_id = UNSET else: vpc_id = self.vpc_id - batch_subnets: Union[List[str], None, Unset] + batch_subnets: list[str] | None | Unset if isinstance(self.batch_subnets, Unset): batch_subnets = UNSET elif isinstance(self.batch_subnets, list): @@ -109,7 +114,7 @@ def to_dict(self) -> Dict[str, Any]: else: batch_subnets = self.batch_subnets - sagemaker_subnets: Union[List[str], None, Unset] + sagemaker_subnets: list[str] | None | Unset if isinstance(self.sagemaker_subnets, Unset): sagemaker_subnets = UNSET elif isinstance(self.sagemaker_subnets, list): @@ -118,25 +123,60 @@ def to_dict(self) -> Dict[str, Any]: else: sagemaker_subnets = self.sagemaker_subnets - kms_arn: Union[None, Unset, str] - if isinstance(self.kms_arn, Unset): - kms_arn = UNSET + workspace_subnets: list[str] | None | Unset + if isinstance(self.workspace_subnets, Unset): + workspace_subnets = UNSET + elif isinstance(self.workspace_subnets, list): + workspace_subnets = self.workspace_subnets + else: - kms_arn = self.kms_arn + workspace_subnets = self.workspace_subnets + + max_spot_vcpu = self.max_spot_vcpu + + max_fpgavcpu = self.max_fpgavcpu - is_discoverable: Union[None, Unset, bool] + max_gpuvcpu = self.max_gpuvcpu + + enable_dragen = self.enable_dragen + + dragen_ami: None | Unset | str + if isinstance(self.dragen_ami, Unset): + dragen_ami = UNSET + else: + dragen_ami = self.dragen_ami + + max_workspaces_vcpu = self.max_workspaces_vcpu + + max_workspaces_gpuvcpu = self.max_workspaces_gpuvcpu + + max_workspaces_per_user = self.max_workspaces_per_user + + is_discoverable: None | Unset | bool if isinstance(self.is_discoverable, Unset): is_discoverable = UNSET else: is_discoverable = self.is_discoverable - is_shareable: Union[None, Unset, bool] + is_shareable: None | Unset | bool if isinstance(self.is_shareable, Unset): is_shareable = UNSET else: is_shareable = self.is_shareable - field_dict: Dict[str, Any] = {} + has_pipelines_enabled: None | Unset | bool + if isinstance(self.has_pipelines_enabled, Unset): + has_pipelines_enabled = UNSET + else: + has_pipelines_enabled = self.has_pipelines_enabled + + has_workspaces_enabled: None | Unset | bool + if isinstance(self.has_workspaces_enabled, Unset): + has_workspaces_enabled = UNSET + else: + has_workspaces_enabled = self.has_workspaces_enabled + + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -144,89 +184,89 @@ def to_dict(self) -> Dict[str, Any]: "budgetPeriod": budget_period, } ) - if dragen_ami is not UNSET: - field_dict["dragenAmi"] = dragen_ami - if enable_compute is not UNSET: - field_dict["enableCompute"] = enable_compute - if enable_dragen is not UNSET: - field_dict["enableDragen"] = enable_dragen if enable_backup is not UNSET: field_dict["enableBackup"] = enable_backup if enable_sftp is not UNSET: field_dict["enableSftp"] = enable_sftp - if max_f1vcpu is not UNSET: - field_dict["maxF1VCPU"] = max_f1vcpu - if max_spot_vcpu is not UNSET: - field_dict["maxSpotVCPU"] = max_spot_vcpu - if max_gpuvcpu is not UNSET: - field_dict["maxGPUVCPU"] = max_gpuvcpu + if service_connections is not UNSET: + field_dict["serviceConnections"] = service_connections + if kms_arn is not UNSET: + field_dict["kmsArn"] = kms_arn if retention_policy_days is not UNSET: field_dict["retentionPolicyDays"] = retention_policy_days if temporary_storage_lifetime_days is not UNSET: field_dict["temporaryStorageLifetimeDays"] = temporary_storage_lifetime_days - if service_connections is not UNSET: - field_dict["serviceConnections"] = service_connections if vpc_id is not UNSET: field_dict["vpcId"] = vpc_id if batch_subnets is not UNSET: field_dict["batchSubnets"] = batch_subnets if sagemaker_subnets is not UNSET: field_dict["sagemakerSubnets"] = sagemaker_subnets - if kms_arn is not UNSET: - field_dict["kmsArn"] = kms_arn + if workspace_subnets is not UNSET: + field_dict["workspaceSubnets"] = workspace_subnets + if max_spot_vcpu is not UNSET: + field_dict["maxSpotVCPU"] = max_spot_vcpu + if max_fpgavcpu is not UNSET: + field_dict["maxFPGAVCPU"] = max_fpgavcpu + if max_gpuvcpu is not UNSET: + field_dict["maxGPUVCPU"] = max_gpuvcpu + if enable_dragen is not UNSET: + field_dict["enableDragen"] = enable_dragen + if dragen_ami is not UNSET: + field_dict["dragenAmi"] = dragen_ami + if max_workspaces_vcpu is not UNSET: + field_dict["maxWorkspacesVCPU"] = max_workspaces_vcpu + if max_workspaces_gpuvcpu is not UNSET: + field_dict["maxWorkspacesGPUVCPU"] = max_workspaces_gpuvcpu + if max_workspaces_per_user is not UNSET: + field_dict["maxWorkspacesPerUser"] = max_workspaces_per_user if is_discoverable is not UNSET: field_dict["isDiscoverable"] = is_discoverable if is_shareable is not UNSET: field_dict["isShareable"] = is_shareable + if has_pipelines_enabled is not UNSET: + field_dict["hasPipelinesEnabled"] = has_pipelines_enabled + if has_workspaces_enabled is not UNSET: + field_dict["hasWorkspacesEnabled"] = has_workspaces_enabled return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() budget_amount = d.pop("budgetAmount") budget_period = BudgetPeriod(d.pop("budgetPeriod")) - def _parse_dragen_ami(data: object) -> Union[None, Unset, str]: - if data is None: - return data - if isinstance(data, Unset): - return data - return cast(Union[None, Unset, str], data) - - dragen_ami = _parse_dragen_ami(d.pop("dragenAmi", UNSET)) - - enable_compute = d.pop("enableCompute", UNSET) - - enable_dragen = d.pop("enableDragen", UNSET) - enable_backup = d.pop("enableBackup", UNSET) enable_sftp = d.pop("enableSftp", UNSET) - max_f1vcpu = d.pop("maxF1VCPU", UNSET) + service_connections = cast(list[str], d.pop("serviceConnections", UNSET)) - max_spot_vcpu = d.pop("maxSpotVCPU", UNSET) + def _parse_kms_arn(data: object) -> None | Unset | str: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | Unset | str, data) - max_gpuvcpu = d.pop("maxGPUVCPU", UNSET) + kms_arn = _parse_kms_arn(d.pop("kmsArn", UNSET)) retention_policy_days = d.pop("retentionPolicyDays", UNSET) temporary_storage_lifetime_days = d.pop("temporaryStorageLifetimeDays", UNSET) - service_connections = cast(List[str], d.pop("serviceConnections", UNSET)) - - def _parse_vpc_id(data: object) -> Union[None, Unset, str]: + def _parse_vpc_id(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) vpc_id = _parse_vpc_id(d.pop("vpcId", UNSET)) - def _parse_batch_subnets(data: object) -> Union[List[str], None, Unset]: + def _parse_batch_subnets(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -234,16 +274,16 @@ def _parse_batch_subnets(data: object) -> Union[List[str], None, Unset]: try: if not isinstance(data, list): raise TypeError() - batch_subnets_type_0 = cast(List[str], data) + batch_subnets_type_0 = cast(list[str], data) return batch_subnets_type_0 except: # noqa: E722 pass - return cast(Union[List[str], None, Unset], data) + return cast(list[str] | None | Unset, data) batch_subnets = _parse_batch_subnets(d.pop("batchSubnets", UNSET)) - def _parse_sagemaker_subnets(data: object) -> Union[List[str], None, Unset]: + def _parse_sagemaker_subnets(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -251,67 +291,121 @@ def _parse_sagemaker_subnets(data: object) -> Union[List[str], None, Unset]: try: if not isinstance(data, list): raise TypeError() - sagemaker_subnets_type_0 = cast(List[str], data) + sagemaker_subnets_type_0 = cast(list[str], data) return sagemaker_subnets_type_0 except: # noqa: E722 pass - return cast(Union[List[str], None, Unset], data) + return cast(list[str] | None | Unset, data) sagemaker_subnets = _parse_sagemaker_subnets(d.pop("sagemakerSubnets", UNSET)) - def _parse_kms_arn(data: object) -> Union[None, Unset, str]: + def _parse_workspace_subnets(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + try: + if not isinstance(data, list): + raise TypeError() + workspace_subnets_type_0 = cast(list[str], data) - kms_arn = _parse_kms_arn(d.pop("kmsArn", UNSET)) + return workspace_subnets_type_0 + except: # noqa: E722 + pass + return cast(list[str] | None | Unset, data) + + workspace_subnets = _parse_workspace_subnets(d.pop("workspaceSubnets", UNSET)) + + max_spot_vcpu = d.pop("maxSpotVCPU", UNSET) - def _parse_is_discoverable(data: object) -> Union[None, Unset, bool]: + max_fpgavcpu = d.pop("maxFPGAVCPU", UNSET) + + max_gpuvcpu = d.pop("maxGPUVCPU", UNSET) + + enable_dragen = d.pop("enableDragen", UNSET) + + def _parse_dragen_ami(data: object) -> None | Unset | str: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | Unset | str, data) + + dragen_ami = _parse_dragen_ami(d.pop("dragenAmi", UNSET)) + + max_workspaces_vcpu = d.pop("maxWorkspacesVCPU", UNSET) + + max_workspaces_gpuvcpu = d.pop("maxWorkspacesGPUVCPU", UNSET) + + max_workspaces_per_user = d.pop("maxWorkspacesPerUser", UNSET) + + def _parse_is_discoverable(data: object) -> None | Unset | bool: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, bool], data) + return cast(None | Unset | bool, data) is_discoverable = _parse_is_discoverable(d.pop("isDiscoverable", UNSET)) - def _parse_is_shareable(data: object) -> Union[None, Unset, bool]: + def _parse_is_shareable(data: object) -> None | Unset | bool: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, bool], data) + return cast(None | Unset | bool, data) is_shareable = _parse_is_shareable(d.pop("isShareable", UNSET)) + def _parse_has_pipelines_enabled(data: object) -> None | Unset | bool: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | Unset | bool, data) + + has_pipelines_enabled = _parse_has_pipelines_enabled(d.pop("hasPipelinesEnabled", UNSET)) + + def _parse_has_workspaces_enabled(data: object) -> None | Unset | bool: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | Unset | bool, data) + + has_workspaces_enabled = _parse_has_workspaces_enabled(d.pop("hasWorkspacesEnabled", UNSET)) + project_settings = cls( budget_amount=budget_amount, budget_period=budget_period, - dragen_ami=dragen_ami, - enable_compute=enable_compute, - enable_dragen=enable_dragen, enable_backup=enable_backup, enable_sftp=enable_sftp, - max_f1vcpu=max_f1vcpu, - max_spot_vcpu=max_spot_vcpu, - max_gpuvcpu=max_gpuvcpu, + service_connections=service_connections, + kms_arn=kms_arn, retention_policy_days=retention_policy_days, temporary_storage_lifetime_days=temporary_storage_lifetime_days, - service_connections=service_connections, vpc_id=vpc_id, batch_subnets=batch_subnets, sagemaker_subnets=sagemaker_subnets, - kms_arn=kms_arn, + workspace_subnets=workspace_subnets, + max_spot_vcpu=max_spot_vcpu, + max_fpgavcpu=max_fpgavcpu, + max_gpuvcpu=max_gpuvcpu, + enable_dragen=enable_dragen, + dragen_ami=dragen_ami, + max_workspaces_vcpu=max_workspaces_vcpu, + max_workspaces_gpuvcpu=max_workspaces_gpuvcpu, + max_workspaces_per_user=max_workspaces_per_user, is_discoverable=is_discoverable, is_shareable=is_shareable, + has_pipelines_enabled=has_pipelines_enabled, + has_workspaces_enabled=has_workspaces_enabled, ) project_settings.additional_properties = d return project_settings @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_user.py b/cirro_api_client/v1/models/project_user.py index ce224a7..994394b 100644 --- a/cirro_api_client/v1/models/project_user.py +++ b/cirro_api_client/v1/models/project_user.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,6 +17,7 @@ class ProjectUser: organization (str): department (str): email (str): + job_title (str): role (ProjectRole): """ @@ -25,10 +26,11 @@ class ProjectUser: organization: str department: str email: str + job_title: str role: ProjectRole - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name username = self.username @@ -39,9 +41,11 @@ def to_dict(self) -> Dict[str, Any]: email = self.email + job_title = self.job_title + role = self.role.value - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -50,6 +54,7 @@ def to_dict(self) -> Dict[str, Any]: "organization": organization, "department": department, "email": email, + "jobTitle": job_title, "role": role, } ) @@ -57,7 +62,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -69,6 +74,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: email = d.pop("email") + job_title = d.pop("jobTitle") + role = ProjectRole(d.pop("role")) project_user = cls( @@ -77,6 +84,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: organization=organization, department=department, email=email, + job_title=job_title, role=role, ) @@ -84,5 +92,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return project_user @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/reference.py b/cirro_api_client/v1/models/reference.py index 5df9055..e797a30 100644 --- a/cirro_api_client/v1/models/reference.py +++ b/cirro_api_client/v1/models/reference.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -29,12 +29,12 @@ class Reference: name: str description: str type: str - files: List["FileEntry"] + files: list["FileEntry"] created_by: str created_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -52,7 +52,7 @@ def to_dict(self) -> Dict[str, Any]: created_at = self.created_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -69,7 +69,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.file_entry import FileEntry d = src_dict.copy() @@ -106,5 +106,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return reference @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/reference_type.py b/cirro_api_client/v1/models/reference_type.py index e8124ff..7e503b1 100644 --- a/cirro_api_client/v1/models/reference_type.py +++ b/cirro_api_client/v1/models/reference_type.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,10 +23,10 @@ class ReferenceType: name: str description: str directory: str - validation: List["ReferenceTypeValidationItem"] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + validation: list["ReferenceTypeValidationItem"] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description @@ -38,7 +38,7 @@ def to_dict(self) -> Dict[str, Any]: validation_item = validation_item_data.to_dict() validation.append(validation_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -52,7 +52,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.reference_type_validation_item import ReferenceTypeValidationItem d = src_dict.copy() @@ -80,5 +80,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return reference_type @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/reference_type_validation_item.py b/cirro_api_client/v1/models/reference_type_validation_item.py index 680bd17..49a7ef0 100644 --- a/cirro_api_client/v1/models/reference_type_validation_item.py +++ b/cirro_api_client/v1/models/reference_type_validation_item.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class ReferenceTypeValidationItem: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() reference_type_validation_item = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return reference_type_validation_item @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/requirement_fulfillment_input.py b/cirro_api_client/v1/models/requirement_fulfillment_input.py index f2fdd8d..40c46d7 100644 --- a/cirro_api_client/v1/models/requirement_fulfillment_input.py +++ b/cirro_api_client/v1/models/requirement_fulfillment_input.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,18 +18,18 @@ class RequirementFulfillmentInput: completed_on (Union[None, Unset, datetime.datetime]): If not provided, defaults to the current instant """ - file: Union[None, Unset, str] = UNSET - completed_on: Union[None, Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + file: None | Unset | str = UNSET + completed_on: None | Unset | datetime.datetime = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - file: Union[None, Unset, str] + def to_dict(self) -> dict[str, Any]: + file: None | Unset | str if isinstance(self.file, Unset): file = UNSET else: file = self.file - completed_on: Union[None, Unset, str] + completed_on: None | Unset | str if isinstance(self.completed_on, Unset): completed_on = UNSET elif isinstance(self.completed_on, datetime.datetime): @@ -37,7 +37,7 @@ def to_dict(self) -> Dict[str, Any]: else: completed_on = self.completed_on - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if file is not UNSET: @@ -48,19 +48,19 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() - def _parse_file(data: object) -> Union[None, Unset, str]: + def _parse_file(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) file = _parse_file(d.pop("file", UNSET)) - def _parse_completed_on(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_completed_on(data: object) -> None | Unset | datetime.datetime: if data is None: return data if isinstance(data, Unset): @@ -73,7 +73,7 @@ def _parse_completed_on(data: object) -> Union[None, Unset, datetime.datetime]: return completed_on_type_0 except: # noqa: E722 pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(None | Unset | datetime.datetime, data) completed_on = _parse_completed_on(d.pop("completedOn", UNSET)) @@ -86,5 +86,5 @@ def _parse_completed_on(data: object) -> Union[None, Unset, datetime.datetime]: return requirement_fulfillment_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/requirement_input.py b/cirro_api_client/v1/models/requirement_input.py index ba13e0f..2881926 100644 --- a/cirro_api_client/v1/models/requirement_input.py +++ b/cirro_api_client/v1/models/requirement_input.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -41,18 +41,18 @@ class RequirementInput: description: str type: GovernanceType scope: GovernanceScope - contact_ids: List[str] + contact_ids: list[str] expiration: "GovernanceExpiry" - project_id: Union[None, Unset, str] = UNSET - acceptance: Union[GovernanceScope, None, Unset] = UNSET - enactment_date: Union[None, Unset, datetime.datetime] = UNSET - supplemental_docs: Union[List["GovernanceFile"], None, Unset] = UNSET + project_id: None | Unset | str = UNSET + acceptance: GovernanceScope | None | Unset = UNSET + enactment_date: None | Unset | datetime.datetime = UNSET + supplemental_docs: list["GovernanceFile"] | None | Unset = UNSET file: Union["GovernanceFile", None, Unset] = UNSET - authorship: Union[GovernanceScope, None, Unset] = UNSET - verification_method: Union[GovernanceTrainingVerification, None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + authorship: GovernanceScope | None | Unset = UNSET + verification_method: GovernanceTrainingVerification | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.governance_file import GovernanceFile name = self.name @@ -67,13 +67,13 @@ def to_dict(self) -> Dict[str, Any]: expiration = self.expiration.to_dict() - project_id: Union[None, Unset, str] + project_id: None | Unset | str if isinstance(self.project_id, Unset): project_id = UNSET else: project_id = self.project_id - acceptance: Union[None, Unset, str] + acceptance: None | Unset | str if isinstance(self.acceptance, Unset): acceptance = UNSET elif isinstance(self.acceptance, GovernanceScope): @@ -81,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: else: acceptance = self.acceptance - enactment_date: Union[None, Unset, str] + enactment_date: None | Unset | str if isinstance(self.enactment_date, Unset): enactment_date = UNSET elif isinstance(self.enactment_date, datetime.datetime): @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: else: enactment_date = self.enactment_date - supplemental_docs: Union[List[Dict[str, Any]], None, Unset] + supplemental_docs: list[dict[str, Any]] | None | Unset if isinstance(self.supplemental_docs, Unset): supplemental_docs = UNSET elif isinstance(self.supplemental_docs, list): @@ -101,7 +101,7 @@ def to_dict(self) -> Dict[str, Any]: else: supplemental_docs = self.supplemental_docs - file: Union[Dict[str, Any], None, Unset] + file: dict[str, Any] | None | Unset if isinstance(self.file, Unset): file = UNSET elif isinstance(self.file, GovernanceFile): @@ -109,7 +109,7 @@ def to_dict(self) -> Dict[str, Any]: else: file = self.file - authorship: Union[None, Unset, str] + authorship: None | Unset | str if isinstance(self.authorship, Unset): authorship = UNSET elif isinstance(self.authorship, GovernanceScope): @@ -117,7 +117,7 @@ def to_dict(self) -> Dict[str, Any]: else: authorship = self.authorship - verification_method: Union[None, Unset, str] + verification_method: None | Unset | str if isinstance(self.verification_method, Unset): verification_method = UNSET elif isinstance(self.verification_method, GovernanceTrainingVerification): @@ -125,7 +125,7 @@ def to_dict(self) -> Dict[str, Any]: else: verification_method = self.verification_method - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -155,7 +155,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.governance_expiry import GovernanceExpiry from ..models.governance_file import GovernanceFile @@ -168,20 +168,20 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: scope = GovernanceScope(d.pop("scope")) - contact_ids = cast(List[str], d.pop("contactIds")) + contact_ids = cast(list[str], d.pop("contactIds")) expiration = GovernanceExpiry.from_dict(d.pop("expiration")) - def _parse_project_id(data: object) -> Union[None, Unset, str]: + def _parse_project_id(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) project_id = _parse_project_id(d.pop("projectId", UNSET)) - def _parse_acceptance(data: object) -> Union[GovernanceScope, None, Unset]: + def _parse_acceptance(data: object) -> GovernanceScope | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -194,11 +194,11 @@ def _parse_acceptance(data: object) -> Union[GovernanceScope, None, Unset]: return acceptance_type_1 except: # noqa: E722 pass - return cast(Union[GovernanceScope, None, Unset], data) + return cast(GovernanceScope | None | Unset, data) acceptance = _parse_acceptance(d.pop("acceptance", UNSET)) - def _parse_enactment_date(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_enactment_date(data: object) -> None | Unset | datetime.datetime: if data is None: return data if isinstance(data, Unset): @@ -211,11 +211,11 @@ def _parse_enactment_date(data: object) -> Union[None, Unset, datetime.datetime] return enactment_date_type_0 except: # noqa: E722 pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(None | Unset | datetime.datetime, data) enactment_date = _parse_enactment_date(d.pop("enactmentDate", UNSET)) - def _parse_supplemental_docs(data: object) -> Union[List["GovernanceFile"], None, Unset]: + def _parse_supplemental_docs(data: object) -> list["GovernanceFile"] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -233,7 +233,7 @@ def _parse_supplemental_docs(data: object) -> Union[List["GovernanceFile"], None return supplemental_docs_type_0 except: # noqa: E722 pass - return cast(Union[List["GovernanceFile"], None, Unset], data) + return cast(list["GovernanceFile"] | None | Unset, data) supplemental_docs = _parse_supplemental_docs(d.pop("supplementalDocs", UNSET)) @@ -254,7 +254,7 @@ def _parse_file(data: object) -> Union["GovernanceFile", None, Unset]: file = _parse_file(d.pop("file", UNSET)) - def _parse_authorship(data: object) -> Union[GovernanceScope, None, Unset]: + def _parse_authorship(data: object) -> GovernanceScope | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -267,11 +267,11 @@ def _parse_authorship(data: object) -> Union[GovernanceScope, None, Unset]: return authorship_type_1 except: # noqa: E722 pass - return cast(Union[GovernanceScope, None, Unset], data) + return cast(GovernanceScope | None | Unset, data) authorship = _parse_authorship(d.pop("authorship", UNSET)) - def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerification, None, Unset]: + def _parse_verification_method(data: object) -> GovernanceTrainingVerification | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -284,7 +284,7 @@ def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerifica return verification_method_type_1 except: # noqa: E722 pass - return cast(Union[GovernanceTrainingVerification, None, Unset], data) + return cast(GovernanceTrainingVerification | None | Unset, data) verification_method = _parse_verification_method(d.pop("verificationMethod", UNSET)) @@ -308,5 +308,5 @@ def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerifica return requirement_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/resources_info.py b/cirro_api_client/v1/models/resources_info.py index 1fad5c2..025d969 100644 --- a/cirro_api_client/v1/models/resources_info.py +++ b/cirro_api_client/v1/models/resources_info.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +22,9 @@ class ResourcesInfo: date: datetime.datetime repository: str source_version: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: commit = self.commit date = self.date.isoformat() @@ -33,7 +33,7 @@ def to_dict(self) -> Dict[str, Any]: source_version = self.source_version - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -47,7 +47,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() commit = d.pop("commit") @@ -68,5 +68,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return resources_info @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/run_analysis_request.py b/cirro_api_client/v1/models/run_analysis_request.py index 3aec141..7710457 100644 --- a/cirro_api_client/v1/models/run_analysis_request.py +++ b/cirro_api_client/v1/models/run_analysis_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -36,17 +36,17 @@ class RunAnalysisRequest: name: str process_id: str - source_dataset_ids: List[str] + source_dataset_ids: list[str] params: "RunAnalysisRequestParams" - notification_emails: List[str] - description: Union[None, Unset, str] = UNSET - source_sample_ids: Union[List[str], None, Unset] = UNSET + notification_emails: list[str] + description: None | Unset | str = UNSET + source_sample_ids: list[str] | None | Unset = UNSET source_sample_files_map: Union["RunAnalysisRequestSourceSampleFilesMap", None, Unset] = UNSET - resume_dataset_id: Union[None, Unset, str] = UNSET - compute_environment_id: Union[None, Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + resume_dataset_id: None | Unset | str = UNSET + compute_environment_id: None | Unset | str = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.run_analysis_request_source_sample_files_map import RunAnalysisRequestSourceSampleFilesMap name = self.name @@ -59,13 +59,13 @@ def to_dict(self) -> Dict[str, Any]: notification_emails = self.notification_emails - description: Union[None, Unset, str] + description: None | Unset | str if isinstance(self.description, Unset): description = UNSET else: description = self.description - source_sample_ids: Union[List[str], None, Unset] + source_sample_ids: list[str] | None | Unset if isinstance(self.source_sample_ids, Unset): source_sample_ids = UNSET elif isinstance(self.source_sample_ids, list): @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: else: source_sample_ids = self.source_sample_ids - source_sample_files_map: Union[Dict[str, Any], None, Unset] + source_sample_files_map: dict[str, Any] | None | Unset if isinstance(self.source_sample_files_map, Unset): source_sample_files_map = UNSET elif isinstance(self.source_sample_files_map, RunAnalysisRequestSourceSampleFilesMap): @@ -82,19 +82,19 @@ def to_dict(self) -> Dict[str, Any]: else: source_sample_files_map = self.source_sample_files_map - resume_dataset_id: Union[None, Unset, str] + resume_dataset_id: None | Unset | str if isinstance(self.resume_dataset_id, Unset): resume_dataset_id = UNSET else: resume_dataset_id = self.resume_dataset_id - compute_environment_id: Union[None, Unset, str] + compute_environment_id: None | Unset | str if isinstance(self.compute_environment_id, Unset): compute_environment_id = UNSET else: compute_environment_id = self.compute_environment_id - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -119,7 +119,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.run_analysis_request_params import RunAnalysisRequestParams from ..models.run_analysis_request_source_sample_files_map import RunAnalysisRequestSourceSampleFilesMap @@ -128,22 +128,22 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: process_id = d.pop("processId") - source_dataset_ids = cast(List[str], d.pop("sourceDatasetIds")) + source_dataset_ids = cast(list[str], d.pop("sourceDatasetIds")) params = RunAnalysisRequestParams.from_dict(d.pop("params")) - notification_emails = cast(List[str], d.pop("notificationEmails")) + notification_emails = cast(list[str], d.pop("notificationEmails")) - def _parse_description(data: object) -> Union[None, Unset, str]: + def _parse_description(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) description = _parse_description(d.pop("description", UNSET)) - def _parse_source_sample_ids(data: object) -> Union[List[str], None, Unset]: + def _parse_source_sample_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -151,12 +151,12 @@ def _parse_source_sample_ids(data: object) -> Union[List[str], None, Unset]: try: if not isinstance(data, list): raise TypeError() - source_sample_ids_type_0 = cast(List[str], data) + source_sample_ids_type_0 = cast(list[str], data) return source_sample_ids_type_0 except: # noqa: E722 pass - return cast(Union[List[str], None, Unset], data) + return cast(list[str] | None | Unset, data) source_sample_ids = _parse_source_sample_ids(d.pop("sourceSampleIds", UNSET)) @@ -179,21 +179,21 @@ def _parse_source_sample_files_map( source_sample_files_map = _parse_source_sample_files_map(d.pop("sourceSampleFilesMap", UNSET)) - def _parse_resume_dataset_id(data: object) -> Union[None, Unset, str]: + def _parse_resume_dataset_id(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) resume_dataset_id = _parse_resume_dataset_id(d.pop("resumeDatasetId", UNSET)) - def _parse_compute_environment_id(data: object) -> Union[None, Unset, str]: + def _parse_compute_environment_id(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) compute_environment_id = _parse_compute_environment_id(d.pop("computeEnvironmentId", UNSET)) @@ -214,5 +214,5 @@ def _parse_compute_environment_id(data: object) -> Union[None, Unset, str]: return run_analysis_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/run_analysis_request_params.py b/cirro_api_client/v1/models/run_analysis_request_params.py index 2938ce1..001cdec 100644 --- a/cirro_api_client/v1/models/run_analysis_request_params.py +++ b/cirro_api_client/v1/models/run_analysis_request_params.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class RunAnalysisRequestParams: """Parameters used in workflow (can be empty)""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() run_analysis_request_params = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return run_analysis_request_params @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/run_analysis_request_source_sample_files_map.py b/cirro_api_client/v1/models/run_analysis_request_source_sample_files_map.py index 544a69a..e58e93d 100644 --- a/cirro_api_client/v1/models/run_analysis_request_source_sample_files_map.py +++ b/cirro_api_client/v1/models/run_analysis_request_source_sample_files_map.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -13,10 +13,10 @@ class RunAnalysisRequestSourceSampleFilesMap: """ - additional_properties: Dict[str, List[str]] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = prop @@ -25,13 +25,13 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() run_analysis_request_source_sample_files_map = cls() additional_properties = {} for prop_name, prop_dict in d.items(): - additional_property = cast(List[str], prop_dict) + additional_property = cast(list[str], prop_dict) additional_properties[prop_name] = additional_property @@ -39,5 +39,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return run_analysis_request_source_sample_files_map @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/sample.py b/cirro_api_client/v1/models/sample.py index 572e3e8..a6366a2 100644 --- a/cirro_api_client/v1/models/sample.py +++ b/cirro_api_client/v1/models/sample.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -31,20 +31,20 @@ class Sample: id: str name: str metadata: Union["SampleMetadata", None, Unset] = UNSET - files: Union[List["DataFile"], None, Unset] = UNSET - dataset_ids: Union[List[str], None, Unset] = UNSET - created_at: Union[None, Unset, datetime.datetime] = UNSET - updated_at: Union[None, Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + files: list["DataFile"] | None | Unset = UNSET + dataset_ids: list[str] | None | Unset = UNSET + created_at: None | Unset | datetime.datetime = UNSET + updated_at: None | Unset | datetime.datetime = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.sample_metadata import SampleMetadata id = self.id name = self.name - metadata: Union[Dict[str, Any], None, Unset] + metadata: dict[str, Any] | None | Unset if isinstance(self.metadata, Unset): metadata = UNSET elif isinstance(self.metadata, SampleMetadata): @@ -52,7 +52,7 @@ def to_dict(self) -> Dict[str, Any]: else: metadata = self.metadata - files: Union[List[Dict[str, Any]], None, Unset] + files: list[dict[str, Any]] | None | Unset if isinstance(self.files, Unset): files = UNSET elif isinstance(self.files, list): @@ -64,7 +64,7 @@ def to_dict(self) -> Dict[str, Any]: else: files = self.files - dataset_ids: Union[List[str], None, Unset] + dataset_ids: list[str] | None | Unset if isinstance(self.dataset_ids, Unset): dataset_ids = UNSET elif isinstance(self.dataset_ids, list): @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: else: dataset_ids = self.dataset_ids - created_at: Union[None, Unset, str] + created_at: None | Unset | str if isinstance(self.created_at, Unset): created_at = UNSET elif isinstance(self.created_at, datetime.datetime): @@ -81,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: else: created_at = self.created_at - updated_at: Union[None, Unset, str] + updated_at: None | Unset | str if isinstance(self.updated_at, Unset): updated_at = UNSET elif isinstance(self.updated_at, datetime.datetime): @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: else: updated_at = self.updated_at - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -111,7 +111,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.data_file import DataFile from ..models.sample_metadata import SampleMetadata @@ -137,7 +137,7 @@ def _parse_metadata(data: object) -> Union["SampleMetadata", None, Unset]: metadata = _parse_metadata(d.pop("metadata", UNSET)) - def _parse_files(data: object) -> Union[List["DataFile"], None, Unset]: + def _parse_files(data: object) -> list["DataFile"] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -155,11 +155,11 @@ def _parse_files(data: object) -> Union[List["DataFile"], None, Unset]: return files_type_0 except: # noqa: E722 pass - return cast(Union[List["DataFile"], None, Unset], data) + return cast(list["DataFile"] | None | Unset, data) files = _parse_files(d.pop("files", UNSET)) - def _parse_dataset_ids(data: object) -> Union[List[str], None, Unset]: + def _parse_dataset_ids(data: object) -> list[str] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -167,16 +167,16 @@ def _parse_dataset_ids(data: object) -> Union[List[str], None, Unset]: try: if not isinstance(data, list): raise TypeError() - dataset_ids_type_0 = cast(List[str], data) + dataset_ids_type_0 = cast(list[str], data) return dataset_ids_type_0 except: # noqa: E722 pass - return cast(Union[List[str], None, Unset], data) + return cast(list[str] | None | Unset, data) dataset_ids = _parse_dataset_ids(d.pop("datasetIds", UNSET)) - def _parse_created_at(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_created_at(data: object) -> None | Unset | datetime.datetime: if data is None: return data if isinstance(data, Unset): @@ -189,11 +189,11 @@ def _parse_created_at(data: object) -> Union[None, Unset, datetime.datetime]: return created_at_type_0 except: # noqa: E722 pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(None | Unset | datetime.datetime, data) created_at = _parse_created_at(d.pop("createdAt", UNSET)) - def _parse_updated_at(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_updated_at(data: object) -> None | Unset | datetime.datetime: if data is None: return data if isinstance(data, Unset): @@ -206,7 +206,7 @@ def _parse_updated_at(data: object) -> Union[None, Unset, datetime.datetime]: return updated_at_type_0 except: # noqa: E722 pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(None | Unset | datetime.datetime, data) updated_at = _parse_updated_at(d.pop("updatedAt", UNSET)) @@ -224,5 +224,5 @@ def _parse_updated_at(data: object) -> Union[None, Unset, datetime.datetime]: return sample @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/sample_metadata.py b/cirro_api_client/v1/models/sample_metadata.py index b7ba777..0431a2f 100644 --- a/cirro_api_client/v1/models/sample_metadata.py +++ b/cirro_api_client/v1/models/sample_metadata.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class SampleMetadata: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() sample_metadata = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return sample_metadata @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/sample_request.py b/cirro_api_client/v1/models/sample_request.py index 14facc3..cb35b1e 100644 --- a/cirro_api_client/v1/models/sample_request.py +++ b/cirro_api_client/v1/models/sample_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,14 +20,14 @@ class SampleRequest: name: str metadata: "SampleRequestMetadata" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name metadata = self.metadata.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -39,7 +39,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.sample_request_metadata import SampleRequestMetadata d = src_dict.copy() @@ -56,5 +56,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return sample_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/sample_request_metadata.py b/cirro_api_client/v1/models/sample_request_metadata.py index 78038d8..acaf4c1 100644 --- a/cirro_api_client/v1/models/sample_request_metadata.py +++ b/cirro_api_client/v1/models/sample_request_metadata.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class SampleRequestMetadata: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() sample_request_metadata = cls() @@ -28,5 +28,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return sample_request_metadata @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/sample_sheets.py b/cirro_api_client/v1/models/sample_sheets.py index 91dab4b..e12420f 100644 --- a/cirro_api_client/v1/models/sample_sheets.py +++ b/cirro_api_client/v1/models/sample_sheets.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,16 +16,16 @@ class SampleSheets: files (Union[Unset, str]): Written to files.csv, available as ds.files in preprocess """ - samples: Union[Unset, str] = UNSET - files: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + samples: Unset | str = UNSET + files: Unset | str = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: samples = self.samples files = self.files - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if samples is not UNSET: @@ -36,7 +36,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() samples = d.pop("samples", UNSET) @@ -51,5 +51,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return sample_sheets @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/service_connection.py b/cirro_api_client/v1/models/service_connection.py index 0ba6a00..81fe3dc 100644 --- a/cirro_api_client/v1/models/service_connection.py +++ b/cirro_api_client/v1/models/service_connection.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class ServiceConnection: name: str description: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,7 +35,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -50,5 +50,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return service_connection @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/set_user_project_role_request.py b/cirro_api_client/v1/models/set_user_project_role_request.py index cb80536..542d1e3 100644 --- a/cirro_api_client/v1/models/set_user_project_role_request.py +++ b/cirro_api_client/v1/models/set_user_project_role_request.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,17 +20,17 @@ class SetUserProjectRoleRequest: username: str role: ProjectRole - suppress_notification: Union[Unset, bool] = False - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + suppress_notification: Unset | bool = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: username = self.username role = self.role.value suppress_notification = self.suppress_notification - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -44,7 +44,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() username = d.pop("username") @@ -62,5 +62,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return set_user_project_role_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/sftp_credentials.py b/cirro_api_client/v1/models/sftp_credentials.py index 7a85f72..b0bc4a3 100644 --- a/cirro_api_client/v1/models/sftp_credentials.py +++ b/cirro_api_client/v1/models/sftp_credentials.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +22,9 @@ class SftpCredentials: password: str project_id: str expires_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: username = self.username password = self.password @@ -33,7 +33,7 @@ def to_dict(self) -> Dict[str, Any]: expires_at = self.expires_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -47,7 +47,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() username = d.pop("username") @@ -68,5 +68,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return sftp_credentials @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/share.py b/cirro_api_client/v1/models/share.py index f3d21b0..d5e756b 100644 --- a/cirro_api_client/v1/models/share.py +++ b/cirro_api_client/v1/models/share.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -36,15 +36,15 @@ class Share: description: str originating_project_id: str share_type: ShareType - conditions: List["DatasetCondition"] - classification_ids: List[str] - keywords: List[str] + conditions: list["DatasetCondition"] + classification_ids: list[str] + keywords: list[str] created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -70,7 +70,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -91,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.dataset_condition import DatasetCondition d = src_dict.copy() @@ -112,9 +112,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: conditions.append(conditions_item) - classification_ids = cast(List[str], d.pop("classificationIds")) + classification_ids = cast(list[str], d.pop("classificationIds")) - keywords = cast(List[str], d.pop("keywords")) + keywords = cast(list[str], d.pop("keywords")) created_by = d.pop("createdBy") @@ -140,5 +140,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return share @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/share_detail.py b/cirro_api_client/v1/models/share_detail.py index 5393fd5..a2c469c 100644 --- a/cirro_api_client/v1/models/share_detail.py +++ b/cirro_api_client/v1/models/share_detail.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,7 +28,6 @@ class ShareDetail: conditions (List['DatasetCondition']): The conditions under which the dataset is shared keywords (List[str]): classification_ids (List[str]): - is_subscribed (bool): is_view_restricted (bool): created_by (str): created_at (datetime.datetime): @@ -40,18 +39,17 @@ class ShareDetail: description: str originating_project: "NamedItem" share_type: ShareType - shared_projects: List["NamedItem"] - conditions: List["DatasetCondition"] - keywords: List[str] - classification_ids: List[str] - is_subscribed: bool + shared_projects: list["NamedItem"] + conditions: list["DatasetCondition"] + keywords: list[str] + classification_ids: list[str] is_view_restricted: bool created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -76,8 +74,6 @@ def to_dict(self) -> Dict[str, Any]: classification_ids = self.classification_ids - is_subscribed = self.is_subscribed - is_view_restricted = self.is_view_restricted created_by = self.created_by @@ -86,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -99,7 +95,6 @@ def to_dict(self) -> Dict[str, Any]: "conditions": conditions, "keywords": keywords, "classificationIds": classification_ids, - "isSubscribed": is_subscribed, "isViewRestricted": is_view_restricted, "createdBy": created_by, "createdAt": created_at, @@ -110,7 +105,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.dataset_condition import DatasetCondition from ..models.named_item import NamedItem @@ -139,11 +134,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: conditions.append(conditions_item) - keywords = cast(List[str], d.pop("keywords")) - - classification_ids = cast(List[str], d.pop("classificationIds")) + keywords = cast(list[str], d.pop("keywords")) - is_subscribed = d.pop("isSubscribed") + classification_ids = cast(list[str], d.pop("classificationIds")) is_view_restricted = d.pop("isViewRestricted") @@ -163,7 +156,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: conditions=conditions, keywords=keywords, classification_ids=classification_ids, - is_subscribed=is_subscribed, is_view_restricted=is_view_restricted, created_by=created_by, created_at=created_at, @@ -174,5 +166,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return share_detail @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/share_input.py b/cirro_api_client/v1/models/share_input.py index 99eaba1..10ea079 100644 --- a/cirro_api_client/v1/models/share_input.py +++ b/cirro_api_client/v1/models/share_input.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,14 +28,14 @@ class ShareInput: name: str description: str - classification_ids: List[str] - conditions: List["DatasetCondition"] - keywords: Union[Unset, List[str]] = UNSET - shared_project_ids: Union[Unset, List[str]] = UNSET - is_view_restricted: Union[Unset, bool] = False - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + classification_ids: list[str] + conditions: list["DatasetCondition"] + keywords: Unset | list[str] = UNSET + shared_project_ids: Unset | list[str] = UNSET + is_view_restricted: Unset | bool = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description @@ -47,17 +47,17 @@ def to_dict(self) -> Dict[str, Any]: conditions_item = conditions_item_data.to_dict() conditions.append(conditions_item) - keywords: Union[Unset, List[str]] = UNSET + keywords: Unset | list[str] = UNSET if not isinstance(self.keywords, Unset): keywords = self.keywords - shared_project_ids: Union[Unset, List[str]] = UNSET + shared_project_ids: Unset | list[str] = UNSET if not isinstance(self.shared_project_ids, Unset): shared_project_ids = self.shared_project_ids is_view_restricted = self.is_view_restricted - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -77,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.dataset_condition import DatasetCondition d = src_dict.copy() @@ -85,7 +85,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: description = d.pop("description") - classification_ids = cast(List[str], d.pop("classificationIds")) + classification_ids = cast(list[str], d.pop("classificationIds")) conditions = [] _conditions = d.pop("conditions") @@ -94,9 +94,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: conditions.append(conditions_item) - keywords = cast(List[str], d.pop("keywords", UNSET)) + keywords = cast(list[str], d.pop("keywords", UNSET)) - shared_project_ids = cast(List[str], d.pop("sharedProjectIds", UNSET)) + shared_project_ids = cast(list[str], d.pop("sharedProjectIds", UNSET)) is_view_restricted = d.pop("isViewRestricted", UNSET) @@ -114,5 +114,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return share_input @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/share_type.py b/cirro_api_client/v1/models/share_type.py index 576a15e..21ce157 100644 --- a/cirro_api_client/v1/models/share_type.py +++ b/cirro_api_client/v1/models/share_type.py @@ -3,11 +3,8 @@ class ShareType(str, Enum): AVAILABLE = "AVAILABLE" - """ The share is available for subscription """ PUBLISHER = "PUBLISHER" - """ The project owns this share """ SUBSCRIBER = "SUBSCRIBER" - """ The project can view this share """ UNKNOWN = "UNKNOWN" """ This is a fallback value for when the value is not known, do not use this value when making requests """ diff --git a/cirro_api_client/v1/models/sharing_type.py b/cirro_api_client/v1/models/sharing_type.py new file mode 100644 index 0000000..091ce0b --- /dev/null +++ b/cirro_api_client/v1/models/sharing_type.py @@ -0,0 +1,15 @@ +from enum import Enum + + +class SharingType(str, Enum): + PRIVATE = "PRIVATE" + READ_WRITE = "READ_WRITE" + UNKNOWN = "UNKNOWN" + """ This is a fallback value for when the value is not known, do not use this value when making requests """ + + def __str__(self) -> str: + return str(self.value) + + @classmethod + def _missing_(cls, number): + return cls(cls.UNKNOWN) diff --git a/cirro_api_client/v1/models/stop_execution_response.py b/cirro_api_client/v1/models/stop_execution_response.py index b96a290..0fbca94 100644 --- a/cirro_api_client/v1/models/stop_execution_response.py +++ b/cirro_api_client/v1/models/stop_execution_response.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,20 +16,20 @@ class StopExecutionResponse: failed (Union[Unset, List[str]]): List of job IDs that were not successful in termination """ - success: Union[Unset, List[str]] = UNSET - failed: Union[Unset, List[str]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + success: Unset | list[str] = UNSET + failed: Unset | list[str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - success: Union[Unset, List[str]] = UNSET + def to_dict(self) -> dict[str, Any]: + success: Unset | list[str] = UNSET if not isinstance(self.success, Unset): success = self.success - failed: Union[Unset, List[str]] = UNSET + failed: Unset | list[str] = UNSET if not isinstance(self.failed, Unset): failed = self.failed - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if success is not UNSET: @@ -40,11 +40,11 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() - success = cast(List[str], d.pop("success", UNSET)) + success = cast(list[str], d.pop("success", UNSET)) - failed = cast(List[str], d.pop("failed", UNSET)) + failed = cast(list[str], d.pop("failed", UNSET)) stop_execution_response = cls( success=success, @@ -55,5 +55,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return stop_execution_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/system_info_response.py b/cirro_api_client/v1/models/system_info_response.py index 6bd661c..27d2cd8 100644 --- a/cirro_api_client/v1/models/system_info_response.py +++ b/cirro_api_client/v1/models/system_info_response.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -42,9 +42,9 @@ class SystemInfoResponse: resources_info: "ResourcesInfo" tenant_info: "TenantInfo" auth: "AuthInfo" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: resources_bucket = self.resources_bucket references_bucket = self.references_bucket @@ -69,7 +69,7 @@ def to_dict(self) -> Dict[str, Any]: auth = self.auth.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -91,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.auth_info import AuthInfo from ..models.resources_info import ResourcesInfo from ..models.tenant_info import TenantInfo @@ -140,5 +140,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return system_info_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/table.py b/cirro_api_client/v1/models/table.py index c83fedc..c8ae28c 100644 --- a/cirro_api_client/v1/models/table.py +++ b/cirro_api_client/v1/models/table.py @@ -1,4 +1,5 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +import builtins +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,14 +26,14 @@ class Table: """ desc: str - name: Union[Unset, str] = UNSET - type: Union[Unset, str] = UNSET - rows: Union[Unset, int] = UNSET - path: Union[Unset, str] = UNSET - cols: Union[List["ColumnDefinition"], None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + name: Unset | str = UNSET + type: Unset | str = UNSET + rows: Unset | int = UNSET + path: Unset | str = UNSET + cols: list["ColumnDefinition"] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: desc = self.desc name = self.name @@ -43,7 +44,7 @@ def to_dict(self) -> Dict[str, Any]: path = self.path - cols: Union[List[Dict[str, Any]], None, Unset] + cols: list[dict[str, Any]] | None | Unset if isinstance(self.cols, Unset): cols = UNSET elif isinstance(self.cols, list): @@ -55,7 +56,7 @@ def to_dict(self) -> Dict[str, Any]: else: cols = self.cols - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -76,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: builtins.type[T], src_dict: dict[str, Any]) -> T: from ..models.column_definition import ColumnDefinition d = src_dict.copy() @@ -90,7 +91,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: path = d.pop("path", UNSET) - def _parse_cols(data: object) -> Union[List["ColumnDefinition"], None, Unset]: + def _parse_cols(data: object) -> list["ColumnDefinition"] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -108,7 +109,7 @@ def _parse_cols(data: object) -> Union[List["ColumnDefinition"], None, Unset]: return cols_type_0 except: # noqa: E722 pass - return cast(Union[List["ColumnDefinition"], None, Unset], data) + return cast(list["ColumnDefinition"] | None | Unset, data) cols = _parse_cols(d.pop("cols", UNSET)) @@ -125,5 +126,5 @@ def _parse_cols(data: object) -> Union[List["ColumnDefinition"], None, Unset]: return table @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/tag.py b/cirro_api_client/v1/models/tag.py index c5ccf01..05a5160 100644 --- a/cirro_api_client/v1/models/tag.py +++ b/cirro_api_client/v1/models/tag.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,22 +18,22 @@ class Tag: """ value: str - editable: Union[Unset, bool] = True - key: Union[None, Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + editable: Unset | bool = True + key: None | Unset | str = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: value = self.value editable = self.editable - key: Union[None, Unset, str] + key: None | Unset | str if isinstance(self.key, Unset): key = UNSET else: key = self.key - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -48,18 +48,18 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() value = d.pop("value") editable = d.pop("editable", UNSET) - def _parse_key(data: object) -> Union[None, Unset, str]: + def _parse_key(data: object) -> None | Unset | str: if data is None: return data if isinstance(data, Unset): return data - return cast(Union[None, Unset, str], data) + return cast(None | Unset | str, data) key = _parse_key(d.pop("key", UNSET)) @@ -73,5 +73,5 @@ def _parse_key(data: object) -> Union[None, Unset, str]: return tag @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/task.py b/cirro_api_client/v1/models/task.py index 4984050..e5bb3ee 100644 --- a/cirro_api_client/v1/models/task.py +++ b/cirro_api_client/v1/models/task.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -29,14 +29,14 @@ class Task: native_job_id: str status: str requested_at: datetime.datetime - started_at: Union[Unset, datetime.datetime] = UNSET - stopped_at: Union[Unset, datetime.datetime] = UNSET - container_image: Union[Unset, str] = UNSET - command_line: Union[Unset, str] = UNSET - log_location: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: + started_at: Unset | datetime.datetime = UNSET + stopped_at: Unset | datetime.datetime = UNSET + container_image: Unset | str = UNSET + command_line: Unset | str = UNSET + log_location: Unset | str = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: name = self.name native_job_id = self.native_job_id @@ -45,11 +45,11 @@ def to_dict(self) -> Dict[str, Any]: requested_at = self.requested_at.isoformat() - started_at: Union[Unset, str] = UNSET + started_at: Unset | str = UNSET if not isinstance(self.started_at, Unset): started_at = self.started_at.isoformat() - stopped_at: Union[Unset, str] = UNSET + stopped_at: Unset | str = UNSET if not isinstance(self.stopped_at, Unset): stopped_at = self.stopped_at.isoformat() @@ -59,7 +59,7 @@ def to_dict(self) -> Dict[str, Any]: log_location = self.log_location - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -83,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -94,14 +94,14 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: requested_at = isoparse(d.pop("requestedAt")) _started_at = d.pop("startedAt", UNSET) - started_at: Union[Unset, datetime.datetime] + started_at: Unset | datetime.datetime if isinstance(_started_at, Unset): started_at = UNSET else: started_at = isoparse(_started_at) _stopped_at = d.pop("stoppedAt", UNSET) - stopped_at: Union[Unset, datetime.datetime] + stopped_at: Unset | datetime.datetime if isinstance(_stopped_at, Unset): stopped_at = UNSET else: @@ -129,5 +129,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return task @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/task_cost.py b/cirro_api_client/v1/models/task_cost.py new file mode 100644 index 0000000..3980a27 --- /dev/null +++ b/cirro_api_client/v1/models/task_cost.py @@ -0,0 +1,70 @@ +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="TaskCost") + + +@_attrs_define +class TaskCost: + """ + Attributes: + name (str): + task_id (str): + status (str): + cost (float): + """ + + name: str + task_id: str + status: str + cost: float + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + task_id = self.task_id + + status = self.status + + cost = self.cost + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "taskId": task_id, + "status": status, + "cost": cost, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + task_id = d.pop("taskId") + + status = d.pop("status") + + cost = d.pop("cost") + + task_cost = cls( + name=name, + task_id=task_id, + status=status, + cost=cost, + ) + + task_cost.additional_properties = d + return task_cost + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/tenant_info.py b/cirro_api_client/v1/models/tenant_info.py index ff90ca6..6b5f92b 100644 --- a/cirro_api_client/v1/models/tenant_info.py +++ b/cirro_api_client/v1/models/tenant_info.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -35,11 +35,11 @@ class TenantInfo: tenant_logo_url: str terms_of_service_url: str privacy_policy_url: str - login_providers: List["LoginProvider"] + login_providers: list["LoginProvider"] features: "FeatureFlags" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id name = self.name @@ -63,7 +63,7 @@ def to_dict(self) -> Dict[str, Any]: features = self.features.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -83,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.feature_flags import FeatureFlags from ..models.login_provider import LoginProvider @@ -130,5 +130,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return tenant_info @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/update_dataset_request.py b/cirro_api_client/v1/models/update_dataset_request.py index 48a9c87..3cd2c9d 100644 --- a/cirro_api_client/v1/models/update_dataset_request.py +++ b/cirro_api_client/v1/models/update_dataset_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,10 +23,10 @@ class UpdateDatasetRequest: name: str description: str process_id: str - tags: List["Tag"] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + tags: list["Tag"] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name description = self.description @@ -38,7 +38,7 @@ def to_dict(self) -> Dict[str, Any]: tags_item = tags_item_data.to_dict() tags.append(tags_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -52,7 +52,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.tag import Tag d = src_dict.copy() @@ -80,5 +80,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return update_dataset_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/update_user_request.py b/cirro_api_client/v1/models/update_user_request.py index cbfc203..33d5d62 100644 --- a/cirro_api_client/v1/models/update_user_request.py +++ b/cirro_api_client/v1/models/update_user_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,15 +28,15 @@ class UpdateUserRequest: name: str email: str - phone: Union[Unset, str] = UNSET - department: Union[Unset, str] = UNSET - job_title: Union[Unset, str] = UNSET - organization: Union[Unset, str] = UNSET + phone: Unset | str = UNSET + department: Unset | str = UNSET + job_title: Unset | str = UNSET + organization: Unset | str = UNSET settings: Union["UserSettings", None, Unset] = UNSET - groups: Union[Unset, List[str]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + groups: Unset | list[str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.user_settings import UserSettings name = self.name @@ -51,7 +51,7 @@ def to_dict(self) -> Dict[str, Any]: organization = self.organization - settings: Union[Dict[str, Any], None, Unset] + settings: dict[str, Any] | None | Unset if isinstance(self.settings, Unset): settings = UNSET elif isinstance(self.settings, UserSettings): @@ -59,11 +59,11 @@ def to_dict(self) -> Dict[str, Any]: else: settings = self.settings - groups: Union[Unset, List[str]] = UNSET + groups: Unset | list[str] = UNSET if not isinstance(self.groups, Unset): groups = self.groups - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -87,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.user_settings import UserSettings d = src_dict.copy() @@ -120,7 +120,7 @@ def _parse_settings(data: object) -> Union["UserSettings", None, Unset]: settings = _parse_settings(d.pop("settings", UNSET)) - groups = cast(List[str], d.pop("groups", UNSET)) + groups = cast(list[str], d.pop("groups", UNSET)) update_user_request = cls( name=name, @@ -137,5 +137,5 @@ def _parse_settings(data: object) -> Union["UserSettings", None, Unset]: return update_user_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/upload_dataset_create_response.py b/cirro_api_client/v1/models/upload_dataset_create_response.py index 9da6238..4283844 100644 --- a/cirro_api_client/v1/models/upload_dataset_create_response.py +++ b/cirro_api_client/v1/models/upload_dataset_create_response.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,9 +20,9 @@ class UploadDatasetCreateResponse: message: str upload_path: str bucket: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: id = self.id message = self.message @@ -31,7 +31,7 @@ def to_dict(self) -> Dict[str, Any]: bucket = self.bucket - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -45,7 +45,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -66,5 +66,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return upload_dataset_create_response @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/upload_dataset_request.py b/cirro_api_client/v1/models/upload_dataset_request.py index edce7fc..d567994 100644 --- a/cirro_api_client/v1/models/upload_dataset_request.py +++ b/cirro_api_client/v1/models/upload_dataset_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,12 +25,12 @@ class UploadDatasetRequest: name: str process_id: str - expected_files: List[str] - description: Union[Unset, str] = UNSET - tags: Union[List["Tag"], None, Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + expected_files: list[str] + description: Unset | str = UNSET + tags: list["Tag"] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name process_id = self.process_id @@ -39,7 +39,7 @@ def to_dict(self) -> Dict[str, Any]: description = self.description - tags: Union[List[Dict[str, Any]], None, Unset] + tags: list[dict[str, Any]] | None | Unset if isinstance(self.tags, Unset): tags = UNSET elif isinstance(self.tags, list): @@ -51,7 +51,7 @@ def to_dict(self) -> Dict[str, Any]: else: tags = self.tags - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -68,7 +68,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.tag import Tag d = src_dict.copy() @@ -76,11 +76,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: process_id = d.pop("processId") - expected_files = cast(List[str], d.pop("expectedFiles")) + expected_files = cast(list[str], d.pop("expectedFiles")) description = d.pop("description", UNSET) - def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: + def _parse_tags(data: object) -> list["Tag"] | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -98,7 +98,7 @@ def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: return tags_type_0 except: # noqa: E722 pass - return cast(Union[List["Tag"], None, Unset], data) + return cast(list["Tag"] | None | Unset, data) tags = _parse_tags(d.pop("tags", UNSET)) @@ -114,5 +114,5 @@ def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: return upload_dataset_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/user.py b/cirro_api_client/v1/models/user.py index 2d85d52..c8f2c11 100644 --- a/cirro_api_client/v1/models/user.py +++ b/cirro_api_client/v1/models/user.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,15 +14,17 @@ class User: username (str): organization (str): department (str): + job_title (str): """ name: str username: str organization: str department: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + job_title: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: name = self.name username = self.username @@ -31,7 +33,9 @@ def to_dict(self) -> Dict[str, Any]: department = self.department - field_dict: Dict[str, Any] = {} + job_title = self.job_title + + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -39,13 +43,14 @@ def to_dict(self) -> Dict[str, Any]: "username": username, "organization": organization, "department": department, + "jobTitle": job_title, } ) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -55,16 +60,19 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: department = d.pop("department") + job_title = d.pop("jobTitle") + user = cls( name=name, username=username, organization=organization, department=department, + job_title=job_title, ) user.additional_properties = d return user @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/user_detail.py b/cirro_api_client/v1/models/user_detail.py index b78e335..f14a340 100644 --- a/cirro_api_client/v1/models/user_detail.py +++ b/cirro_api_client/v1/models/user_detail.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -42,14 +42,14 @@ class UserDetail: job_title: str department: str invited_by: str - project_assignments: List["UserProjectAssignment"] - groups: List[str] + project_assignments: list["UserProjectAssignment"] + groups: list[str] settings: "UserSettings" - sign_up_time: Union[None, Unset, datetime.datetime] = UNSET - last_signed_in: Union[None, Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + sign_up_time: None | Unset | datetime.datetime = UNSET + last_signed_in: None | Unset | datetime.datetime = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: username = self.username name = self.name @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: settings = self.settings.to_dict() - sign_up_time: Union[None, Unset, str] + sign_up_time: None | Unset | str if isinstance(self.sign_up_time, Unset): sign_up_time = UNSET elif isinstance(self.sign_up_time, datetime.datetime): @@ -83,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: else: sign_up_time = self.sign_up_time - last_signed_in: Union[None, Unset, str] + last_signed_in: None | Unset | str if isinstance(self.last_signed_in, Unset): last_signed_in = UNSET elif isinstance(self.last_signed_in, datetime.datetime): @@ -91,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: else: last_signed_in = self.last_signed_in - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -116,7 +116,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.user_project_assignment import UserProjectAssignment from ..models.user_settings import UserSettings @@ -144,11 +144,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: project_assignments.append(project_assignments_item) - groups = cast(List[str], d.pop("groups")) + groups = cast(list[str], d.pop("groups")) settings = UserSettings.from_dict(d.pop("settings")) - def _parse_sign_up_time(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_sign_up_time(data: object) -> None | Unset | datetime.datetime: if data is None: return data if isinstance(data, Unset): @@ -161,11 +161,11 @@ def _parse_sign_up_time(data: object) -> Union[None, Unset, datetime.datetime]: return sign_up_time_type_0 except: # noqa: E722 pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(None | Unset | datetime.datetime, data) sign_up_time = _parse_sign_up_time(d.pop("signUpTime", UNSET)) - def _parse_last_signed_in(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_last_signed_in(data: object) -> None | Unset | datetime.datetime: if data is None: return data if isinstance(data, Unset): @@ -178,7 +178,7 @@ def _parse_last_signed_in(data: object) -> Union[None, Unset, datetime.datetime] return last_signed_in_type_0 except: # noqa: E722 pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(None | Unset | datetime.datetime, data) last_signed_in = _parse_last_signed_in(d.pop("lastSignedIn", UNSET)) @@ -202,5 +202,5 @@ def _parse_last_signed_in(data: object) -> Union[None, Unset, datetime.datetime] return user_detail @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/user_project_assignment.py b/cirro_api_client/v1/models/user_project_assignment.py index 8b1f596..acfe33e 100644 --- a/cirro_api_client/v1/models/user_project_assignment.py +++ b/cirro_api_client/v1/models/user_project_assignment.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,17 +24,17 @@ class UserProjectAssignment: project_id: str role: ProjectRole created_by: str - created_at: Union[None, Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + created_at: None | Unset | datetime.datetime = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: project_id = self.project_id role = self.role.value created_by = self.created_by - created_at: Union[None, Unset, str] + created_at: None | Unset | str if isinstance(self.created_at, Unset): created_at = UNSET elif isinstance(self.created_at, datetime.datetime): @@ -42,7 +42,7 @@ def to_dict(self) -> Dict[str, Any]: else: created_at = self.created_at - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -57,7 +57,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() project_id = d.pop("projectId") @@ -65,7 +65,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: created_by = d.pop("createdBy") - def _parse_created_at(data: object) -> Union[None, Unset, datetime.datetime]: + def _parse_created_at(data: object) -> None | Unset | datetime.datetime: if data is None: return data if isinstance(data, Unset): @@ -78,7 +78,7 @@ def _parse_created_at(data: object) -> Union[None, Unset, datetime.datetime]: return created_at_type_0 except: # noqa: E722 pass - return cast(Union[None, Unset, datetime.datetime], data) + return cast(None | Unset | datetime.datetime, data) created_at = _parse_created_at(d.pop("createdAt", UNSET)) @@ -93,5 +93,5 @@ def _parse_created_at(data: object) -> Union[None, Unset, datetime.datetime]: return user_project_assignment @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/user_settings.py b/cirro_api_client/v1/models/user_settings.py index 13a83aa..c470c1e 100644 --- a/cirro_api_client/v1/models/user_settings.py +++ b/cirro_api_client/v1/models/user_settings.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,12 +15,12 @@ class UserSettings: """ analysis_update_notifications_enabled: bool - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: analysis_update_notifications_enabled = self.analysis_update_notifications_enabled - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -31,7 +31,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() analysis_update_notifications_enabled = d.pop("analysisUpdateNotificationsEnabled") @@ -43,5 +43,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return user_settings @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/validate_file_name_patterns_request.py b/cirro_api_client/v1/models/validate_file_name_patterns_request.py index 32dfb97..cfbfc51 100644 --- a/cirro_api_client/v1/models/validate_file_name_patterns_request.py +++ b/cirro_api_client/v1/models/validate_file_name_patterns_request.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,16 +14,16 @@ class ValidateFileNamePatternsRequest: file_name_patterns (List[str]): """ - file_names: List[str] - file_name_patterns: List[str] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + file_names: list[str] + file_name_patterns: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: file_names = self.file_names file_name_patterns = self.file_name_patterns - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,11 +35,11 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() - file_names = cast(List[str], d.pop("fileNames")) + file_names = cast(list[str], d.pop("fileNames")) - file_name_patterns = cast(List[str], d.pop("fileNamePatterns")) + file_name_patterns = cast(list[str], d.pop("fileNamePatterns")) validate_file_name_patterns_request = cls( file_names=file_names, @@ -50,5 +50,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return validate_file_name_patterns_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/validate_file_requirements_request.py b/cirro_api_client/v1/models/validate_file_requirements_request.py index 05957b8..e4fa27d 100644 --- a/cirro_api_client/v1/models/validate_file_requirements_request.py +++ b/cirro_api_client/v1/models/validate_file_requirements_request.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,16 +14,16 @@ class ValidateFileRequirementsRequest: sample_sheet (str): """ - file_names: List[str] + file_names: list[str] sample_sheet: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: file_names = self.file_names sample_sheet = self.sample_sheet - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,9 +35,9 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() - file_names = cast(List[str], d.pop("fileNames")) + file_names = cast(list[str], d.pop("fileNames")) sample_sheet = d.pop("sampleSheet") @@ -50,5 +50,5 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return validate_file_requirements_request @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/version_specification.py b/cirro_api_client/v1/models/version_specification.py new file mode 100644 index 0000000..2145682 --- /dev/null +++ b/cirro_api_client/v1/models/version_specification.py @@ -0,0 +1,62 @@ +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="VersionSpecification") + + +@_attrs_define +class VersionSpecification: + """ + Attributes: + version (str): + is_default (bool): + is_latest (bool): + """ + + version: str + is_default: bool + is_latest: bool + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + version = self.version + + is_default = self.is_default + + is_latest = self.is_latest + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "version": version, + "isDefault": is_default, + "isLatest": is_latest, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + d = src_dict.copy() + version = d.pop("version") + + is_default = d.pop("isDefault") + + is_latest = d.pop("isLatest") + + version_specification = cls( + version=version, + is_default=is_default, + is_latest=is_latest, + ) + + version_specification.additional_properties = d + return version_specification + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/workspace.py b/cirro_api_client/v1/models/workspace.py new file mode 100644 index 0000000..7f7141a --- /dev/null +++ b/cirro_api_client/v1/models/workspace.py @@ -0,0 +1,206 @@ +import datetime +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.sharing_type import SharingType +from ..models.status import Status +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.mounted_dataset import MountedDataset + from ..models.workspace_compute_config import WorkspaceComputeConfig + from ..models.workspace_session import WorkspaceSession + + +T = TypeVar("T", bound="Workspace") + + +@_attrs_define +class Workspace: + """ + Attributes: + id (str): + name (str): + description (str): + status (Status): + status_message (str): + environment_id (str): + mounted_datasets (List['MountedDataset']): + compute_config (WorkspaceComputeConfig): Configuration parameters for a containerized workspace compute + environment. + sharing_type (SharingType): + created_by (str): + created_at (datetime.datetime): + started_at (datetime.datetime): + updated_at (datetime.datetime): + sessions (Union[List['WorkspaceSession'], None, Unset]): + """ + + id: str + name: str + description: str + status: Status + status_message: str + environment_id: str + mounted_datasets: list["MountedDataset"] + compute_config: "WorkspaceComputeConfig" + sharing_type: SharingType + created_by: str + created_at: datetime.datetime + started_at: datetime.datetime + updated_at: datetime.datetime + sessions: list["WorkspaceSession"] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + description = self.description + + status = self.status.value + + status_message = self.status_message + + environment_id = self.environment_id + + mounted_datasets = [] + for mounted_datasets_item_data in self.mounted_datasets: + mounted_datasets_item = mounted_datasets_item_data.to_dict() + mounted_datasets.append(mounted_datasets_item) + + compute_config = self.compute_config.to_dict() + + sharing_type = self.sharing_type.value + + created_by = self.created_by + + created_at = self.created_at.isoformat() + + started_at = self.started_at.isoformat() + + updated_at = self.updated_at.isoformat() + + sessions: list[dict[str, Any]] | None | Unset + if isinstance(self.sessions, Unset): + sessions = UNSET + elif isinstance(self.sessions, list): + sessions = [] + for sessions_type_0_item_data in self.sessions: + sessions_type_0_item = sessions_type_0_item_data.to_dict() + sessions.append(sessions_type_0_item) + + else: + sessions = self.sessions + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "description": description, + "status": status, + "statusMessage": status_message, + "environmentId": environment_id, + "mountedDatasets": mounted_datasets, + "computeConfig": compute_config, + "sharingType": sharing_type, + "createdBy": created_by, + "createdAt": created_at, + "startedAt": started_at, + "updatedAt": updated_at, + } + ) + if sessions is not UNSET: + field_dict["sessions"] = sessions + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + from ..models.mounted_dataset import MountedDataset + from ..models.workspace_compute_config import WorkspaceComputeConfig + from ..models.workspace_session import WorkspaceSession + + d = src_dict.copy() + id = d.pop("id") + + name = d.pop("name") + + description = d.pop("description") + + status = Status(d.pop("status")) + + status_message = d.pop("statusMessage") + + environment_id = d.pop("environmentId") + + mounted_datasets = [] + _mounted_datasets = d.pop("mountedDatasets") + for mounted_datasets_item_data in _mounted_datasets: + mounted_datasets_item = MountedDataset.from_dict(mounted_datasets_item_data) + + mounted_datasets.append(mounted_datasets_item) + + compute_config = WorkspaceComputeConfig.from_dict(d.pop("computeConfig")) + + sharing_type = SharingType(d.pop("sharingType")) + + created_by = d.pop("createdBy") + + created_at = isoparse(d.pop("createdAt")) + + started_at = isoparse(d.pop("startedAt")) + + updated_at = isoparse(d.pop("updatedAt")) + + def _parse_sessions(data: object) -> list["WorkspaceSession"] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + sessions_type_0 = [] + _sessions_type_0 = data + for sessions_type_0_item_data in _sessions_type_0: + sessions_type_0_item = WorkspaceSession.from_dict(sessions_type_0_item_data) + + sessions_type_0.append(sessions_type_0_item) + + return sessions_type_0 + except: # noqa: E722 + pass + return cast(list["WorkspaceSession"] | None | Unset, data) + + sessions = _parse_sessions(d.pop("sessions", UNSET)) + + workspace = cls( + id=id, + name=name, + description=description, + status=status, + status_message=status_message, + environment_id=environment_id, + mounted_datasets=mounted_datasets, + compute_config=compute_config, + sharing_type=sharing_type, + created_by=created_by, + created_at=created_at, + started_at=started_at, + updated_at=updated_at, + sessions=sessions, + ) + + workspace.additional_properties = d + return workspace + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/workspace_compute_config.py b/cirro_api_client/v1/models/workspace_compute_config.py new file mode 100644 index 0000000..0bdf2fb --- /dev/null +++ b/cirro_api_client/v1/models/workspace_compute_config.py @@ -0,0 +1,134 @@ +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.workspace_compute_config_environment_variables_type_0 import ( + WorkspaceComputeConfigEnvironmentVariablesType0, + ) + + +T = TypeVar("T", bound="WorkspaceComputeConfig") + + +@_attrs_define +class WorkspaceComputeConfig: + """Configuration parameters for a containerized workspace compute environment. + + Attributes: + container_image_uri (str): Fully qualified container image URI (including registry, repository, and tag). + cpu (Union[Unset, int]): Number of vCPU cores allocated to the workspace. Example: 4. + memory_gi_b (Union[Unset, int]): Memory allocated to the workspace container in GiB. Example: 8. + volume_size_gi_b (Union[Unset, int]): Persistent storage volume size allocated to the workspace in GiB. Example: + 50. + environment_variables (Union['WorkspaceComputeConfigEnvironmentVariablesType0', None, Unset]): Map of + environment variables injected into the container at runtime. Keys must be non-blank. Example: {'ENV_MODE': + 'production', 'LOG_LEVEL': 'debug'}. + local_port (Union[Unset, int]): User-facing web server port (http). Example: 8080. + """ + + container_image_uri: str + cpu: Unset | int = UNSET + memory_gi_b: Unset | int = UNSET + volume_size_gi_b: Unset | int = UNSET + environment_variables: Union["WorkspaceComputeConfigEnvironmentVariablesType0", None, Unset] = UNSET + local_port: Unset | int = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.workspace_compute_config_environment_variables_type_0 import ( + WorkspaceComputeConfigEnvironmentVariablesType0, + ) + + container_image_uri = self.container_image_uri + + cpu = self.cpu + + memory_gi_b = self.memory_gi_b + + volume_size_gi_b = self.volume_size_gi_b + + environment_variables: dict[str, Any] | None | Unset + if isinstance(self.environment_variables, Unset): + environment_variables = UNSET + elif isinstance(self.environment_variables, WorkspaceComputeConfigEnvironmentVariablesType0): + environment_variables = self.environment_variables.to_dict() + else: + environment_variables = self.environment_variables + + local_port = self.local_port + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "containerImageUri": container_image_uri, + } + ) + if cpu is not UNSET: + field_dict["cpu"] = cpu + if memory_gi_b is not UNSET: + field_dict["memoryGiB"] = memory_gi_b + if volume_size_gi_b is not UNSET: + field_dict["volumeSizeGiB"] = volume_size_gi_b + if environment_variables is not UNSET: + field_dict["environmentVariables"] = environment_variables + if local_port is not UNSET: + field_dict["localPort"] = local_port + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + from ..models.workspace_compute_config_environment_variables_type_0 import ( + WorkspaceComputeConfigEnvironmentVariablesType0, + ) + + d = src_dict.copy() + container_image_uri = d.pop("containerImageUri") + + cpu = d.pop("cpu", UNSET) + + memory_gi_b = d.pop("memoryGiB", UNSET) + + volume_size_gi_b = d.pop("volumeSizeGiB", UNSET) + + def _parse_environment_variables( + data: object, + ) -> Union["WorkspaceComputeConfigEnvironmentVariablesType0", None, Unset]: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + environment_variables_type_0 = WorkspaceComputeConfigEnvironmentVariablesType0.from_dict(data) + + return environment_variables_type_0 + except: # noqa: E722 + pass + return cast(Union["WorkspaceComputeConfigEnvironmentVariablesType0", None, Unset], data) + + environment_variables = _parse_environment_variables(d.pop("environmentVariables", UNSET)) + + local_port = d.pop("localPort", UNSET) + + workspace_compute_config = cls( + container_image_uri=container_image_uri, + cpu=cpu, + memory_gi_b=memory_gi_b, + volume_size_gi_b=volume_size_gi_b, + environment_variables=environment_variables, + local_port=local_port, + ) + + workspace_compute_config.additional_properties = d + return workspace_compute_config + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/workspace_compute_config_environment_variables_type_0.py b/cirro_api_client/v1/models/workspace_compute_config_environment_variables_type_0.py new file mode 100644 index 0000000..3b1718d --- /dev/null +++ b/cirro_api_client/v1/models/workspace_compute_config_environment_variables_type_0.py @@ -0,0 +1,37 @@ +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="WorkspaceComputeConfigEnvironmentVariablesType0") + + +@_attrs_define +class WorkspaceComputeConfigEnvironmentVariablesType0: + """Map of environment variables injected into the container at runtime. Keys must be non-blank. + + Example: + {'ENV_MODE': 'production', 'LOG_LEVEL': 'debug'} + + """ + + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + d = src_dict.copy() + workspace_compute_config_environment_variables_type_0 = cls() + + workspace_compute_config_environment_variables_type_0.additional_properties = d + return workspace_compute_config_environment_variables_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/workspace_connection_response.py b/cirro_api_client/v1/models/workspace_connection_response.py new file mode 100644 index 0000000..ac8f795 --- /dev/null +++ b/cirro_api_client/v1/models/workspace_connection_response.py @@ -0,0 +1,64 @@ +import datetime +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +T = TypeVar("T", bound="WorkspaceConnectionResponse") + + +@_attrs_define +class WorkspaceConnectionResponse: + """ + Attributes: + connection_url (str): + expires_at (datetime.datetime): + message (str): + """ + + connection_url: str + expires_at: datetime.datetime + message: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + connection_url = self.connection_url + + expires_at = self.expires_at.isoformat() + + message = self.message + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "connectionUrl": connection_url, + "expiresAt": expires_at, + "message": message, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + d = src_dict.copy() + connection_url = d.pop("connectionUrl") + + expires_at = isoparse(d.pop("expiresAt")) + + message = d.pop("message") + + workspace_connection_response = cls( + connection_url=connection_url, + expires_at=expires_at, + message=message, + ) + + workspace_connection_response.additional_properties = d + return workspace_connection_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/workspace_environment.py b/cirro_api_client/v1/models/workspace_environment.py new file mode 100644 index 0000000..13ae4a2 --- /dev/null +++ b/cirro_api_client/v1/models/workspace_environment.py @@ -0,0 +1,111 @@ +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.version_specification import VersionSpecification + from ..models.workspace_compute_config import WorkspaceComputeConfig + + +T = TypeVar("T", bound="WorkspaceEnvironment") + + +@_attrs_define +class WorkspaceEnvironment: + """ + Attributes: + id (str): + name (str): + description (str): + category (str): + default_compute_config (WorkspaceComputeConfig): Configuration parameters for a containerized workspace compute + environment. + versions (List['VersionSpecification']): + owner (str): + """ + + id: str + name: str + description: str + category: str + default_compute_config: "WorkspaceComputeConfig" + versions: list["VersionSpecification"] + owner: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + name = self.name + + description = self.description + + category = self.category + + default_compute_config = self.default_compute_config.to_dict() + + versions = [] + for versions_item_data in self.versions: + versions_item = versions_item_data.to_dict() + versions.append(versions_item) + + owner = self.owner + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "description": description, + "category": category, + "defaultComputeConfig": default_compute_config, + "versions": versions, + "owner": owner, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + from ..models.version_specification import VersionSpecification + from ..models.workspace_compute_config import WorkspaceComputeConfig + + d = src_dict.copy() + id = d.pop("id") + + name = d.pop("name") + + description = d.pop("description") + + category = d.pop("category") + + default_compute_config = WorkspaceComputeConfig.from_dict(d.pop("defaultComputeConfig")) + + versions = [] + _versions = d.pop("versions") + for versions_item_data in _versions: + versions_item = VersionSpecification.from_dict(versions_item_data) + + versions.append(versions_item) + + owner = d.pop("owner") + + workspace_environment = cls( + id=id, + name=name, + description=description, + category=category, + default_compute_config=default_compute_config, + versions=versions, + owner=owner, + ) + + workspace_environment.additional_properties = d + return workspace_environment + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/workspace_input.py b/cirro_api_client/v1/models/workspace_input.py new file mode 100644 index 0000000..1de78b9 --- /dev/null +++ b/cirro_api_client/v1/models/workspace_input.py @@ -0,0 +1,119 @@ +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.sharing_type import SharingType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.mounted_dataset import MountedDataset + from ..models.workspace_compute_config import WorkspaceComputeConfig + + +T = TypeVar("T", bound="WorkspaceInput") + + +@_attrs_define +class WorkspaceInput: + """ + Attributes: + name (str): Name of the workspace. Example: my-workspace. + mounted_datasets (List['MountedDataset']): List of datasets to mount into the workspace. + compute_config (WorkspaceComputeConfig): Configuration parameters for a containerized workspace compute + environment. + sharing_type (SharingType): + description (Union[Unset, str]): Description of the workspace. + environment_id (Union[None, Unset, str]): ID of the predefined workspace environment to use. + """ + + name: str + mounted_datasets: list["MountedDataset"] + compute_config: "WorkspaceComputeConfig" + sharing_type: SharingType + description: Unset | str = UNSET + environment_id: None | Unset | str = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + mounted_datasets = [] + for mounted_datasets_item_data in self.mounted_datasets: + mounted_datasets_item = mounted_datasets_item_data.to_dict() + mounted_datasets.append(mounted_datasets_item) + + compute_config = self.compute_config.to_dict() + + sharing_type = self.sharing_type.value + + description = self.description + + environment_id: None | Unset | str + if isinstance(self.environment_id, Unset): + environment_id = UNSET + else: + environment_id = self.environment_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "mountedDatasets": mounted_datasets, + "computeConfig": compute_config, + "sharingType": sharing_type, + } + ) + if description is not UNSET: + field_dict["description"] = description + if environment_id is not UNSET: + field_dict["environmentId"] = environment_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + from ..models.mounted_dataset import MountedDataset + from ..models.workspace_compute_config import WorkspaceComputeConfig + + d = src_dict.copy() + name = d.pop("name") + + mounted_datasets = [] + _mounted_datasets = d.pop("mountedDatasets") + for mounted_datasets_item_data in _mounted_datasets: + mounted_datasets_item = MountedDataset.from_dict(mounted_datasets_item_data) + + mounted_datasets.append(mounted_datasets_item) + + compute_config = WorkspaceComputeConfig.from_dict(d.pop("computeConfig")) + + sharing_type = SharingType(d.pop("sharingType")) + + description = d.pop("description", UNSET) + + def _parse_environment_id(data: object) -> None | Unset | str: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | Unset | str, data) + + environment_id = _parse_environment_id(d.pop("environmentId", UNSET)) + + workspace_input = cls( + name=name, + mounted_datasets=mounted_datasets, + compute_config=compute_config, + sharing_type=sharing_type, + description=description, + environment_id=environment_id, + ) + + workspace_input.additional_properties = d + return workspace_input + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/workspace_session.py b/cirro_api_client/v1/models/workspace_session.py new file mode 100644 index 0000000..7d233d3 --- /dev/null +++ b/cirro_api_client/v1/models/workspace_session.py @@ -0,0 +1,64 @@ +import datetime +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +T = TypeVar("T", bound="WorkspaceSession") + + +@_attrs_define +class WorkspaceSession: + """ + Attributes: + id (str): + user (str): + created_at (datetime.datetime): + """ + + id: str + user: str + created_at: datetime.datetime + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + user = self.user + + created_at = self.created_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "user": user, + "createdAt": created_at, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id") + + user = d.pop("user") + + created_at = isoparse(d.pop("createdAt")) + + workspace_session = cls( + id=id, + user=user, + created_at=created_at, + ) + + workspace_session.additional_properties = d + return workspace_session + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/types.py b/cirro_api_client/v1/types.py index 27e9a71..a8d5a42 100644 --- a/cirro_api_client/v1/types.py +++ b/cirro_api_client/v1/types.py @@ -2,7 +2,7 @@ from collections.abc import MutableMapping from http import HTTPStatus -from typing import BinaryIO, Generic, Literal, Optional, Tuple, TypeVar +from typing import BinaryIO, Generic, Literal, TypeVar from attrs import define @@ -14,7 +14,7 @@ def __bool__(self) -> Literal[False]: UNSET: Unset = Unset() -FileJsonType = Tuple[Optional[str], BinaryIO, Optional[str]] +FileJsonType = tuple[str | None, BinaryIO, str | None] @define @@ -22,8 +22,8 @@ class File: """Contains information for file uploads""" payload: BinaryIO - file_name: Optional[str] = None - mime_type: Optional[str] = None + file_name: str | None = None + mime_type: str | None = None def to_tuple(self) -> FileJsonType: """Return a tuple representation that httpx will accept for multipart/form-data""" @@ -40,7 +40,7 @@ class Response(Generic[T]): status_code: HTTPStatus content: bytes headers: MutableMapping[str, str] - parsed: Optional[T] + parsed: T | None __all__ = ["File", "Response", "FileJsonType", "Unset", "UNSET"] From 898c59472c70b55185718bf0122d75b8a2337f1e Mon Sep 17 00:00:00 2001 From: malnasleh Date: Sun, 16 Nov 2025 14:49:38 -0800 Subject: [PATCH 2/4] Regenerating the api client after reinstalling openapi-python-client through poetry --- cirro_api_client/v1/api/audit/get_event.py | 12 +- cirro_api_client/v1/api/audit/list_events.py | 52 +++---- .../v1/api/billing/create_billing_account.py | 14 +- .../v1/api/billing/delete_billing_account.py | 8 +- .../v1/api/billing/get_billing_accounts.py | 30 ++-- .../v1/api/billing/update_billing_account.py | 10 +- .../api/compute_environment/create_agent.py | 14 +- .../create_compute_environment.py | 14 +- .../api/compute_environment/delete_agent.py | 8 +- .../delete_compute_environment.py | 8 +- .../v1/api/compute_environment/get_agents.py | 18 +-- .../get_compute_environments.py | 18 +-- .../api/compute_environment/update_agent.py | 10 +- .../update_compute_environment.py | 10 +- .../v1/api/dashboards/create_dashboard.py | 14 +- .../v1/api/dashboards/delete_dashboard.py | 12 +- .../v1/api/dashboards/get_dashboard.py | 12 +- .../v1/api/dashboards/get_dashboards.py | 18 +-- .../v1/api/dashboards/update_dashboard.py | 14 +- .../v1/api/datasets/delete_dataset.py | 8 +- .../v1/api/datasets/get_dataset.py | 12 +- .../v1/api/datasets/get_dataset_manifest.py | 34 ++--- .../v1/api/datasets/get_datasets.py | 34 ++--- .../v1/api/datasets/get_sample_sheets.py | 12 +- .../v1/api/datasets/import_public_dataset.py | 14 +- .../v1/api/datasets/ingest_samples.py | 8 +- .../v1/api/datasets/regenerate_manifest.py | 8 +- .../v1/api/datasets/rerun_transform.py | 8 +- .../v1/api/datasets/update_dataset.py | 14 +- .../v1/api/datasets/upload_dataset.py | 14 +- .../v1/api/execution/calculate_cost.py | 12 +- .../v1/api/execution/get_execution_logs.py | 24 ++-- .../v1/api/execution/get_project_summary.py | 24 ++-- .../v1/api/execution/get_task_logs.py | 24 ++-- .../api/execution/get_tasks_for_execution.py | 30 ++-- .../v1/api/execution/run_analysis.py | 14 +- .../v1/api/execution/stop_analysis.py | 12 +- .../v1/api/feed/create_discussion.py | 14 +- .../v1/api/feed/delete_discussion.py | 8 +- .../v1/api/feed/delete_message.py | 8 +- .../v1/api/feed/get_discussion.py | 12 +- .../v1/api/feed/get_discussions_for_entity.py | 48 +++---- .../api/feed/get_messages_for_discussion.py | 62 ++++----- cirro_api_client/v1/api/feed/post_message.py | 10 +- .../v1/api/feed/update_discussion.py | 10 +- .../v1/api/feed/update_message.py | 10 +- .../generate_governance_file_access_token.py | 14 +- .../generate_project_file_access_token.py | 14 +- .../api/file/generate_project_sftp_token.py | 14 +- .../api/governance/create_classification.py | 14 +- .../v1/api/governance/create_contact.py | 14 +- .../v1/api/governance/create_requirement.py | 14 +- .../api/governance/delete_classification.py | 8 +- .../v1/api/governance/delete_contact.py | 8 +- .../v1/api/governance/delete_requirement.py | 8 +- .../v1/api/governance/fulfill_requirement.py | 14 +- .../v1/api/governance/get_classification.py | 12 +- .../v1/api/governance/get_classifications.py | 18 +-- .../v1/api/governance/get_contact.py | 12 +- .../v1/api/governance/get_contacts.py | 18 +-- .../v1/api/governance/get_requirement.py | 12 +- .../v1/api/governance/get_requirements.py | 30 ++-- .../governance/get_requirements_by_project.py | 30 ++-- .../api/governance/update_classification.py | 14 +- .../v1/api/governance/update_contact.py | 14 +- .../v1/api/governance/update_requirement.py | 14 +- .../update_requirement_file_for_project.py | 10 +- .../v1/api/metadata/get_dataset_samples.py | 18 +-- .../v1/api/metadata/get_project_samples.py | 34 ++--- .../v1/api/metadata/get_project_schema.py | 12 +- .../v1/api/metadata/get_sample_by_id.py | 12 +- .../v1/api/metadata/update_project_schema.py | 10 +- .../v1/api/metadata/update_sample.py | 14 +- .../v1/api/metrics/get_all_metrics.py | 18 +-- .../v1/api/metrics/get_project_metrics.py | 12 +- .../api/notebooks/create_notebook_instance.py | 14 +- .../api/notebooks/delete_notebook_instance.py | 8 +- .../generate_notebook_instance_url.py | 12 +- .../notebooks/get_notebook_instance_status.py | 12 +- .../api/notebooks/get_notebook_instances.py | 18 +-- .../api/notebooks/stop_notebook_instance.py | 8 +- .../api/processes/archive_custom_process.py | 8 +- .../api/processes/calculate_pipeline_cost.py | 14 +- .../v1/api/processes/create_custom_process.py | 20 +-- .../v1/api/processes/get_process.py | 12 +- .../api/processes/get_process_parameters.py | 12 +- .../v1/api/processes/get_processes.py | 30 ++-- .../v1/api/processes/sync_custom_process.py | 12 +- .../v1/api/processes/update_custom_process.py | 10 +- .../processes/validate_file_name_patterns.py | 20 +-- .../processes/validate_file_requirements.py | 14 +- .../create_project_request.py | 14 +- .../v1/api/projects/approve_access_request.py | 10 +- .../v1/api/projects/archive_project.py | 8 +- .../v1/api/projects/create_access_request.py | 14 +- .../v1/api/projects/create_project.py | 14 +- .../v1/api/projects/deny_access_request.py | 8 +- .../v1/api/projects/get_access_requests.py | 30 ++-- .../api/projects/get_discoverable_projects.py | 18 +-- .../v1/api/projects/get_project.py | 12 +- .../projects/get_project_create_options.py | 12 +- .../v1/api/projects/get_project_users.py | 18 +-- .../v1/api/projects/get_projects.py | 18 +-- .../v1/api/projects/redeploy_project.py | 8 +- .../v1/api/projects/set_user_project_role.py | 10 +- .../v1/api/projects/unarchive_project.py | 8 +- .../v1/api/projects/update_project.py | 14 +- .../v1/api/projects/update_project_tags.py | 16 +-- .../references/create_project_reference.py | 14 +- .../references/delete_project_reference.py | 8 +- .../v1/api/references/get_reference_types.py | 18 +-- .../v1/api/references/get_references.py | 18 +-- .../references/get_references_for_project.py | 18 +-- .../references/refresh_project_references.py | 8 +- .../v1/api/sharing/create_share.py | 14 +- .../v1/api/sharing/delete_share.py | 8 +- .../v1/api/sharing/get_discoverable_shares.py | 18 +-- cirro_api_client/v1/api/sharing/get_share.py | 12 +- .../v1/api/sharing/get_shared_datasets.py | 34 ++--- cirro_api_client/v1/api/sharing/get_shares.py | 18 +-- .../v1/api/sharing/subscribe_share.py | 8 +- .../v1/api/sharing/unsubscribe_share.py | 8 +- .../v1/api/sharing/update_share.py | 10 +- .../v1/api/system/get_service_connections.py | 18 +-- cirro_api_client/v1/api/system/info.py | 12 +- cirro_api_client/v1/api/tools/move_dataset.py | 14 +- cirro_api_client/v1/api/users/get_user.py | 12 +- cirro_api_client/v1/api/users/invite_user.py | 14 +- cirro_api_client/v1/api/users/list_users.py | 46 +++---- .../v1/api/users/sign_out_user.py | 8 +- cirro_api_client/v1/api/users/update_user.py | 14 +- .../v1/api/workspaces/connect_workspace.py | 12 +- .../v1/api/workspaces/create_workspace.py | 14 +- .../v1/api/workspaces/delete_workspace.py | 8 +- .../v1/api/workspaces/disconnect_workspace.py | 10 +- .../v1/api/workspaces/get_workspace.py | 12 +- .../workspaces/get_workspace_environments.py | 18 +-- .../v1/api/workspaces/get_workspaces.py | 18 +-- .../v1/api/workspaces/start_workspace.py | 8 +- .../v1/api/workspaces/stop_workspace.py | 8 +- .../v1/api/workspaces/update_workspace.py | 10 +- cirro_api_client/v1/client.py | 20 +-- cirro_api_client/v1/errors.py | 3 +- cirro_api_client/v1/models/agent.py | 20 +-- cirro_api_client/v1/models/agent_detail.py | 18 +-- .../agent_detail_environment_configuration.py | 12 +- .../v1/models/agent_detail_tags.py | 12 +- cirro_api_client/v1/models/agent_input.py | 26 ++-- ...gent_input_configuration_options_schema.py | 12 +- .../agent_input_environment_configuration.py | 12 +- .../v1/models/agent_input_tags.py | 12 +- .../v1/models/agent_registration.py | 12 +- cirro_api_client/v1/models/agent_tags.py | 12 +- .../v1/models/allowed_data_type.py | 14 +- .../models/approve_project_access_request.py | 12 +- cirro_api_client/v1/models/artifact.py | 12 +- cirro_api_client/v1/models/audit_event.py | 36 ++--- .../v1/models/audit_event_changes.py | 12 +- .../v1/models/audit_event_event_detail.py | 12 +- cirro_api_client/v1/models/auth_info.py | 12 +- cirro_api_client/v1/models/aws_credentials.py | 14 +- cirro_api_client/v1/models/billing_account.py | 18 +-- .../v1/models/billing_account_request.py | 18 +-- .../models/calculate_pipeline_cost_request.py | 12 +- .../v1/models/classification_input.py | 16 +-- cirro_api_client/v1/models/cloud_account.py | 18 +-- .../v1/models/column_definition.py | 18 +-- .../compute_environment_configuration.py | 24 ++-- ...compute_environment_configuration_input.py | 22 +-- ...ironment_configuration_input_properties.py | 12 +- ...te_environment_configuration_properties.py | 12 +- cirro_api_client/v1/models/contact.py | 12 +- cirro_api_client/v1/models/contact_input.py | 12 +- cirro_api_client/v1/models/cost_response.py | 24 ++-- .../create_notebook_instance_request.py | 28 ++-- .../models/create_project_access_request.py | 12 +- .../v1/models/create_reference_request.py | 16 +-- cirro_api_client/v1/models/create_response.py | 12 +- .../v1/models/custom_pipeline_settings.py | 52 +++---- .../v1/models/custom_process_input.py | 68 +++++----- cirro_api_client/v1/models/dashboard.py | 24 ++-- .../v1/models/dashboard_dashboard_data.py | 12 +- cirro_api_client/v1/models/dashboard_info.py | 12 +- .../v1/models/dashboard_request.py | 24 ++-- .../dashboard_request_dashboard_data.py | 12 +- .../v1/models/dashboard_request_info.py | 12 +- cirro_api_client/v1/models/data_file.py | 12 +- .../v1/models/data_file_metadata.py | 12 +- cirro_api_client/v1/models/dataset.py | 18 +-- .../v1/models/dataset_assets_manifest.py | 32 ++--- .../v1/models/dataset_condition.py | 12 +- cirro_api_client/v1/models/dataset_detail.py | 36 ++--- .../v1/models/dataset_detail_info.py | 12 +- .../v1/models/dataset_detail_params.py | 12 +- .../dataset_detail_source_sample_files_map.py | 14 +- cirro_api_client/v1/models/dataset_viz.py | 25 ++-- .../v1/models/dataset_viz_config.py | 12 +- cirro_api_client/v1/models/discussion.py | 12 +- .../v1/models/discussion_input.py | 12 +- cirro_api_client/v1/models/entity.py | 12 +- cirro_api_client/v1/models/error_message.py | 12 +- cirro_api_client/v1/models/feature_flags.py | 12 +- cirro_api_client/v1/models/file_entry.py | 20 +-- .../v1/models/file_entry_metadata.py | 12 +- .../v1/models/file_mapping_rule.py | 20 +-- cirro_api_client/v1/models/file_name_match.py | 12 +- .../v1/models/file_name_pattern.py | 20 +-- .../v1/models/file_requirements.py | 18 +-- cirro_api_client/v1/models/form_schema.py | 20 +-- .../v1/models/form_schema_form.py | 12 +- cirro_api_client/v1/models/form_schema_ui.py | 12 +- .../v1/models/fulfillment_response.py | 12 +- .../generate_sftp_credentials_request.py | 14 +- .../v1/models/get_execution_logs_response.py | 14 +- .../get_project_summary_response_200.py | 12 +- .../v1/models/governance_classification.py | 16 +-- .../v1/models/governance_contact.py | 12 +- .../v1/models/governance_expiry.py | 35 +++-- cirro_api_client/v1/models/governance_file.py | 25 ++-- .../models/governance_file_access_request.py | 36 ++--- .../v1/models/governance_file_input.py | 12 +- .../v1/models/governance_requirement.py | 62 ++++----- ...governance_requirement_project_file_map.py | 12 +- cirro_api_client/v1/models/group_cost.py | 16 +-- .../v1/models/import_data_request.py | 26 ++-- .../v1/models/invite_user_request.py | 12 +- .../v1/models/invite_user_response.py | 12 +- cirro_api_client/v1/models/log_entry.py | 14 +- cirro_api_client/v1/models/login_provider.py | 12 +- cirro_api_client/v1/models/message.py | 22 +-- cirro_api_client/v1/models/message_input.py | 20 +-- cirro_api_client/v1/models/metric_record.py | 22 +-- .../v1/models/metric_record_services.py | 12 +- cirro_api_client/v1/models/mounted_dataset.py | 12 +- .../v1/models/move_dataset_input.py | 12 +- .../v1/models/move_dataset_response.py | 16 +-- cirro_api_client/v1/models/named_item.py | 12 +- .../v1/models/notebook_instance.py | 20 +-- .../notebook_instance_status_response.py | 12 +- .../models/open_notebook_instance_response.py | 12 +- .../paginated_response_dataset_list_dto.py | 14 +- .../models/paginated_response_discussion.py | 14 +- .../v1/models/paginated_response_message.py | 14 +- .../models/paginated_response_sample_dto.py | 14 +- .../v1/models/paginated_response_user_dto.py | 14 +- cirro_api_client/v1/models/pipeline_code.py | 12 +- cirro_api_client/v1/models/pipeline_cost.py | 24 ++-- .../v1/models/portal_error_response.py | 14 +- cirro_api_client/v1/models/process.py | 54 ++++---- cirro_api_client/v1/models/process_detail.py | 64 ++++----- cirro_api_client/v1/models/project.py | 18 +-- .../v1/models/project_access_request.py | 12 +- .../v1/models/project_create_options.py | 14 +- cirro_api_client/v1/models/project_detail.py | 28 ++-- .../v1/models/project_file_access_request.py | 28 ++-- cirro_api_client/v1/models/project_input.py | 34 ++--- cirro_api_client/v1/models/project_metrics.py | 20 +-- cirro_api_client/v1/models/project_request.py | 16 +-- .../v1/models/project_requirement.py | 114 ++++++++-------- .../v1/models/project_settings.py | 128 +++++++++--------- cirro_api_client/v1/models/project_user.py | 12 +- cirro_api_client/v1/models/reference.py | 14 +- cirro_api_client/v1/models/reference_type.py | 14 +- .../models/reference_type_validation_item.py | 12 +- .../models/requirement_fulfillment_input.py | 28 ++-- .../v1/models/requirement_input.py | 66 ++++----- cirro_api_client/v1/models/resources_info.py | 12 +- .../v1/models/run_analysis_request.py | 56 ++++---- .../v1/models/run_analysis_request_params.py | 12 +- ...nalysis_request_source_sample_files_map.py | 14 +- cirro_api_client/v1/models/sample.py | 48 +++---- cirro_api_client/v1/models/sample_metadata.py | 12 +- cirro_api_client/v1/models/sample_request.py | 12 +- .../v1/models/sample_request_metadata.py | 12 +- cirro_api_client/v1/models/sample_sheets.py | 16 +-- .../v1/models/service_connection.py | 12 +- .../models/set_user_project_role_request.py | 14 +- .../v1/models/sftp_credentials.py | 12 +- cirro_api_client/v1/models/share.py | 22 +-- cirro_api_client/v1/models/share_detail.py | 24 ++-- cirro_api_client/v1/models/share_input.py | 34 ++--- .../v1/models/stop_execution_response.py | 24 ++-- .../v1/models/system_info_response.py | 12 +- cirro_api_client/v1/models/table.py | 31 ++--- cirro_api_client/v1/models/tag.py | 22 +-- cirro_api_client/v1/models/task.py | 32 ++--- cirro_api_client/v1/models/task_cost.py | 12 +- cirro_api_client/v1/models/tenant_info.py | 14 +- .../v1/models/update_dataset_request.py | 14 +- .../v1/models/update_user_request.py | 28 ++-- .../models/upload_dataset_create_response.py | 12 +- .../v1/models/upload_dataset_request.py | 26 ++-- cirro_api_client/v1/models/user.py | 12 +- cirro_api_client/v1/models/user_detail.py | 34 ++--- .../v1/models/user_project_assignment.py | 20 +-- cirro_api_client/v1/models/user_settings.py | 12 +- .../validate_file_name_patterns_request.py | 20 +-- .../validate_file_requirements_request.py | 16 +-- .../v1/models/version_specification.py | 12 +- cirro_api_client/v1/models/workspace.py | 22 +-- .../v1/models/workspace_compute_config.py | 22 +-- ...ute_config_environment_variables_type_0.py | 12 +- .../models/workspace_connection_response.py | 12 +- .../v1/models/workspace_environment.py | 14 +- cirro_api_client/v1/models/workspace_input.py | 24 ++-- .../v1/models/workspace_session.py | 12 +- cirro_api_client/v1/types.py | 10 +- 307 files changed, 2729 insertions(+), 2732 deletions(-) diff --git a/cirro_api_client/v1/api/audit/get_event.py b/cirro_api_client/v1/api/audit/get_event.py index 91b58ee..4e633b9 100644 --- a/cirro_api_client/v1/api/audit/get_event.py +++ b/cirro_api_client/v1/api/audit/get_event.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( audit_event_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/audit-events/{audit_event_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> AuditEvent | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[AuditEvent]: if response.status_code == HTTPStatus.OK: response_200 = AuditEvent.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( audit_event_id: str, *, client: Client, -) -> AuditEvent | None: +) -> Optional[AuditEvent]: """Get audit event Get audit event detailed information @@ -135,7 +135,7 @@ async def asyncio( audit_event_id: str, *, client: Client, -) -> AuditEvent | None: +) -> Optional[AuditEvent]: """Get audit event Get audit event detailed information diff --git a/cirro_api_client/v1/api/audit/list_events.py b/cirro_api_client/v1/api/audit/list_events.py index d98976b..db53e7a 100644 --- a/cirro_api_client/v1/api/audit/list_events.py +++ b/cirro_api_client/v1/api/audit/list_events.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional, Union import httpx @@ -12,15 +12,15 @@ def _get_kwargs( *, - username: Unset | str = UNSET, - entity_type: Unset | ListEventsEntityType = UNSET, - entity_id: Unset | str = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} + username: Union[Unset, str] = UNSET, + entity_type: Union[Unset, ListEventsEntityType] = UNSET, + entity_id: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} params["username"] = username - json_entity_type: Unset | str = UNSET + json_entity_type: Union[Unset, str] = UNSET if not isinstance(entity_type, Unset): json_entity_type = entity_type.value @@ -30,7 +30,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/audit-events", "params": params, @@ -39,7 +39,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["AuditEvent"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["AuditEvent"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -53,7 +53,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["AuditE errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["AuditEvent"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["AuditEvent"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,10 +65,10 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[lis def sync_detailed( *, client: Client, - username: Unset | str = UNSET, - entity_type: Unset | ListEventsEntityType = UNSET, - entity_id: Unset | str = UNSET, -) -> Response[list["AuditEvent"]]: + username: Union[Unset, str] = UNSET, + entity_type: Union[Unset, ListEventsEntityType] = UNSET, + entity_id: Union[Unset, str] = UNSET, +) -> Response[List["AuditEvent"]]: """List audit events Gets a list of audit events @@ -104,10 +104,10 @@ def sync_detailed( def sync( *, client: Client, - username: Unset | str = UNSET, - entity_type: Unset | ListEventsEntityType = UNSET, - entity_id: Unset | str = UNSET, -) -> list["AuditEvent"] | None: + username: Union[Unset, str] = UNSET, + entity_type: Union[Unset, ListEventsEntityType] = UNSET, + entity_id: Union[Unset, str] = UNSET, +) -> Optional[List["AuditEvent"]]: """List audit events Gets a list of audit events @@ -140,10 +140,10 @@ def sync( async def asyncio_detailed( *, client: Client, - username: Unset | str = UNSET, - entity_type: Unset | ListEventsEntityType = UNSET, - entity_id: Unset | str = UNSET, -) -> Response[list["AuditEvent"]]: + username: Union[Unset, str] = UNSET, + entity_type: Union[Unset, ListEventsEntityType] = UNSET, + entity_id: Union[Unset, str] = UNSET, +) -> Response[List["AuditEvent"]]: """List audit events Gets a list of audit events @@ -176,10 +176,10 @@ async def asyncio_detailed( async def asyncio( *, client: Client, - username: Unset | str = UNSET, - entity_type: Unset | ListEventsEntityType = UNSET, - entity_id: Unset | str = UNSET, -) -> list["AuditEvent"] | None: + username: Union[Unset, str] = UNSET, + entity_type: Union[Unset, ListEventsEntityType] = UNSET, + entity_id: Union[Unset, str] = UNSET, +) -> Optional[List["AuditEvent"]]: """List audit events Gets a list of audit events diff --git a/cirro_api_client/v1/api/billing/create_billing_account.py b/cirro_api_client/v1/api/billing/create_billing_account.py index c708e57..a9f0d2d 100644 --- a/cirro_api_client/v1/api/billing/create_billing_account.py +++ b/cirro_api_client/v1/api/billing/create_billing_account.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: BillingAccountRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/billing", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: BillingAccountRequest, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create billing account Creates a billing account @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: BillingAccountRequest, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create billing account Creates a billing account diff --git a/cirro_api_client/v1/api/billing/delete_billing_account.py b/cirro_api_client/v1/api/billing/delete_billing_account.py index 0776757..d8528ca 100644 --- a/cirro_api_client/v1/api/billing/delete_billing_account.py +++ b/cirro_api_client/v1/api/billing/delete_billing_account.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -10,8 +10,8 @@ def _get_kwargs( billing_account_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/billing/{billing_account_id}", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/billing/get_billing_accounts.py b/cirro_api_client/v1/api/billing/get_billing_accounts.py index deb4614..017f074 100644 --- a/cirro_api_client/v1/api/billing/get_billing_accounts.py +++ b/cirro_api_client/v1/api/billing/get_billing_accounts.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional, Union import httpx @@ -11,15 +11,15 @@ def _get_kwargs( *, - include_archived: Unset | bool = False, -) -> dict[str, Any]: - params: dict[str, Any] = {} + include_archived: Union[Unset, bool] = False, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} params["includeArchived"] = include_archived params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/billing", "params": params, @@ -28,7 +28,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["BillingAccount"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["BillingAccount"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -42,7 +42,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Billin errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["BillingAccount"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["BillingAccount"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -54,8 +54,8 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[lis def sync_detailed( *, client: Client, - include_archived: Unset | bool = False, -) -> Response[list["BillingAccount"]]: + include_archived: Union[Unset, bool] = False, +) -> Response[List["BillingAccount"]]: """List billing accounts Gets a list of billing accounts the current user has access to @@ -87,8 +87,8 @@ def sync_detailed( def sync( *, client: Client, - include_archived: Unset | bool = False, -) -> list["BillingAccount"] | None: + include_archived: Union[Unset, bool] = False, +) -> Optional[List["BillingAccount"]]: """List billing accounts Gets a list of billing accounts the current user has access to @@ -117,8 +117,8 @@ def sync( async def asyncio_detailed( *, client: Client, - include_archived: Unset | bool = False, -) -> Response[list["BillingAccount"]]: + include_archived: Union[Unset, bool] = False, +) -> Response[List["BillingAccount"]]: """List billing accounts Gets a list of billing accounts the current user has access to @@ -147,8 +147,8 @@ async def asyncio_detailed( async def asyncio( *, client: Client, - include_archived: Unset | bool = False, -) -> list["BillingAccount"] | None: + include_archived: Union[Unset, bool] = False, +) -> Optional[List["BillingAccount"]]: """List billing accounts Gets a list of billing accounts the current user has access to diff --git a/cirro_api_client/v1/api/billing/update_billing_account.py b/cirro_api_client/v1/api/billing/update_billing_account.py index 140894a..34a840b 100644 --- a/cirro_api_client/v1/api/billing/update_billing_account.py +++ b/cirro_api_client/v1/api/billing/update_billing_account.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( billing_account_id: str, *, body: BillingAccountRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/billing/{billing_account_id}", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/compute_environment/create_agent.py b/cirro_api_client/v1/api/compute_environment/create_agent.py index d7e350a..d5e2bb4 100644 --- a/cirro_api_client/v1/api/compute_environment/create_agent.py +++ b/cirro_api_client/v1/api/compute_environment/create_agent.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: AgentInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/agents", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: AgentInput, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create agent Create a new agent @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: AgentInput, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create agent Create a new agent diff --git a/cirro_api_client/v1/api/compute_environment/create_compute_environment.py b/cirro_api_client/v1/api/compute_environment/create_compute_environment.py index b7e86bf..b9f4451 100644 --- a/cirro_api_client/v1/api/compute_environment/create_compute_environment.py +++ b/cirro_api_client/v1/api/compute_environment/create_compute_environment.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: ComputeEnvironmentConfigurationInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/compute-environments", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ComputeEnvironmentConfigurationInput, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create compute environment Create a new compute environment for a project @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ComputeEnvironmentConfigurationInput, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create compute environment Create a new compute environment for a project diff --git a/cirro_api_client/v1/api/compute_environment/delete_agent.py b/cirro_api_client/v1/api/compute_environment/delete_agent.py index f76371a..585ccdb 100644 --- a/cirro_api_client/v1/api/compute_environment/delete_agent.py +++ b/cirro_api_client/v1/api/compute_environment/delete_agent.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -10,8 +10,8 @@ def _get_kwargs( agent_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/agents/{agent_id}", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/compute_environment/delete_compute_environment.py b/cirro_api_client/v1/api/compute_environment/delete_compute_environment.py index e615650..5b61b09 100644 --- a/cirro_api_client/v1/api/compute_environment/delete_compute_environment.py +++ b/cirro_api_client/v1/api/compute_environment/delete_compute_environment.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, compute_environment_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/projects/{project_id}/compute-environments/{compute_environment_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/compute_environment/get_agents.py b/cirro_api_client/v1/api/compute_environment/get_agents.py index c5ab6f4..5aedf87 100644 --- a/cirro_api_client/v1/api/compute_environment/get_agents.py +++ b/cirro_api_client/v1/api/compute_environment/get_agents.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { +def _get_kwargs() -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": "/agents", } @@ -18,7 +18,7 @@ def _get_kwargs() -> dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["AgentDetail"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["AgentDetail"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["AgentD errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["AgentDetail"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["AgentDetail"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[lis def sync_detailed( *, client: Client, -) -> Response[list["AgentDetail"]]: +) -> Response[List["AgentDetail"]]: """Get agents Get a list of agents @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> list["AgentDetail"] | None: +) -> Optional[List["AgentDetail"]]: """Get agents Get a list of agents @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[list["AgentDetail"]]: +) -> Response[List["AgentDetail"]]: """Get agents Get a list of agents @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> list["AgentDetail"] | None: +) -> Optional[List["AgentDetail"]]: """Get agents Get a list of agents diff --git a/cirro_api_client/v1/api/compute_environment/get_compute_environments.py b/cirro_api_client/v1/api/compute_environment/get_compute_environments.py index 699aae3..4d33476 100644 --- a/cirro_api_client/v1/api/compute_environment/get_compute_environments.py +++ b/cirro_api_client/v1/api/compute_environment/get_compute_environments.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/compute-environments", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["ComputeEnvironmentConfiguration"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ComputeEnvironmentConfiguration"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -34,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Comput errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["ComputeEnvironmentConfiguration"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ComputeEnvironmentConfiguration"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +47,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[list["ComputeEnvironmentConfiguration"]]: +) -> Response[List["ComputeEnvironmentConfiguration"]]: """Get compute environments Get a list of compute environments for a project @@ -80,7 +80,7 @@ def sync( project_id: str, *, client: Client, -) -> list["ComputeEnvironmentConfiguration"] | None: +) -> Optional[List["ComputeEnvironmentConfiguration"]]: """Get compute environments Get a list of compute environments for a project @@ -110,7 +110,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[list["ComputeEnvironmentConfiguration"]]: +) -> Response[List["ComputeEnvironmentConfiguration"]]: """Get compute environments Get a list of compute environments for a project @@ -140,7 +140,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> list["ComputeEnvironmentConfiguration"] | None: +) -> Optional[List["ComputeEnvironmentConfiguration"]]: """Get compute environments Get a list of compute environments for a project diff --git a/cirro_api_client/v1/api/compute_environment/update_agent.py b/cirro_api_client/v1/api/compute_environment/update_agent.py index 17deae5..d62743c 100644 --- a/cirro_api_client/v1/api/compute_environment/update_agent.py +++ b/cirro_api_client/v1/api/compute_environment/update_agent.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( agent_id: str, *, body: AgentInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/agents/{agent_id}", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/compute_environment/update_compute_environment.py b/cirro_api_client/v1/api/compute_environment/update_compute_environment.py index 6945c0f..bf3210d 100644 --- a/cirro_api_client/v1/api/compute_environment/update_compute_environment.py +++ b/cirro_api_client/v1/api/compute_environment/update_compute_environment.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( compute_environment_id: str, *, body: ComputeEnvironmentConfigurationInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/compute-environments/{compute_environment_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/dashboards/create_dashboard.py b/cirro_api_client/v1/api/dashboards/create_dashboard.py index 44df1dd..ac8cf16 100644 --- a/cirro_api_client/v1/api/dashboards/create_dashboard.py +++ b/cirro_api_client/v1/api/dashboards/create_dashboard.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: DashboardRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/dashboards", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: DashboardRequest, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create dashboard Creates a dashboard @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: DashboardRequest, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create dashboard Creates a dashboard diff --git a/cirro_api_client/v1/api/dashboards/delete_dashboard.py b/cirro_api_client/v1/api/dashboards/delete_dashboard.py index c4ed80d..d3bd31a 100644 --- a/cirro_api_client/v1/api/dashboards/delete_dashboard.py +++ b/cirro_api_client/v1/api/dashboards/delete_dashboard.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, dashboard_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/projects/{project_id}/dashboards/{dashboard_id}", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Dashboard | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Dashboard]: if response.status_code == HTTPStatus.NO_CONTENT: response_204 = Dashboard.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( dashboard_id: str, *, client: Client, -) -> Dashboard | None: +) -> Optional[Dashboard]: """Delete dashboard Deletes a dashboard @@ -146,7 +146,7 @@ async def asyncio( dashboard_id: str, *, client: Client, -) -> Dashboard | None: +) -> Optional[Dashboard]: """Delete dashboard Deletes a dashboard diff --git a/cirro_api_client/v1/api/dashboards/get_dashboard.py b/cirro_api_client/v1/api/dashboards/get_dashboard.py index aadedf0..5a8a586 100644 --- a/cirro_api_client/v1/api/dashboards/get_dashboard.py +++ b/cirro_api_client/v1/api/dashboards/get_dashboard.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, dashboard_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/dashboards/{dashboard_id}", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Dashboard | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Dashboard]: if response.status_code == HTTPStatus.OK: response_200 = Dashboard.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( dashboard_id: str, *, client: Client, -) -> Dashboard | None: +) -> Optional[Dashboard]: """Get dashboard Retrieves a dashboard @@ -146,7 +146,7 @@ async def asyncio( dashboard_id: str, *, client: Client, -) -> Dashboard | None: +) -> Optional[Dashboard]: """Get dashboard Retrieves a dashboard diff --git a/cirro_api_client/v1/api/dashboards/get_dashboards.py b/cirro_api_client/v1/api/dashboards/get_dashboards.py index cb76e59..c01b7a5 100644 --- a/cirro_api_client/v1/api/dashboards/get_dashboards.py +++ b/cirro_api_client/v1/api/dashboards/get_dashboards.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/dashboards", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["Dashboard"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Dashboard"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -34,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Dashbo errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Dashboard"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Dashboard"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +47,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[list["Dashboard"]]: +) -> Response[List["Dashboard"]]: """List dashboards Retrieves a list of dashboards for a given project @@ -80,7 +80,7 @@ def sync( project_id: str, *, client: Client, -) -> list["Dashboard"] | None: +) -> Optional[List["Dashboard"]]: """List dashboards Retrieves a list of dashboards for a given project @@ -110,7 +110,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[list["Dashboard"]]: +) -> Response[List["Dashboard"]]: """List dashboards Retrieves a list of dashboards for a given project @@ -140,7 +140,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> list["Dashboard"] | None: +) -> Optional[List["Dashboard"]]: """List dashboards Retrieves a list of dashboards for a given project diff --git a/cirro_api_client/v1/api/dashboards/update_dashboard.py b/cirro_api_client/v1/api/dashboards/update_dashboard.py index d39c118..08980c9 100644 --- a/cirro_api_client/v1/api/dashboards/update_dashboard.py +++ b/cirro_api_client/v1/api/dashboards/update_dashboard.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -15,10 +15,10 @@ def _get_kwargs( dashboard_id: str, *, body: DashboardRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/dashboards/{dashboard_id}", } @@ -32,7 +32,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Dashboard | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Dashboard]: if response.status_code == HTTPStatus.OK: response_200 = Dashboard.from_dict(response.json()) @@ -95,7 +95,7 @@ def sync( *, client: Client, body: DashboardRequest, -) -> Dashboard | None: +) -> Optional[Dashboard]: """Update dashboard Updates a dashboard @@ -167,7 +167,7 @@ async def asyncio( *, client: Client, body: DashboardRequest, -) -> Dashboard | None: +) -> Optional[Dashboard]: """Update dashboard Updates a dashboard diff --git a/cirro_api_client/v1/api/datasets/delete_dataset.py b/cirro_api_client/v1/api/datasets/delete_dataset.py index 96ec8fd..3e2db39 100644 --- a/cirro_api_client/v1/api/datasets/delete_dataset.py +++ b/cirro_api_client/v1/api/datasets/delete_dataset.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/projects/{project_id}/datasets/{dataset_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/datasets/get_dataset.py b/cirro_api_client/v1/api/datasets/get_dataset.py index c516db9..8b23540 100644 --- a/cirro_api_client/v1/api/datasets/get_dataset.py +++ b/cirro_api_client/v1/api/datasets/get_dataset.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/datasets/{dataset_id}", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> DatasetDetail | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[DatasetDetail]: if response.status_code == HTTPStatus.OK: response_200 = DatasetDetail.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( dataset_id: str, *, client: Client, -) -> DatasetDetail | None: +) -> Optional[DatasetDetail]: """Get dataset Gets detailed information about a dataset @@ -146,7 +146,7 @@ async def asyncio( dataset_id: str, *, client: Client, -) -> DatasetDetail | None: +) -> Optional[DatasetDetail]: """Get dataset Gets detailed information about a dataset diff --git a/cirro_api_client/v1/api/datasets/get_dataset_manifest.py b/cirro_api_client/v1/api/datasets/get_dataset_manifest.py index 1176b40..9594286 100644 --- a/cirro_api_client/v1/api/datasets/get_dataset_manifest.py +++ b/cirro_api_client/v1/api/datasets/get_dataset_manifest.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional, Union import httpx @@ -13,10 +13,10 @@ def _get_kwargs( project_id: str, dataset_id: str, *, - file_offset: Unset | int = 0, - file_limit: Unset | int = 20000, -) -> dict[str, Any]: - params: dict[str, Any] = {} + file_offset: Union[Unset, int] = 0, + file_limit: Union[Unset, int] = 20000, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} params["fileOffset"] = file_offset @@ -24,7 +24,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/datasets/{dataset_id}/files", "params": params, @@ -33,7 +33,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> DatasetAssetsManifest | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[DatasetAssetsManifest]: if response.status_code == HTTPStatus.OK: response_200 = DatasetAssetsManifest.from_dict(response.json()) @@ -56,8 +56,8 @@ def sync_detailed( dataset_id: str, *, client: Client, - file_offset: Unset | int = 0, - file_limit: Unset | int = 20000, + file_offset: Union[Unset, int] = 0, + file_limit: Union[Unset, int] = 20000, ) -> Response[DatasetAssetsManifest]: """Get dataset manifest @@ -98,9 +98,9 @@ def sync( dataset_id: str, *, client: Client, - file_offset: Unset | int = 0, - file_limit: Unset | int = 20000, -) -> DatasetAssetsManifest | None: + file_offset: Union[Unset, int] = 0, + file_limit: Union[Unset, int] = 20000, +) -> Optional[DatasetAssetsManifest]: """Get dataset manifest Gets a listing of files, charts, and other assets available for the dataset @@ -137,8 +137,8 @@ async def asyncio_detailed( dataset_id: str, *, client: Client, - file_offset: Unset | int = 0, - file_limit: Unset | int = 20000, + file_offset: Union[Unset, int] = 0, + file_limit: Union[Unset, int] = 20000, ) -> Response[DatasetAssetsManifest]: """Get dataset manifest @@ -176,9 +176,9 @@ async def asyncio( dataset_id: str, *, client: Client, - file_offset: Unset | int = 0, - file_limit: Unset | int = 20000, -) -> DatasetAssetsManifest | None: + file_offset: Union[Unset, int] = 0, + file_limit: Union[Unset, int] = 20000, +) -> Optional[DatasetAssetsManifest]: """Get dataset manifest Gets a listing of files, charts, and other assets available for the dataset diff --git a/cirro_api_client/v1/api/datasets/get_datasets.py b/cirro_api_client/v1/api/datasets/get_datasets.py index 14c413e..ebd90a5 100644 --- a/cirro_api_client/v1/api/datasets/get_datasets.py +++ b/cirro_api_client/v1/api/datasets/get_datasets.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional, Union import httpx @@ -12,10 +12,10 @@ def _get_kwargs( project_id: str, *, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} params["limit"] = limit @@ -23,7 +23,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/datasets", "params": params, @@ -32,7 +32,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseDatasetListDto | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseDatasetListDto]: if response.status_code == HTTPStatus.OK: response_200 = PaginatedResponseDatasetListDto.from_dict(response.json()) @@ -54,8 +54,8 @@ def sync_detailed( project_id: str, *, client: Client, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, ) -> Response[PaginatedResponseDatasetListDto]: """List datasets @@ -93,9 +93,9 @@ def sync( project_id: str, *, client: Client, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, -) -> PaginatedResponseDatasetListDto | None: + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, +) -> Optional[PaginatedResponseDatasetListDto]: """List datasets Retrieves a list of datasets for a given project @@ -129,8 +129,8 @@ async def asyncio_detailed( project_id: str, *, client: Client, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, ) -> Response[PaginatedResponseDatasetListDto]: """List datasets @@ -165,9 +165,9 @@ async def asyncio( project_id: str, *, client: Client, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, -) -> PaginatedResponseDatasetListDto | None: + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, +) -> Optional[PaginatedResponseDatasetListDto]: """List datasets Retrieves a list of datasets for a given project diff --git a/cirro_api_client/v1/api/datasets/get_sample_sheets.py b/cirro_api_client/v1/api/datasets/get_sample_sheets.py index e230560..db26635 100644 --- a/cirro_api_client/v1/api/datasets/get_sample_sheets.py +++ b/cirro_api_client/v1/api/datasets/get_sample_sheets.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/datasets/{dataset_id}/samplesheet", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> SampleSheets | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[SampleSheets]: if response.status_code == HTTPStatus.OK: response_200 = SampleSheets.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( dataset_id: str, *, client: Client, -) -> SampleSheets | None: +) -> Optional[SampleSheets]: """Generate sample sheets Generates the sample sheet output for this dataset, useful for debugging the preprocess script. @@ -146,7 +146,7 @@ async def asyncio( dataset_id: str, *, client: Client, -) -> SampleSheets | None: +) -> Optional[SampleSheets]: """Generate sample sheets Generates the sample sheet output for this dataset, useful for debugging the preprocess script. diff --git a/cirro_api_client/v1/api/datasets/import_public_dataset.py b/cirro_api_client/v1/api/datasets/import_public_dataset.py index 87e2051..0807c70 100644 --- a/cirro_api_client/v1/api/datasets/import_public_dataset.py +++ b/cirro_api_client/v1/api/datasets/import_public_dataset.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: ImportDataRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/datasets/import", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ImportDataRequest, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Import public dataset Download data from public repositories @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ImportDataRequest, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Import public dataset Download data from public repositories diff --git a/cirro_api_client/v1/api/datasets/ingest_samples.py b/cirro_api_client/v1/api/datasets/ingest_samples.py index c100931..69ccb84 100644 --- a/cirro_api_client/v1/api/datasets/ingest_samples.py +++ b/cirro_api_client/v1/api/datasets/ingest_samples.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/datasets/{dataset_id}/ingest-samples", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/datasets/regenerate_manifest.py b/cirro_api_client/v1/api/datasets/regenerate_manifest.py index ff4980e..04ef172 100644 --- a/cirro_api_client/v1/api/datasets/regenerate_manifest.py +++ b/cirro_api_client/v1/api/datasets/regenerate_manifest.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/datasets/{dataset_id}/regenerate-manifest", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/datasets/rerun_transform.py b/cirro_api_client/v1/api/datasets/rerun_transform.py index db88d8d..a86bbec 100644 --- a/cirro_api_client/v1/api/datasets/rerun_transform.py +++ b/cirro_api_client/v1/api/datasets/rerun_transform.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/datasets/{dataset_id}/rerun-transform", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/datasets/update_dataset.py b/cirro_api_client/v1/api/datasets/update_dataset.py index 7aa2ccd..7417218 100644 --- a/cirro_api_client/v1/api/datasets/update_dataset.py +++ b/cirro_api_client/v1/api/datasets/update_dataset.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -15,10 +15,10 @@ def _get_kwargs( dataset_id: str, *, body: UpdateDatasetRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/datasets/{dataset_id}", } @@ -32,7 +32,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> DatasetDetail | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[DatasetDetail]: if response.status_code == HTTPStatus.OK: response_200 = DatasetDetail.from_dict(response.json()) @@ -95,7 +95,7 @@ def sync( *, client: Client, body: UpdateDatasetRequest, -) -> DatasetDetail | None: +) -> Optional[DatasetDetail]: """Update dataset Update info on a dataset @@ -167,7 +167,7 @@ async def asyncio( *, client: Client, body: UpdateDatasetRequest, -) -> DatasetDetail | None: +) -> Optional[DatasetDetail]: """Update dataset Update info on a dataset diff --git a/cirro_api_client/v1/api/datasets/upload_dataset.py b/cirro_api_client/v1/api/datasets/upload_dataset.py index eda663c..c25e884 100644 --- a/cirro_api_client/v1/api/datasets/upload_dataset.py +++ b/cirro_api_client/v1/api/datasets/upload_dataset.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: UploadDatasetRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/datasets/upload", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> UploadDatasetCreateResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[UploadDatasetCreateResponse]: if response.status_code == HTTPStatus.CREATED: response_201 = UploadDatasetCreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: UploadDatasetRequest, -) -> UploadDatasetCreateResponse | None: +) -> Optional[UploadDatasetCreateResponse]: """Upload private dataset Registers a dataset in the system that you upload files into @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: UploadDatasetRequest, -) -> UploadDatasetCreateResponse | None: +) -> Optional[UploadDatasetCreateResponse]: """Upload private dataset Registers a dataset in the system that you upload files into diff --git a/cirro_api_client/v1/api/execution/calculate_cost.py b/cirro_api_client/v1/api/execution/calculate_cost.py index e50274d..f5baf82 100644 --- a/cirro_api_client/v1/api/execution/calculate_cost.py +++ b/cirro_api_client/v1/api/execution/calculate_cost.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/execution/{dataset_id}/cost", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> CostResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CostResponse]: if response.status_code == HTTPStatus.OK: response_200 = CostResponse.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( dataset_id: str, *, client: Client, -) -> CostResponse | None: +) -> Optional[CostResponse]: """Calculate cost Calculate cost of an execution run @@ -146,7 +146,7 @@ async def asyncio( dataset_id: str, *, client: Client, -) -> CostResponse | None: +) -> Optional[CostResponse]: """Calculate cost Calculate cost of an execution run diff --git a/cirro_api_client/v1/api/execution/get_execution_logs.py b/cirro_api_client/v1/api/execution/get_execution_logs.py index 40087f0..c282af8 100644 --- a/cirro_api_client/v1/api/execution/get_execution_logs.py +++ b/cirro_api_client/v1/api/execution/get_execution_logs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional, Union import httpx @@ -13,15 +13,15 @@ def _get_kwargs( project_id: str, dataset_id: str, *, - force_live: Unset | bool = False, -) -> dict[str, Any]: - params: dict[str, Any] = {} + force_live: Union[Unset, bool] = False, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} params["forceLive"] = force_live params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/execution/{dataset_id}/logs", "params": params, @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> GetExecutionLogsResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GetExecutionLogsResponse]: if response.status_code == HTTPStatus.OK: response_200 = GetExecutionLogsResponse.from_dict(response.json()) @@ -53,7 +53,7 @@ def sync_detailed( dataset_id: str, *, client: Client, - force_live: Unset | bool = False, + force_live: Union[Unset, bool] = False, ) -> Response[GetExecutionLogsResponse]: """Get execution logs @@ -92,8 +92,8 @@ def sync( dataset_id: str, *, client: Client, - force_live: Unset | bool = False, -) -> GetExecutionLogsResponse | None: + force_live: Union[Unset, bool] = False, +) -> Optional[GetExecutionLogsResponse]: """Get execution logs Gets live logs from main execution task @@ -128,7 +128,7 @@ async def asyncio_detailed( dataset_id: str, *, client: Client, - force_live: Unset | bool = False, + force_live: Union[Unset, bool] = False, ) -> Response[GetExecutionLogsResponse]: """Get execution logs @@ -164,8 +164,8 @@ async def asyncio( dataset_id: str, *, client: Client, - force_live: Unset | bool = False, -) -> GetExecutionLogsResponse | None: + force_live: Union[Unset, bool] = False, +) -> Optional[GetExecutionLogsResponse]: """Get execution logs Gets live logs from main execution task diff --git a/cirro_api_client/v1/api/execution/get_project_summary.py b/cirro_api_client/v1/api/execution/get_project_summary.py index df47aff..10af0aa 100644 --- a/cirro_api_client/v1/api/execution/get_project_summary.py +++ b/cirro_api_client/v1/api/execution/get_project_summary.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional, Union import httpx @@ -12,15 +12,15 @@ def _get_kwargs( project_id: str, *, - number_of_days: Unset | int = 1, -) -> dict[str, Any]: - params: dict[str, Any] = {} + number_of_days: Union[Unset, int] = 1, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} params["numberOfDays"] = number_of_days params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/execution", "params": params, @@ -29,7 +29,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> GetProjectSummaryResponse200 | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GetProjectSummaryResponse200]: if response.status_code == HTTPStatus.OK: response_200 = GetProjectSummaryResponse200.from_dict(response.json()) @@ -51,7 +51,7 @@ def sync_detailed( project_id: str, *, client: Client, - number_of_days: Unset | int = 1, + number_of_days: Union[Unset, int] = 1, ) -> Response[GetProjectSummaryResponse200]: """Get execution summary @@ -87,8 +87,8 @@ def sync( project_id: str, *, client: Client, - number_of_days: Unset | int = 1, -) -> GetProjectSummaryResponse200 | None: + number_of_days: Union[Unset, int] = 1, +) -> Optional[GetProjectSummaryResponse200]: """Get execution summary Gets an overview of the executions currently running in the project @@ -120,7 +120,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, - number_of_days: Unset | int = 1, + number_of_days: Union[Unset, int] = 1, ) -> Response[GetProjectSummaryResponse200]: """Get execution summary @@ -153,8 +153,8 @@ async def asyncio( project_id: str, *, client: Client, - number_of_days: Unset | int = 1, -) -> GetProjectSummaryResponse200 | None: + number_of_days: Union[Unset, int] = 1, +) -> Optional[GetProjectSummaryResponse200]: """Get execution summary Gets an overview of the executions currently running in the project diff --git a/cirro_api_client/v1/api/execution/get_task_logs.py b/cirro_api_client/v1/api/execution/get_task_logs.py index 40693d5..802352f 100644 --- a/cirro_api_client/v1/api/execution/get_task_logs.py +++ b/cirro_api_client/v1/api/execution/get_task_logs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional, Union import httpx @@ -14,15 +14,15 @@ def _get_kwargs( dataset_id: str, task_id: str, *, - force_live: Unset | bool = False, -) -> dict[str, Any]: - params: dict[str, Any] = {} + force_live: Union[Unset, bool] = False, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} params["forceLive"] = force_live params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/execution/{dataset_id}/tasks/{task_id}/logs", "params": params, @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> GetExecutionLogsResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GetExecutionLogsResponse]: if response.status_code == HTTPStatus.OK: response_200 = GetExecutionLogsResponse.from_dict(response.json()) @@ -55,7 +55,7 @@ def sync_detailed( task_id: str, *, client: Client, - force_live: Unset | bool = False, + force_live: Union[Unset, bool] = False, ) -> Response[GetExecutionLogsResponse]: """Get task logs @@ -97,8 +97,8 @@ def sync( task_id: str, *, client: Client, - force_live: Unset | bool = False, -) -> GetExecutionLogsResponse | None: + force_live: Union[Unset, bool] = False, +) -> Optional[GetExecutionLogsResponse]: """Get task logs Gets the log output from an individual task @@ -136,7 +136,7 @@ async def asyncio_detailed( task_id: str, *, client: Client, - force_live: Unset | bool = False, + force_live: Union[Unset, bool] = False, ) -> Response[GetExecutionLogsResponse]: """Get task logs @@ -175,8 +175,8 @@ async def asyncio( task_id: str, *, client: Client, - force_live: Unset | bool = False, -) -> GetExecutionLogsResponse | None: + force_live: Union[Unset, bool] = False, +) -> Optional[GetExecutionLogsResponse]: """Get task logs Gets the log output from an individual task diff --git a/cirro_api_client/v1/api/execution/get_tasks_for_execution.py b/cirro_api_client/v1/api/execution/get_tasks_for_execution.py index c5fd5ac..7f07821 100644 --- a/cirro_api_client/v1/api/execution/get_tasks_for_execution.py +++ b/cirro_api_client/v1/api/execution/get_tasks_for_execution.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional, Union import httpx @@ -13,15 +13,15 @@ def _get_kwargs( project_id: str, dataset_id: str, *, - force_live: Unset | bool = False, -) -> dict[str, Any]: - params: dict[str, Any] = {} + force_live: Union[Unset, bool] = False, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} params["forceLive"] = force_live params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/execution/{dataset_id}/tasks", "params": params, @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["Task"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Task"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -44,7 +44,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Task"] errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Task"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Task"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -58,8 +58,8 @@ def sync_detailed( dataset_id: str, *, client: Client, - force_live: Unset | bool = False, -) -> Response[list["Task"]]: + force_live: Union[Unset, bool] = False, +) -> Response[List["Task"]]: """Get execution tasks Gets the tasks submitted by the workflow execution @@ -97,8 +97,8 @@ def sync( dataset_id: str, *, client: Client, - force_live: Unset | bool = False, -) -> list["Task"] | None: + force_live: Union[Unset, bool] = False, +) -> Optional[List["Task"]]: """Get execution tasks Gets the tasks submitted by the workflow execution @@ -133,8 +133,8 @@ async def asyncio_detailed( dataset_id: str, *, client: Client, - force_live: Unset | bool = False, -) -> Response[list["Task"]]: + force_live: Union[Unset, bool] = False, +) -> Response[List["Task"]]: """Get execution tasks Gets the tasks submitted by the workflow execution @@ -169,8 +169,8 @@ async def asyncio( dataset_id: str, *, client: Client, - force_live: Unset | bool = False, -) -> list["Task"] | None: + force_live: Union[Unset, bool] = False, +) -> Optional[List["Task"]]: """Get execution tasks Gets the tasks submitted by the workflow execution diff --git a/cirro_api_client/v1/api/execution/run_analysis.py b/cirro_api_client/v1/api/execution/run_analysis.py index 7fbf2a1..d0f7fd6 100644 --- a/cirro_api_client/v1/api/execution/run_analysis.py +++ b/cirro_api_client/v1/api/execution/run_analysis.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: RunAnalysisRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/execution", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: if response.status_code == HTTPStatus.OK: response_200 = CreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: RunAnalysisRequest, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Run analysis Run analysis @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: RunAnalysisRequest, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Run analysis Run analysis diff --git a/cirro_api_client/v1/api/execution/stop_analysis.py b/cirro_api_client/v1/api/execution/stop_analysis.py index 3c583a7..56542b7 100644 --- a/cirro_api_client/v1/api/execution/stop_analysis.py +++ b/cirro_api_client/v1/api/execution/stop_analysis.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/execution/{dataset_id}/stop", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> StopExecutionResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[StopExecutionResponse]: if response.status_code == HTTPStatus.OK: response_200 = StopExecutionResponse.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( dataset_id: str, *, client: Client, -) -> StopExecutionResponse | None: +) -> Optional[StopExecutionResponse]: """Stop execution Terminates all analysis jobs related to this execution @@ -146,7 +146,7 @@ async def asyncio( dataset_id: str, *, client: Client, -) -> StopExecutionResponse | None: +) -> Optional[StopExecutionResponse]: """Stop execution Terminates all analysis jobs related to this execution diff --git a/cirro_api_client/v1/api/feed/create_discussion.py b/cirro_api_client/v1/api/feed/create_discussion.py index c38a20a..bfd2df6 100644 --- a/cirro_api_client/v1/api/feed/create_discussion.py +++ b/cirro_api_client/v1/api/feed/create_discussion.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: DiscussionInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/discussions", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Discussion | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Discussion]: if response.status_code == HTTPStatus.OK: response_200 = Discussion.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: DiscussionInput, -) -> Discussion | None: +) -> Optional[Discussion]: """Create a discussion Creates a new discussion for an entity @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: DiscussionInput, -) -> Discussion | None: +) -> Optional[Discussion]: """Create a discussion Creates a new discussion for an entity diff --git a/cirro_api_client/v1/api/feed/delete_discussion.py b/cirro_api_client/v1/api/feed/delete_discussion.py index 3584fd9..3d05435 100644 --- a/cirro_api_client/v1/api/feed/delete_discussion.py +++ b/cirro_api_client/v1/api/feed/delete_discussion.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -10,8 +10,8 @@ def _get_kwargs( discussion_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/discussions/{discussion_id}", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/feed/delete_message.py b/cirro_api_client/v1/api/feed/delete_message.py index 10bcd5a..43b9111 100644 --- a/cirro_api_client/v1/api/feed/delete_message.py +++ b/cirro_api_client/v1/api/feed/delete_message.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( discussion_id: str, message_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/discussions/{discussion_id}/messages/{message_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/feed/get_discussion.py b/cirro_api_client/v1/api/feed/get_discussion.py index ece2153..b88f956 100644 --- a/cirro_api_client/v1/api/feed/get_discussion.py +++ b/cirro_api_client/v1/api/feed/get_discussion.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( discussion_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/discussions/{discussion_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Discussion | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Discussion]: if response.status_code == HTTPStatus.OK: response_200 = Discussion.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( discussion_id: str, *, client: Client, -) -> Discussion | None: +) -> Optional[Discussion]: """Get a discussion Retrieves a discussion by its ID @@ -135,7 +135,7 @@ async def asyncio( discussion_id: str, *, client: Client, -) -> Discussion | None: +) -> Optional[Discussion]: """Get a discussion Retrieves a discussion by its ID diff --git a/cirro_api_client/v1/api/feed/get_discussions_for_entity.py b/cirro_api_client/v1/api/feed/get_discussions_for_entity.py index 1a4e7f0..f38afa5 100644 --- a/cirro_api_client/v1/api/feed/get_discussions_for_entity.py +++ b/cirro_api_client/v1/api/feed/get_discussions_for_entity.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional, Union import httpx @@ -15,18 +15,18 @@ def _get_kwargs( *, entity_type: EntityType, entity_id: str, - next_token: None | Unset | str = UNSET, - limit: Unset | int = 5000, - order: None | SortOrder | Unset = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} + next_token: Union[None, Unset, str] = UNSET, + limit: Union[Unset, int] = 5000, + order: Union[None, SortOrder, Unset] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} json_entity_type = entity_type.value params["entityType"] = json_entity_type params["entityId"] = entity_id - json_next_token: None | Unset | str + json_next_token: Union[None, Unset, str] if isinstance(next_token, Unset): json_next_token = UNSET else: @@ -35,7 +35,7 @@ def _get_kwargs( params["limit"] = limit - json_order: None | Unset | str + json_order: Union[None, Unset, str] if isinstance(order, Unset): json_order = UNSET elif isinstance(order, SortOrder): @@ -46,7 +46,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/discussions", "params": params, @@ -55,7 +55,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseDiscussion | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseDiscussion]: if response.status_code == HTTPStatus.OK: response_200 = PaginatedResponseDiscussion.from_dict(response.json()) @@ -78,9 +78,9 @@ def sync_detailed( client: Client, entity_type: EntityType, entity_id: str, - next_token: None | Unset | str = UNSET, - limit: Unset | int = 5000, - order: None | SortOrder | Unset = UNSET, + next_token: Union[None, Unset, str] = UNSET, + limit: Union[Unset, int] = 5000, + order: Union[None, SortOrder, Unset] = UNSET, ) -> Response[PaginatedResponseDiscussion]: """Get discussions for an entity @@ -123,10 +123,10 @@ def sync( client: Client, entity_type: EntityType, entity_id: str, - next_token: None | Unset | str = UNSET, - limit: Unset | int = 5000, - order: None | SortOrder | Unset = UNSET, -) -> PaginatedResponseDiscussion | None: + next_token: Union[None, Unset, str] = UNSET, + limit: Union[Unset, int] = 5000, + order: Union[None, SortOrder, Unset] = UNSET, +) -> Optional[PaginatedResponseDiscussion]: """Get discussions for an entity Retrieves a paginated list of discussions for a specific entity type and ID @@ -165,9 +165,9 @@ async def asyncio_detailed( client: Client, entity_type: EntityType, entity_id: str, - next_token: None | Unset | str = UNSET, - limit: Unset | int = 5000, - order: None | SortOrder | Unset = UNSET, + next_token: Union[None, Unset, str] = UNSET, + limit: Union[Unset, int] = 5000, + order: Union[None, SortOrder, Unset] = UNSET, ) -> Response[PaginatedResponseDiscussion]: """Get discussions for an entity @@ -207,10 +207,10 @@ async def asyncio( client: Client, entity_type: EntityType, entity_id: str, - next_token: None | Unset | str = UNSET, - limit: Unset | int = 5000, - order: None | SortOrder | Unset = UNSET, -) -> PaginatedResponseDiscussion | None: + next_token: Union[None, Unset, str] = UNSET, + limit: Union[Unset, int] = 5000, + order: Union[None, SortOrder, Unset] = UNSET, +) -> Optional[PaginatedResponseDiscussion]: """Get discussions for an entity Retrieves a paginated list of discussions for a specific entity type and ID diff --git a/cirro_api_client/v1/api/feed/get_messages_for_discussion.py b/cirro_api_client/v1/api/feed/get_messages_for_discussion.py index b48c674..19be2ed 100644 --- a/cirro_api_client/v1/api/feed/get_messages_for_discussion.py +++ b/cirro_api_client/v1/api/feed/get_messages_for_discussion.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional, Union import httpx @@ -13,14 +13,14 @@ def _get_kwargs( discussion_id: str, *, - next_token: None | Unset | str = UNSET, - limit: Unset | int = 5000, - thread_id: None | Unset | str = UNSET, - order: None | SortOrder | Unset = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} - - json_next_token: None | Unset | str + next_token: Union[None, Unset, str] = UNSET, + limit: Union[Unset, int] = 5000, + thread_id: Union[None, Unset, str] = UNSET, + order: Union[None, SortOrder, Unset] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_next_token: Union[None, Unset, str] if isinstance(next_token, Unset): json_next_token = UNSET else: @@ -29,14 +29,14 @@ def _get_kwargs( params["limit"] = limit - json_thread_id: None | Unset | str + json_thread_id: Union[None, Unset, str] if isinstance(thread_id, Unset): json_thread_id = UNSET else: json_thread_id = thread_id params["threadId"] = json_thread_id - json_order: None | Unset | str + json_order: Union[None, Unset, str] if isinstance(order, Unset): json_order = UNSET elif isinstance(order, SortOrder): @@ -47,7 +47,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/discussions/{discussion_id}/messages", "params": params, @@ -56,7 +56,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseMessage | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseMessage]: if response.status_code == HTTPStatus.OK: response_200 = PaginatedResponseMessage.from_dict(response.json()) @@ -78,10 +78,10 @@ def sync_detailed( discussion_id: str, *, client: Client, - next_token: None | Unset | str = UNSET, - limit: Unset | int = 5000, - thread_id: None | Unset | str = UNSET, - order: None | SortOrder | Unset = UNSET, + next_token: Union[None, Unset, str] = UNSET, + limit: Union[Unset, int] = 5000, + thread_id: Union[None, Unset, str] = UNSET, + order: Union[None, SortOrder, Unset] = UNSET, ) -> Response[PaginatedResponseMessage]: """Get messages for a discussion @@ -123,11 +123,11 @@ def sync( discussion_id: str, *, client: Client, - next_token: None | Unset | str = UNSET, - limit: Unset | int = 5000, - thread_id: None | Unset | str = UNSET, - order: None | SortOrder | Unset = UNSET, -) -> PaginatedResponseMessage | None: + next_token: Union[None, Unset, str] = UNSET, + limit: Union[Unset, int] = 5000, + thread_id: Union[None, Unset, str] = UNSET, + order: Union[None, SortOrder, Unset] = UNSET, +) -> Optional[PaginatedResponseMessage]: """Get messages for a discussion Retrieves all messages associated with a specific discussion @@ -165,10 +165,10 @@ async def asyncio_detailed( discussion_id: str, *, client: Client, - next_token: None | Unset | str = UNSET, - limit: Unset | int = 5000, - thread_id: None | Unset | str = UNSET, - order: None | SortOrder | Unset = UNSET, + next_token: Union[None, Unset, str] = UNSET, + limit: Union[Unset, int] = 5000, + thread_id: Union[None, Unset, str] = UNSET, + order: Union[None, SortOrder, Unset] = UNSET, ) -> Response[PaginatedResponseMessage]: """Get messages for a discussion @@ -207,11 +207,11 @@ async def asyncio( discussion_id: str, *, client: Client, - next_token: None | Unset | str = UNSET, - limit: Unset | int = 5000, - thread_id: None | Unset | str = UNSET, - order: None | SortOrder | Unset = UNSET, -) -> PaginatedResponseMessage | None: + next_token: Union[None, Unset, str] = UNSET, + limit: Union[Unset, int] = 5000, + thread_id: Union[None, Unset, str] = UNSET, + order: Union[None, SortOrder, Unset] = UNSET, +) -> Optional[PaginatedResponseMessage]: """Get messages for a discussion Retrieves all messages associated with a specific discussion diff --git a/cirro_api_client/v1/api/feed/post_message.py b/cirro_api_client/v1/api/feed/post_message.py index 00019bd..a876441 100644 --- a/cirro_api_client/v1/api/feed/post_message.py +++ b/cirro_api_client/v1/api/feed/post_message.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( discussion_id: str, *, body: MessageInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/discussions/{discussion_id}/messages", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/feed/update_discussion.py b/cirro_api_client/v1/api/feed/update_discussion.py index be17b3f..b45f636 100644 --- a/cirro_api_client/v1/api/feed/update_discussion.py +++ b/cirro_api_client/v1/api/feed/update_discussion.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( discussion_id: str, *, body: DiscussionInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/discussions/{discussion_id}", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/feed/update_message.py b/cirro_api_client/v1/api/feed/update_message.py index 7df54ec..1553b47 100644 --- a/cirro_api_client/v1/api/feed/update_message.py +++ b/cirro_api_client/v1/api/feed/update_message.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( message_id: str, *, body: MessageInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/discussions/{discussion_id}/messages/{message_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/file/generate_governance_file_access_token.py b/cirro_api_client/v1/api/file/generate_governance_file_access_token.py index ae1f284..d639ff0 100644 --- a/cirro_api_client/v1/api/file/generate_governance_file_access_token.py +++ b/cirro_api_client/v1/api/file/generate_governance_file_access_token.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( requirement_id: str, *, body: GovernanceFileAccessRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/governance/requirements/{requirement_id}/s3-token", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> AWSCredentials | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[AWSCredentials]: if response.status_code == HTTPStatus.OK: response_200 = AWSCredentials.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: GovernanceFileAccessRequest, -) -> AWSCredentials | None: +) -> Optional[AWSCredentials]: """Create governance file access token Generates credentials used for connecting via S3 @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: GovernanceFileAccessRequest, -) -> AWSCredentials | None: +) -> Optional[AWSCredentials]: """Create governance file access token Generates credentials used for connecting via S3 diff --git a/cirro_api_client/v1/api/file/generate_project_file_access_token.py b/cirro_api_client/v1/api/file/generate_project_file_access_token.py index 0119815..3d6ecf9 100644 --- a/cirro_api_client/v1/api/file/generate_project_file_access_token.py +++ b/cirro_api_client/v1/api/file/generate_project_file_access_token.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: ProjectFileAccessRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/s3-token", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> AWSCredentials | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[AWSCredentials]: if response.status_code == HTTPStatus.OK: response_200 = AWSCredentials.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ProjectFileAccessRequest, -) -> AWSCredentials | None: +) -> Optional[AWSCredentials]: """Create project file access token Generates credentials used for connecting via S3 @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ProjectFileAccessRequest, -) -> AWSCredentials | None: +) -> Optional[AWSCredentials]: """Create project file access token Generates credentials used for connecting via S3 diff --git a/cirro_api_client/v1/api/file/generate_project_sftp_token.py b/cirro_api_client/v1/api/file/generate_project_sftp_token.py index 6dfac8d..6109aef 100644 --- a/cirro_api_client/v1/api/file/generate_project_sftp_token.py +++ b/cirro_api_client/v1/api/file/generate_project_sftp_token.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: GenerateSftpCredentialsRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/sftp-token", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> SftpCredentials | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[SftpCredentials]: if response.status_code == HTTPStatus.OK: response_200 = SftpCredentials.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: GenerateSftpCredentialsRequest, -) -> SftpCredentials | None: +) -> Optional[SftpCredentials]: """Create project SFTP Token Generates credentials used for connecting via SFTP @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: GenerateSftpCredentialsRequest, -) -> SftpCredentials | None: +) -> Optional[SftpCredentials]: """Create project SFTP Token Generates credentials used for connecting via SFTP diff --git a/cirro_api_client/v1/api/governance/create_classification.py b/cirro_api_client/v1/api/governance/create_classification.py index d36c2f3..4c76fb3 100644 --- a/cirro_api_client/v1/api/governance/create_classification.py +++ b/cirro_api_client/v1/api/governance/create_classification.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: ClassificationInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/governance/classifications", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceClassification | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceClassification]: if response.status_code == HTTPStatus.CREATED: response_201 = GovernanceClassification.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: ClassificationInput, -) -> GovernanceClassification | None: +) -> Optional[GovernanceClassification]: """Create classification Creates a classification @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: ClassificationInput, -) -> GovernanceClassification | None: +) -> Optional[GovernanceClassification]: """Create classification Creates a classification diff --git a/cirro_api_client/v1/api/governance/create_contact.py b/cirro_api_client/v1/api/governance/create_contact.py index d37ae6d..a0b2aa9 100644 --- a/cirro_api_client/v1/api/governance/create_contact.py +++ b/cirro_api_client/v1/api/governance/create_contact.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: ContactInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/governance/contacts", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceContact | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceContact]: if response.status_code == HTTPStatus.CREATED: response_201 = GovernanceContact.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: ContactInput, -) -> GovernanceContact | None: +) -> Optional[GovernanceContact]: """Create contact Creates a contact @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: ContactInput, -) -> GovernanceContact | None: +) -> Optional[GovernanceContact]: """Create contact Creates a contact diff --git a/cirro_api_client/v1/api/governance/create_requirement.py b/cirro_api_client/v1/api/governance/create_requirement.py index 4bbcb32..c70a7af 100644 --- a/cirro_api_client/v1/api/governance/create_requirement.py +++ b/cirro_api_client/v1/api/governance/create_requirement.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: RequirementInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/governance/requirements", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceRequirement | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceRequirement]: if response.status_code == HTTPStatus.CREATED: response_201 = GovernanceRequirement.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: RequirementInput, -) -> GovernanceRequirement | None: +) -> Optional[GovernanceRequirement]: """Create requirement Creates a requirement @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: RequirementInput, -) -> GovernanceRequirement | None: +) -> Optional[GovernanceRequirement]: """Create requirement Creates a requirement diff --git a/cirro_api_client/v1/api/governance/delete_classification.py b/cirro_api_client/v1/api/governance/delete_classification.py index 781d264..288a218 100644 --- a/cirro_api_client/v1/api/governance/delete_classification.py +++ b/cirro_api_client/v1/api/governance/delete_classification.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -10,8 +10,8 @@ def _get_kwargs( classification_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/governance/classifications/{classification_id}", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/governance/delete_contact.py b/cirro_api_client/v1/api/governance/delete_contact.py index b4701f1..1edbb37 100644 --- a/cirro_api_client/v1/api/governance/delete_contact.py +++ b/cirro_api_client/v1/api/governance/delete_contact.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -10,8 +10,8 @@ def _get_kwargs( contact_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/governance/contacts/{contact_id}", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/governance/delete_requirement.py b/cirro_api_client/v1/api/governance/delete_requirement.py index f581532..f9d607c 100644 --- a/cirro_api_client/v1/api/governance/delete_requirement.py +++ b/cirro_api_client/v1/api/governance/delete_requirement.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -10,8 +10,8 @@ def _get_kwargs( requirement_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/governance/requirements/{requirement_id}", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/governance/fulfill_requirement.py b/cirro_api_client/v1/api/governance/fulfill_requirement.py index 26d7f90..84b708e 100644 --- a/cirro_api_client/v1/api/governance/fulfill_requirement.py +++ b/cirro_api_client/v1/api/governance/fulfill_requirement.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -15,10 +15,10 @@ def _get_kwargs( requirement_id: str, *, body: RequirementFulfillmentInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/governance/projects/{project_id}/requirements/{requirement_id}:fulfill", } @@ -32,7 +32,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> FulfillmentResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[FulfillmentResponse]: if response.status_code == HTTPStatus.OK: response_200 = FulfillmentResponse.from_dict(response.json()) @@ -95,7 +95,7 @@ def sync( *, client: Client, body: RequirementFulfillmentInput, -) -> FulfillmentResponse | None: +) -> Optional[FulfillmentResponse]: """Fulfill a project's requirement Saves a record of the fulfillment of a governance requirement @@ -167,7 +167,7 @@ async def asyncio( *, client: Client, body: RequirementFulfillmentInput, -) -> FulfillmentResponse | None: +) -> Optional[FulfillmentResponse]: """Fulfill a project's requirement Saves a record of the fulfillment of a governance requirement diff --git a/cirro_api_client/v1/api/governance/get_classification.py b/cirro_api_client/v1/api/governance/get_classification.py index fbbb6ef..5a0ee2b 100644 --- a/cirro_api_client/v1/api/governance/get_classification.py +++ b/cirro_api_client/v1/api/governance/get_classification.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( classification_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/governance/classifications/{classification_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceClassification | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceClassification]: if response.status_code == HTTPStatus.OK: response_200 = GovernanceClassification.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( classification_id: str, *, client: Client, -) -> GovernanceClassification | None: +) -> Optional[GovernanceClassification]: """Get a classification Retrieve a data classification @@ -135,7 +135,7 @@ async def asyncio( classification_id: str, *, client: Client, -) -> GovernanceClassification | None: +) -> Optional[GovernanceClassification]: """Get a classification Retrieve a data classification diff --git a/cirro_api_client/v1/api/governance/get_classifications.py b/cirro_api_client/v1/api/governance/get_classifications.py index 4780625..4e1299b 100644 --- a/cirro_api_client/v1/api/governance/get_classifications.py +++ b/cirro_api_client/v1/api/governance/get_classifications.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { +def _get_kwargs() -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": "/governance/classifications", } @@ -18,7 +18,7 @@ def _get_kwargs() -> dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["GovernanceClassification"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["GovernanceClassification"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Govern errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["GovernanceClassification"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["GovernanceClassification"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[lis def sync_detailed( *, client: Client, -) -> Response[list["GovernanceClassification"]]: +) -> Response[List["GovernanceClassification"]]: """Get classifications Retrieve a list of data classifications @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> list["GovernanceClassification"] | None: +) -> Optional[List["GovernanceClassification"]]: """Get classifications Retrieve a list of data classifications @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[list["GovernanceClassification"]]: +) -> Response[List["GovernanceClassification"]]: """Get classifications Retrieve a list of data classifications @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> list["GovernanceClassification"] | None: +) -> Optional[List["GovernanceClassification"]]: """Get classifications Retrieve a list of data classifications diff --git a/cirro_api_client/v1/api/governance/get_contact.py b/cirro_api_client/v1/api/governance/get_contact.py index cda2005..fb1ed4a 100644 --- a/cirro_api_client/v1/api/governance/get_contact.py +++ b/cirro_api_client/v1/api/governance/get_contact.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( contact_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/governance/contacts/{contact_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceContact | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceContact]: if response.status_code == HTTPStatus.OK: response_200 = GovernanceContact.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( contact_id: str, *, client: Client, -) -> GovernanceContact | None: +) -> Optional[GovernanceContact]: """Get a contact Retrieve a governance contact @@ -135,7 +135,7 @@ async def asyncio( contact_id: str, *, client: Client, -) -> GovernanceContact | None: +) -> Optional[GovernanceContact]: """Get a contact Retrieve a governance contact diff --git a/cirro_api_client/v1/api/governance/get_contacts.py b/cirro_api_client/v1/api/governance/get_contacts.py index 87ec2f7..ea6c3ee 100644 --- a/cirro_api_client/v1/api/governance/get_contacts.py +++ b/cirro_api_client/v1/api/governance/get_contacts.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { +def _get_kwargs() -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": "/governance/contacts", } @@ -18,7 +18,7 @@ def _get_kwargs() -> dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["GovernanceContact"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["GovernanceContact"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Govern errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["GovernanceContact"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["GovernanceContact"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[lis def sync_detailed( *, client: Client, -) -> Response[list["GovernanceContact"]]: +) -> Response[List["GovernanceContact"]]: """Get contacts Retrieve a list of governance contacts @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> list["GovernanceContact"] | None: +) -> Optional[List["GovernanceContact"]]: """Get contacts Retrieve a list of governance contacts @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[list["GovernanceContact"]]: +) -> Response[List["GovernanceContact"]]: """Get contacts Retrieve a list of governance contacts @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> list["GovernanceContact"] | None: +) -> Optional[List["GovernanceContact"]]: """Get contacts Retrieve a list of governance contacts diff --git a/cirro_api_client/v1/api/governance/get_requirement.py b/cirro_api_client/v1/api/governance/get_requirement.py index 2db5a13..961348f 100644 --- a/cirro_api_client/v1/api/governance/get_requirement.py +++ b/cirro_api_client/v1/api/governance/get_requirement.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( requirement_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/governance/requirements/{requirement_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceRequirement | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceRequirement]: if response.status_code == HTTPStatus.OK: response_200 = GovernanceRequirement.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( requirement_id: str, *, client: Client, -) -> GovernanceRequirement | None: +) -> Optional[GovernanceRequirement]: """Get a requirement Retrieve a governance requirement @@ -135,7 +135,7 @@ async def asyncio( requirement_id: str, *, client: Client, -) -> GovernanceRequirement | None: +) -> Optional[GovernanceRequirement]: """Get a requirement Retrieve a governance requirement diff --git a/cirro_api_client/v1/api/governance/get_requirements.py b/cirro_api_client/v1/api/governance/get_requirements.py index c3d4511..162e6cf 100644 --- a/cirro_api_client/v1/api/governance/get_requirements.py +++ b/cirro_api_client/v1/api/governance/get_requirements.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional, Union import httpx @@ -11,15 +11,15 @@ def _get_kwargs( *, - project_id: Unset | str = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} + project_id: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} params["projectId"] = project_id params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/governance/requirements", "params": params, @@ -28,7 +28,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["GovernanceRequirement"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["GovernanceRequirement"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -42,7 +42,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Govern errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["GovernanceRequirement"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["GovernanceRequirement"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -54,8 +54,8 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[lis def sync_detailed( *, client: Client, - project_id: Unset | str = UNSET, -) -> Response[list["GovernanceRequirement"]]: + project_id: Union[Unset, str] = UNSET, +) -> Response[List["GovernanceRequirement"]]: """Get requirements Retrieve a list of governance requirements @@ -87,8 +87,8 @@ def sync_detailed( def sync( *, client: Client, - project_id: Unset | str = UNSET, -) -> list["GovernanceRequirement"] | None: + project_id: Union[Unset, str] = UNSET, +) -> Optional[List["GovernanceRequirement"]]: """Get requirements Retrieve a list of governance requirements @@ -117,8 +117,8 @@ def sync( async def asyncio_detailed( *, client: Client, - project_id: Unset | str = UNSET, -) -> Response[list["GovernanceRequirement"]]: + project_id: Union[Unset, str] = UNSET, +) -> Response[List["GovernanceRequirement"]]: """Get requirements Retrieve a list of governance requirements @@ -147,8 +147,8 @@ async def asyncio_detailed( async def asyncio( *, client: Client, - project_id: Unset | str = UNSET, -) -> list["GovernanceRequirement"] | None: + project_id: Union[Unset, str] = UNSET, +) -> Optional[List["GovernanceRequirement"]]: """Get requirements Retrieve a list of governance requirements diff --git a/cirro_api_client/v1/api/governance/get_requirements_by_project.py b/cirro_api_client/v1/api/governance/get_requirements_by_project.py index d35afbc..3a9f0e4 100644 --- a/cirro_api_client/v1/api/governance/get_requirements_by_project.py +++ b/cirro_api_client/v1/api/governance/get_requirements_by_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional, Union import httpx @@ -12,15 +12,15 @@ def _get_kwargs( project_id: str, *, - username: Unset | str = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} + username: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} params["username"] = username params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/governance/projects/{project_id}/requirements", "params": params, @@ -29,7 +29,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["ProjectRequirement"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ProjectRequirement"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -43,7 +43,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Projec errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["ProjectRequirement"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ProjectRequirement"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -56,8 +56,8 @@ def sync_detailed( project_id: str, *, client: Client, - username: Unset | str = UNSET, -) -> Response[list["ProjectRequirement"]]: + username: Union[Unset, str] = UNSET, +) -> Response[List["ProjectRequirement"]]: """Get project requirements Retrieve governance requirements for a project with fulfillment information for the current user @@ -92,8 +92,8 @@ def sync( project_id: str, *, client: Client, - username: Unset | str = UNSET, -) -> list["ProjectRequirement"] | None: + username: Union[Unset, str] = UNSET, +) -> Optional[List["ProjectRequirement"]]: """Get project requirements Retrieve governance requirements for a project with fulfillment information for the current user @@ -125,8 +125,8 @@ async def asyncio_detailed( project_id: str, *, client: Client, - username: Unset | str = UNSET, -) -> Response[list["ProjectRequirement"]]: + username: Union[Unset, str] = UNSET, +) -> Response[List["ProjectRequirement"]]: """Get project requirements Retrieve governance requirements for a project with fulfillment information for the current user @@ -158,8 +158,8 @@ async def asyncio( project_id: str, *, client: Client, - username: Unset | str = UNSET, -) -> list["ProjectRequirement"] | None: + username: Union[Unset, str] = UNSET, +) -> Optional[List["ProjectRequirement"]]: """Get project requirements Retrieve governance requirements for a project with fulfillment information for the current user diff --git a/cirro_api_client/v1/api/governance/update_classification.py b/cirro_api_client/v1/api/governance/update_classification.py index 790a512..fdcb2e7 100644 --- a/cirro_api_client/v1/api/governance/update_classification.py +++ b/cirro_api_client/v1/api/governance/update_classification.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( classification_id: str, *, body: ClassificationInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/governance/classifications/{classification_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceClassification | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceClassification]: if response.status_code == HTTPStatus.OK: response_200 = GovernanceClassification.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ClassificationInput, -) -> GovernanceClassification | None: +) -> Optional[GovernanceClassification]: """Update classification Updates a classification @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ClassificationInput, -) -> GovernanceClassification | None: +) -> Optional[GovernanceClassification]: """Update classification Updates a classification diff --git a/cirro_api_client/v1/api/governance/update_contact.py b/cirro_api_client/v1/api/governance/update_contact.py index c9ca509..2f704f1 100644 --- a/cirro_api_client/v1/api/governance/update_contact.py +++ b/cirro_api_client/v1/api/governance/update_contact.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( contact_id: str, *, body: ContactInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/governance/contacts/{contact_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceContact | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceContact]: if response.status_code == HTTPStatus.OK: response_200 = GovernanceContact.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ContactInput, -) -> GovernanceContact | None: +) -> Optional[GovernanceContact]: """Update contact Updates a contact @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ContactInput, -) -> GovernanceContact | None: +) -> Optional[GovernanceContact]: """Update contact Updates a contact diff --git a/cirro_api_client/v1/api/governance/update_requirement.py b/cirro_api_client/v1/api/governance/update_requirement.py index 5e7eb08..25598be 100644 --- a/cirro_api_client/v1/api/governance/update_requirement.py +++ b/cirro_api_client/v1/api/governance/update_requirement.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( requirement_id: str, *, body: RequirementInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/governance/requirements/{requirement_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> GovernanceRequirement | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GovernanceRequirement]: if response.status_code == HTTPStatus.OK: response_200 = GovernanceRequirement.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: RequirementInput, -) -> GovernanceRequirement | None: +) -> Optional[GovernanceRequirement]: """Update requirement Updates a requirement @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: RequirementInput, -) -> GovernanceRequirement | None: +) -> Optional[GovernanceRequirement]: """Update requirement Updates a requirement diff --git a/cirro_api_client/v1/api/governance/update_requirement_file_for_project.py b/cirro_api_client/v1/api/governance/update_requirement_file_for_project.py index 801180c..6022409 100644 --- a/cirro_api_client/v1/api/governance/update_requirement_file_for_project.py +++ b/cirro_api_client/v1/api/governance/update_requirement_file_for_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: GovernanceFileInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/governance/requirements/{requirement_id}/projects/{project_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/metadata/get_dataset_samples.py b/cirro_api_client/v1/api/metadata/get_dataset_samples.py index 3d3773f..bd4d0bb 100644 --- a/cirro_api_client/v1/api/metadata/get_dataset_samples.py +++ b/cirro_api_client/v1/api/metadata/get_dataset_samples.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, dataset_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/datasets/{dataset_id}/samples", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["Sample"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Sample"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -35,7 +35,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Sample errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Sample"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Sample"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,7 +49,7 @@ def sync_detailed( dataset_id: str, *, client: Client, -) -> Response[list["Sample"]]: +) -> Response[List["Sample"]]: """Get dataset samples Retrieves a list of samples associated with a dataset along with their metadata @@ -85,7 +85,7 @@ def sync( dataset_id: str, *, client: Client, -) -> list["Sample"] | None: +) -> Optional[List["Sample"]]: """Get dataset samples Retrieves a list of samples associated with a dataset along with their metadata @@ -118,7 +118,7 @@ async def asyncio_detailed( dataset_id: str, *, client: Client, -) -> Response[list["Sample"]]: +) -> Response[List["Sample"]]: """Get dataset samples Retrieves a list of samples associated with a dataset along with their metadata @@ -151,7 +151,7 @@ async def asyncio( dataset_id: str, *, client: Client, -) -> list["Sample"] | None: +) -> Optional[List["Sample"]]: """Get dataset samples Retrieves a list of samples associated with a dataset along with their metadata diff --git a/cirro_api_client/v1/api/metadata/get_project_samples.py b/cirro_api_client/v1/api/metadata/get_project_samples.py index 77f8405..39445d4 100644 --- a/cirro_api_client/v1/api/metadata/get_project_samples.py +++ b/cirro_api_client/v1/api/metadata/get_project_samples.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional, Union import httpx @@ -12,10 +12,10 @@ def _get_kwargs( project_id: str, *, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} params["limit"] = limit @@ -23,7 +23,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/samples", "params": params, @@ -32,7 +32,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseSampleDto | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseSampleDto]: if response.status_code == HTTPStatus.OK: response_200 = PaginatedResponseSampleDto.from_dict(response.json()) @@ -54,8 +54,8 @@ def sync_detailed( project_id: str, *, client: Client, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, ) -> Response[PaginatedResponseSampleDto]: """Get project samples @@ -93,9 +93,9 @@ def sync( project_id: str, *, client: Client, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, -) -> PaginatedResponseSampleDto | None: + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, +) -> Optional[PaginatedResponseSampleDto]: """Get project samples Retrieves a list of samples associated with a project along with their metadata @@ -129,8 +129,8 @@ async def asyncio_detailed( project_id: str, *, client: Client, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, ) -> Response[PaginatedResponseSampleDto]: """Get project samples @@ -165,9 +165,9 @@ async def asyncio( project_id: str, *, client: Client, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, -) -> PaginatedResponseSampleDto | None: + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, +) -> Optional[PaginatedResponseSampleDto]: """Get project samples Retrieves a list of samples associated with a project along with their metadata diff --git a/cirro_api_client/v1/api/metadata/get_project_schema.py b/cirro_api_client/v1/api/metadata/get_project_schema.py index 32a025b..33f1341 100644 --- a/cirro_api_client/v1/api/metadata/get_project_schema.py +++ b/cirro_api_client/v1/api/metadata/get_project_schema.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/schema", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> FormSchema | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[FormSchema]: if response.status_code == HTTPStatus.OK: response_200 = FormSchema.from_dict(response.json()) @@ -73,7 +73,7 @@ def sync( project_id: str, *, client: Client, -) -> FormSchema | None: +) -> Optional[FormSchema]: """Get project metadata schema Args: @@ -129,7 +129,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> FormSchema | None: +) -> Optional[FormSchema]: """Get project metadata schema Args: diff --git a/cirro_api_client/v1/api/metadata/get_sample_by_id.py b/cirro_api_client/v1/api/metadata/get_sample_by_id.py index 3c723d4..fc26e9f 100644 --- a/cirro_api_client/v1/api/metadata/get_sample_by_id.py +++ b/cirro_api_client/v1/api/metadata/get_sample_by_id.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, sample_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/samples/{sample_id}", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Sample | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Sample]: if response.status_code == HTTPStatus.OK: response_200 = Sample.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( sample_id: str, *, client: Client, -) -> Sample | None: +) -> Optional[Sample]: """Get sample by ID Retrieves a sample by its ID along with its metadata @@ -146,7 +146,7 @@ async def asyncio( sample_id: str, *, client: Client, -) -> Sample | None: +) -> Optional[Sample]: """Get sample by ID Retrieves a sample by its ID along with its metadata diff --git a/cirro_api_client/v1/api/metadata/update_project_schema.py b/cirro_api_client/v1/api/metadata/update_project_schema.py index 032bde4..90ede66 100644 --- a/cirro_api_client/v1/api/metadata/update_project_schema.py +++ b/cirro_api_client/v1/api/metadata/update_project_schema.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( project_id: str, *, body: FormSchema, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/schema", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/metadata/update_sample.py b/cirro_api_client/v1/api/metadata/update_sample.py index f570e65..a6ead4d 100644 --- a/cirro_api_client/v1/api/metadata/update_sample.py +++ b/cirro_api_client/v1/api/metadata/update_sample.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -15,10 +15,10 @@ def _get_kwargs( sample_id: str, *, body: SampleRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/samples/{sample_id}", } @@ -32,7 +32,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Sample | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Sample]: if response.status_code == HTTPStatus.OK: response_200 = Sample.from_dict(response.json()) @@ -95,7 +95,7 @@ def sync( *, client: Client, body: SampleRequest, -) -> Sample | None: +) -> Optional[Sample]: """Update sample Updates metadata on a sample @@ -167,7 +167,7 @@ async def asyncio( *, client: Client, body: SampleRequest, -) -> Sample | None: +) -> Optional[Sample]: """Update sample Updates metadata on a sample diff --git a/cirro_api_client/v1/api/metrics/get_all_metrics.py b/cirro_api_client/v1/api/metrics/get_all_metrics.py index 8612d34..3eef6ed 100644 --- a/cirro_api_client/v1/api/metrics/get_all_metrics.py +++ b/cirro_api_client/v1/api/metrics/get_all_metrics.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { +def _get_kwargs() -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": "/metrics", } @@ -18,7 +18,7 @@ def _get_kwargs() -> dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["ProjectMetrics"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ProjectMetrics"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Projec errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["ProjectMetrics"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ProjectMetrics"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[lis def sync_detailed( *, client: Client, -) -> Response[list["ProjectMetrics"]]: +) -> Response[List["ProjectMetrics"]]: """Get all project metrics Retrieves metrics for all projects. @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> list["ProjectMetrics"] | None: +) -> Optional[List["ProjectMetrics"]]: """Get all project metrics Retrieves metrics for all projects. @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[list["ProjectMetrics"]]: +) -> Response[List["ProjectMetrics"]]: """Get all project metrics Retrieves metrics for all projects. @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> list["ProjectMetrics"] | None: +) -> Optional[List["ProjectMetrics"]]: """Get all project metrics Retrieves metrics for all projects. diff --git a/cirro_api_client/v1/api/metrics/get_project_metrics.py b/cirro_api_client/v1/api/metrics/get_project_metrics.py index 694c1ba..cc15a35 100644 --- a/cirro_api_client/v1/api/metrics/get_project_metrics.py +++ b/cirro_api_client/v1/api/metrics/get_project_metrics.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/metrics", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> ProjectMetrics | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ProjectMetrics]: if response.status_code == HTTPStatus.OK: response_200 = ProjectMetrics.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( project_id: str, *, client: Client, -) -> ProjectMetrics | None: +) -> Optional[ProjectMetrics]: """Get project metrics Retrieves metrics about a project. @@ -135,7 +135,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> ProjectMetrics | None: +) -> Optional[ProjectMetrics]: """Get project metrics Retrieves metrics about a project. diff --git a/cirro_api_client/v1/api/notebooks/create_notebook_instance.py b/cirro_api_client/v1/api/notebooks/create_notebook_instance.py index bf05eb2..4901f88 100644 --- a/cirro_api_client/v1/api/notebooks/create_notebook_instance.py +++ b/cirro_api_client/v1/api/notebooks/create_notebook_instance.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: CreateNotebookInstanceRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/notebook-instances", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: CreateNotebookInstanceRequest, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create notebook instance Creates a notebook instance within the project @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: CreateNotebookInstanceRequest, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create notebook instance Creates a notebook instance within the project diff --git a/cirro_api_client/v1/api/notebooks/delete_notebook_instance.py b/cirro_api_client/v1/api/notebooks/delete_notebook_instance.py index 8941c9a..b0f82cb 100644 --- a/cirro_api_client/v1/api/notebooks/delete_notebook_instance.py +++ b/cirro_api_client/v1/api/notebooks/delete_notebook_instance.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, notebook_instance_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/projects/{project_id}/notebook-instances/{notebook_instance_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/notebooks/generate_notebook_instance_url.py b/cirro_api_client/v1/api/notebooks/generate_notebook_instance_url.py index 468e515..61c7c54 100644 --- a/cirro_api_client/v1/api/notebooks/generate_notebook_instance_url.py +++ b/cirro_api_client/v1/api/notebooks/generate_notebook_instance_url.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, notebook_instance_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/notebook-instances/{notebook_instance_id}:generate-url", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> OpenNotebookInstanceResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[OpenNotebookInstanceResponse]: if response.status_code == HTTPStatus.OK: response_200 = OpenNotebookInstanceResponse.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( notebook_instance_id: str, *, client: Client, -) -> OpenNotebookInstanceResponse | None: +) -> Optional[OpenNotebookInstanceResponse]: """Generate notebook instance URL Creates an authenticated URL to open up the notebook instance in your browser @@ -146,7 +146,7 @@ async def asyncio( notebook_instance_id: str, *, client: Client, -) -> OpenNotebookInstanceResponse | None: +) -> Optional[OpenNotebookInstanceResponse]: """Generate notebook instance URL Creates an authenticated URL to open up the notebook instance in your browser diff --git a/cirro_api_client/v1/api/notebooks/get_notebook_instance_status.py b/cirro_api_client/v1/api/notebooks/get_notebook_instance_status.py index 6131959..fe4cce1 100644 --- a/cirro_api_client/v1/api/notebooks/get_notebook_instance_status.py +++ b/cirro_api_client/v1/api/notebooks/get_notebook_instance_status.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, notebook_instance_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/notebook-instances/{notebook_instance_id}:status", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> NotebookInstanceStatusResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[NotebookInstanceStatusResponse]: if response.status_code == HTTPStatus.OK: response_200 = NotebookInstanceStatusResponse.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( notebook_instance_id: str, *, client: Client, -) -> NotebookInstanceStatusResponse | None: +) -> Optional[NotebookInstanceStatusResponse]: """Get notebook instance status Retrieves the status of the instance @@ -146,7 +146,7 @@ async def asyncio( notebook_instance_id: str, *, client: Client, -) -> NotebookInstanceStatusResponse | None: +) -> Optional[NotebookInstanceStatusResponse]: """Get notebook instance status Retrieves the status of the instance diff --git a/cirro_api_client/v1/api/notebooks/get_notebook_instances.py b/cirro_api_client/v1/api/notebooks/get_notebook_instances.py index 7bc7e8c..ccaa23e 100644 --- a/cirro_api_client/v1/api/notebooks/get_notebook_instances.py +++ b/cirro_api_client/v1/api/notebooks/get_notebook_instances.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/notebook-instances", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["NotebookInstance"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["NotebookInstance"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -34,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Notebo errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["NotebookInstance"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["NotebookInstance"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +47,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[list["NotebookInstance"]]: +) -> Response[List["NotebookInstance"]]: """Get notebook instances Retrieves a list of notebook instances that the user has access to @@ -80,7 +80,7 @@ def sync( project_id: str, *, client: Client, -) -> list["NotebookInstance"] | None: +) -> Optional[List["NotebookInstance"]]: """Get notebook instances Retrieves a list of notebook instances that the user has access to @@ -110,7 +110,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[list["NotebookInstance"]]: +) -> Response[List["NotebookInstance"]]: """Get notebook instances Retrieves a list of notebook instances that the user has access to @@ -140,7 +140,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> list["NotebookInstance"] | None: +) -> Optional[List["NotebookInstance"]]: """Get notebook instances Retrieves a list of notebook instances that the user has access to diff --git a/cirro_api_client/v1/api/notebooks/stop_notebook_instance.py b/cirro_api_client/v1/api/notebooks/stop_notebook_instance.py index d850381..95ab1d4 100644 --- a/cirro_api_client/v1/api/notebooks/stop_notebook_instance.py +++ b/cirro_api_client/v1/api/notebooks/stop_notebook_instance.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, notebook_instance_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/notebook-instances/{notebook_instance_id}:stop", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/processes/archive_custom_process.py b/cirro_api_client/v1/api/processes/archive_custom_process.py index a659e85..3056c40 100644 --- a/cirro_api_client/v1/api/processes/archive_custom_process.py +++ b/cirro_api_client/v1/api/processes/archive_custom_process.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -10,8 +10,8 @@ def _get_kwargs( process_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/processes/{process_id}", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/processes/calculate_pipeline_cost.py b/cirro_api_client/v1/api/processes/calculate_pipeline_cost.py index 435eb5b..4d6f63f 100644 --- a/cirro_api_client/v1/api/processes/calculate_pipeline_cost.py +++ b/cirro_api_client/v1/api/processes/calculate_pipeline_cost.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( process_id: str, *, body: CalculatePipelineCostRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/processes/{process_id}/cost", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> PipelineCost | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PipelineCost]: if response.status_code == HTTPStatus.OK: response_200 = PipelineCost.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: CalculatePipelineCostRequest, -) -> PipelineCost | None: +) -> Optional[PipelineCost]: """Calculate pipeline cost Retrieves the cost of running the pipeline @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: CalculatePipelineCostRequest, -) -> PipelineCost | None: +) -> Optional[PipelineCost]: """Calculate pipeline cost Retrieves the cost of running the pipeline diff --git a/cirro_api_client/v1/api/processes/create_custom_process.py b/cirro_api_client/v1/api/processes/create_custom_process.py index 1a3000d..f0e4ad2 100644 --- a/cirro_api_client/v1/api/processes/create_custom_process.py +++ b/cirro_api_client/v1/api/processes/create_custom_process.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional, Union import httpx @@ -15,10 +15,10 @@ def _get_kwargs( *, body: CustomProcessInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/processes", } @@ -34,7 +34,7 @@ def _get_kwargs( def _parse_response( *, client: Client, response: httpx.Response -) -> CreateResponse | ErrorMessage | PortalErrorResponse | None: +) -> Optional[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: if response.status_code == HTTPStatus.BAD_REQUEST: response_400 = PortalErrorResponse.from_dict(response.json()) @@ -53,7 +53,7 @@ def _parse_response( def _build_response( *, client: Client, response: httpx.Response -) -> Response[CreateResponse | ErrorMessage | PortalErrorResponse]: +) -> Response[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,7 +66,7 @@ def sync_detailed( *, client: Client, body: CustomProcessInput, -) -> Response[CreateResponse | ErrorMessage | PortalErrorResponse]: +) -> Response[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: """Create custom process Creates a custom data type or pipeline which you can use in the listed projects. @@ -99,7 +99,7 @@ def sync( *, client: Client, body: CustomProcessInput, -) -> CreateResponse | ErrorMessage | PortalErrorResponse | None: +) -> Optional[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: """Create custom process Creates a custom data type or pipeline which you can use in the listed projects. @@ -129,7 +129,7 @@ async def asyncio_detailed( *, client: Client, body: CustomProcessInput, -) -> Response[CreateResponse | ErrorMessage | PortalErrorResponse]: +) -> Response[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: """Create custom process Creates a custom data type or pipeline which you can use in the listed projects. @@ -159,7 +159,7 @@ async def asyncio( *, client: Client, body: CustomProcessInput, -) -> CreateResponse | ErrorMessage | PortalErrorResponse | None: +) -> Optional[Union[CreateResponse, ErrorMessage, PortalErrorResponse]]: """Create custom process Creates a custom data type or pipeline which you can use in the listed projects. diff --git a/cirro_api_client/v1/api/processes/get_process.py b/cirro_api_client/v1/api/processes/get_process.py index 7ce696a..476b368 100644 --- a/cirro_api_client/v1/api/processes/get_process.py +++ b/cirro_api_client/v1/api/processes/get_process.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( process_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/processes/{process_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> ProcessDetail | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ProcessDetail]: if response.status_code == HTTPStatus.OK: response_200 = ProcessDetail.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( process_id: str, *, client: Client, -) -> ProcessDetail | None: +) -> Optional[ProcessDetail]: """Get process Retrieves detailed information on a process @@ -135,7 +135,7 @@ async def asyncio( process_id: str, *, client: Client, -) -> ProcessDetail | None: +) -> Optional[ProcessDetail]: """Get process Retrieves detailed information on a process diff --git a/cirro_api_client/v1/api/processes/get_process_parameters.py b/cirro_api_client/v1/api/processes/get_process_parameters.py index 6bd98f9..845473d 100644 --- a/cirro_api_client/v1/api/processes/get_process_parameters.py +++ b/cirro_api_client/v1/api/processes/get_process_parameters.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( process_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/processes/{process_id}/parameters", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> FormSchema | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[FormSchema]: if response.status_code == HTTPStatus.OK: response_200 = FormSchema.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( process_id: str, *, client: Client, -) -> FormSchema | None: +) -> Optional[FormSchema]: """Get process parameters Retrieves the input parameters for a process @@ -135,7 +135,7 @@ async def asyncio( process_id: str, *, client: Client, -) -> FormSchema | None: +) -> Optional[FormSchema]: """Get process parameters Retrieves the input parameters for a process diff --git a/cirro_api_client/v1/api/processes/get_processes.py b/cirro_api_client/v1/api/processes/get_processes.py index 7feca27..6eba6f9 100644 --- a/cirro_api_client/v1/api/processes/get_processes.py +++ b/cirro_api_client/v1/api/processes/get_processes.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional, Union import httpx @@ -11,15 +11,15 @@ def _get_kwargs( *, - include_archived: Unset | bool = False, -) -> dict[str, Any]: - params: dict[str, Any] = {} + include_archived: Union[Unset, bool] = False, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} params["includeArchived"] = include_archived params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/processes", "params": params, @@ -28,7 +28,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["Process"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Process"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -42,7 +42,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Proces errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Process"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Process"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -54,8 +54,8 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[lis def sync_detailed( *, client: Client, - include_archived: Unset | bool = False, -) -> Response[list["Process"]]: + include_archived: Union[Unset, bool] = False, +) -> Response[List["Process"]]: """List processes Retrieves a list of available processes @@ -87,8 +87,8 @@ def sync_detailed( def sync( *, client: Client, - include_archived: Unset | bool = False, -) -> list["Process"] | None: + include_archived: Union[Unset, bool] = False, +) -> Optional[List["Process"]]: """List processes Retrieves a list of available processes @@ -117,8 +117,8 @@ def sync( async def asyncio_detailed( *, client: Client, - include_archived: Unset | bool = False, -) -> Response[list["Process"]]: + include_archived: Union[Unset, bool] = False, +) -> Response[List["Process"]]: """List processes Retrieves a list of available processes @@ -147,8 +147,8 @@ async def asyncio_detailed( async def asyncio( *, client: Client, - include_archived: Unset | bool = False, -) -> list["Process"] | None: + include_archived: Union[Unset, bool] = False, +) -> Optional[List["Process"]]: """List processes Retrieves a list of available processes diff --git a/cirro_api_client/v1/api/processes/sync_custom_process.py b/cirro_api_client/v1/api/processes/sync_custom_process.py index 0361ce9..904daba 100644 --- a/cirro_api_client/v1/api/processes/sync_custom_process.py +++ b/cirro_api_client/v1/api/processes/sync_custom_process.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( process_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/processes/{process_id}:sync", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> CustomPipelineSettings | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CustomPipelineSettings]: if response.status_code == HTTPStatus.OK: response_200 = CustomPipelineSettings.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( process_id: str, *, client: Client, -) -> CustomPipelineSettings | None: +) -> Optional[CustomPipelineSettings]: """Sync custom process Updates the process definition from the repository @@ -135,7 +135,7 @@ async def asyncio( process_id: str, *, client: Client, -) -> CustomPipelineSettings | None: +) -> Optional[CustomPipelineSettings]: """Sync custom process Updates the process definition from the repository diff --git a/cirro_api_client/v1/api/processes/update_custom_process.py b/cirro_api_client/v1/api/processes/update_custom_process.py index d079660..8de47b3 100644 --- a/cirro_api_client/v1/api/processes/update_custom_process.py +++ b/cirro_api_client/v1/api/processes/update_custom_process.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( process_id: str, *, body: CustomProcessInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/processes/{process_id}", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/processes/validate_file_name_patterns.py b/cirro_api_client/v1/api/processes/validate_file_name_patterns.py index a6e7475..e7b213d 100644 --- a/cirro_api_client/v1/api/processes/validate_file_name_patterns.py +++ b/cirro_api_client/v1/api/processes/validate_file_name_patterns.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( process_id: str, *, body: ValidateFileNamePatternsRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/processes/{process_id}/validate-files:test", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["FileNameMatch"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["FileNameMatch"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -45,7 +45,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["FileNa errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["FileNameMatch"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["FileNameMatch"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,7 +59,7 @@ def sync_detailed( *, client: Client, body: ValidateFileNamePatternsRequest, -) -> Response[list["FileNameMatch"]]: +) -> Response[List["FileNameMatch"]]: """Validate file name patterns Checks the input file names with the patterns for testing regex matching @@ -95,7 +95,7 @@ def sync( *, client: Client, body: ValidateFileNamePatternsRequest, -) -> list["FileNameMatch"] | None: +) -> Optional[List["FileNameMatch"]]: """Validate file name patterns Checks the input file names with the patterns for testing regex matching @@ -128,7 +128,7 @@ async def asyncio_detailed( *, client: Client, body: ValidateFileNamePatternsRequest, -) -> Response[list["FileNameMatch"]]: +) -> Response[List["FileNameMatch"]]: """Validate file name patterns Checks the input file names with the patterns for testing regex matching @@ -161,7 +161,7 @@ async def asyncio( *, client: Client, body: ValidateFileNamePatternsRequest, -) -> list["FileNameMatch"] | None: +) -> Optional[List["FileNameMatch"]]: """Validate file name patterns Checks the input file names with the patterns for testing regex matching diff --git a/cirro_api_client/v1/api/processes/validate_file_requirements.py b/cirro_api_client/v1/api/processes/validate_file_requirements.py index 28da700..21961f8 100644 --- a/cirro_api_client/v1/api/processes/validate_file_requirements.py +++ b/cirro_api_client/v1/api/processes/validate_file_requirements.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( process_id: str, *, body: ValidateFileRequirementsRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/processes/{process_id}/validate-files", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> FileRequirements | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[FileRequirements]: if response.status_code == HTTPStatus.OK: response_200 = FileRequirements.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ValidateFileRequirementsRequest, -) -> FileRequirements | None: +) -> Optional[FileRequirements]: """Validate file requirements Checks the input file names with the expected files for a data type (ingest processes only) @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ValidateFileRequirementsRequest, -) -> FileRequirements | None: +) -> Optional[FileRequirements]: """Validate file requirements Checks the input file names with the expected files for a data type (ingest processes only) diff --git a/cirro_api_client/v1/api/project_requests/create_project_request.py b/cirro_api_client/v1/api/project_requests/create_project_request.py index 1b69290..84b0bc8 100644 --- a/cirro_api_client/v1/api/project_requests/create_project_request.py +++ b/cirro_api_client/v1/api/project_requests/create_project_request.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: ProjectRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/project-requests", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: ProjectRequest, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create project request Request a new project to be created @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: ProjectRequest, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create project request Request a new project to be created diff --git a/cirro_api_client/v1/api/projects/approve_access_request.py b/cirro_api_client/v1/api/projects/approve_access_request.py index 3c8df6a..4d1e990 100644 --- a/cirro_api_client/v1/api/projects/approve_access_request.py +++ b/cirro_api_client/v1/api/projects/approve_access_request.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( access_request_id: str, *, body: ApproveProjectAccessRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/access-requests/{access_request_id}:approve", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/projects/archive_project.py b/cirro_api_client/v1/api/projects/archive_project.py index cc1433d..55710d9 100644 --- a/cirro_api_client/v1/api/projects/archive_project.py +++ b/cirro_api_client/v1/api/projects/archive_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -10,8 +10,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}:archive", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/projects/create_access_request.py b/cirro_api_client/v1/api/projects/create_access_request.py index 3330b52..d8b27d5 100644 --- a/cirro_api_client/v1/api/projects/create_access_request.py +++ b/cirro_api_client/v1/api/projects/create_access_request.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: CreateProjectAccessRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/access-requests", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: CreateProjectAccessRequest, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create access request Creates an access request for the project @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: CreateProjectAccessRequest, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create access request Creates an access request for the project diff --git a/cirro_api_client/v1/api/projects/create_project.py b/cirro_api_client/v1/api/projects/create_project.py index 3d24000..9d79b22 100644 --- a/cirro_api_client/v1/api/projects/create_project.py +++ b/cirro_api_client/v1/api/projects/create_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: ProjectInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/projects", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: ProjectInput, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create project Creates a project @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: ProjectInput, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create project Creates a project diff --git a/cirro_api_client/v1/api/projects/deny_access_request.py b/cirro_api_client/v1/api/projects/deny_access_request.py index 58399bb..4232bd9 100644 --- a/cirro_api_client/v1/api/projects/deny_access_request.py +++ b/cirro_api_client/v1/api/projects/deny_access_request.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, access_request_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/access-requests/{access_request_id}:deny", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/projects/get_access_requests.py b/cirro_api_client/v1/api/projects/get_access_requests.py index f8e90b4..b885748 100644 --- a/cirro_api_client/v1/api/projects/get_access_requests.py +++ b/cirro_api_client/v1/api/projects/get_access_requests.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional, Union import httpx @@ -12,15 +12,15 @@ def _get_kwargs( project_id: str, *, - include_closed: Unset | bool = False, -) -> dict[str, Any]: - params: dict[str, Any] = {} + include_closed: Union[Unset, bool] = False, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} params["includeClosed"] = include_closed params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/access-requests", "params": params, @@ -29,7 +29,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["ProjectAccessRequest"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ProjectAccessRequest"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -43,7 +43,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Projec errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["ProjectAccessRequest"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ProjectAccessRequest"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -56,8 +56,8 @@ def sync_detailed( project_id: str, *, client: Client, - include_closed: Unset | bool = False, -) -> Response[list["ProjectAccessRequest"]]: + include_closed: Union[Unset, bool] = False, +) -> Response[List["ProjectAccessRequest"]]: """Get access requests Gets users who have requested access to the project @@ -92,8 +92,8 @@ def sync( project_id: str, *, client: Client, - include_closed: Unset | bool = False, -) -> list["ProjectAccessRequest"] | None: + include_closed: Union[Unset, bool] = False, +) -> Optional[List["ProjectAccessRequest"]]: """Get access requests Gets users who have requested access to the project @@ -125,8 +125,8 @@ async def asyncio_detailed( project_id: str, *, client: Client, - include_closed: Unset | bool = False, -) -> Response[list["ProjectAccessRequest"]]: + include_closed: Union[Unset, bool] = False, +) -> Response[List["ProjectAccessRequest"]]: """Get access requests Gets users who have requested access to the project @@ -158,8 +158,8 @@ async def asyncio( project_id: str, *, client: Client, - include_closed: Unset | bool = False, -) -> list["ProjectAccessRequest"] | None: + include_closed: Union[Unset, bool] = False, +) -> Optional[List["ProjectAccessRequest"]]: """Get access requests Gets users who have requested access to the project diff --git a/cirro_api_client/v1/api/projects/get_discoverable_projects.py b/cirro_api_client/v1/api/projects/get_discoverable_projects.py index c31e0c7..0dbd4a3 100644 --- a/cirro_api_client/v1/api/projects/get_discoverable_projects.py +++ b/cirro_api_client/v1/api/projects/get_discoverable_projects.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { +def _get_kwargs() -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/discover", } @@ -18,7 +18,7 @@ def _get_kwargs() -> dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["Project"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Project"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Projec errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Project"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Project"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[lis def sync_detailed( *, client: Client, -) -> Response[list["Project"]]: +) -> Response[List["Project"]]: """Get discoverable projects Retrieve a list of projects that a user can request access to @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> list["Project"] | None: +) -> Optional[List["Project"]]: """Get discoverable projects Retrieve a list of projects that a user can request access to @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[list["Project"]]: +) -> Response[List["Project"]]: """Get discoverable projects Retrieve a list of projects that a user can request access to @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> list["Project"] | None: +) -> Optional[List["Project"]]: """Get discoverable projects Retrieve a list of projects that a user can request access to diff --git a/cirro_api_client/v1/api/projects/get_project.py b/cirro_api_client/v1/api/projects/get_project.py index 1bb2497..44ce3cf 100644 --- a/cirro_api_client/v1/api/projects/get_project.py +++ b/cirro_api_client/v1/api/projects/get_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> ProjectDetail | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ProjectDetail]: if response.status_code == HTTPStatus.OK: response_200 = ProjectDetail.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( project_id: str, *, client: Client, -) -> ProjectDetail | None: +) -> Optional[ProjectDetail]: """Get project Get detailed project information @@ -135,7 +135,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> ProjectDetail | None: +) -> Optional[ProjectDetail]: """Get project Get detailed project information diff --git a/cirro_api_client/v1/api/projects/get_project_create_options.py b/cirro_api_client/v1/api/projects/get_project_create_options.py index f515ba0..91bec8f 100644 --- a/cirro_api_client/v1/api/projects/get_project_create_options.py +++ b/cirro_api_client/v1/api/projects/get_project_create_options.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { +def _get_kwargs() -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects/options", } @@ -18,7 +18,7 @@ def _get_kwargs() -> dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> ProjectCreateOptions | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ProjectCreateOptions]: if response.status_code == HTTPStatus.OK: response_200 = ProjectCreateOptions.from_dict(response.json()) @@ -65,7 +65,7 @@ def sync_detailed( def sync( *, client: Client, -) -> ProjectCreateOptions | None: +) -> Optional[ProjectCreateOptions]: """Get project create options Get allowed options for creating a project @@ -112,7 +112,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> ProjectCreateOptions | None: +) -> Optional[ProjectCreateOptions]: """Get project create options Get allowed options for creating a project diff --git a/cirro_api_client/v1/api/projects/get_project_users.py b/cirro_api_client/v1/api/projects/get_project_users.py index 7889d6a..1fbe3a1 100644 --- a/cirro_api_client/v1/api/projects/get_project_users.py +++ b/cirro_api_client/v1/api/projects/get_project_users.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/permissions", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["ProjectUser"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ProjectUser"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -34,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Projec errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["ProjectUser"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ProjectUser"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +47,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[list["ProjectUser"]]: +) -> Response[List["ProjectUser"]]: """Get project permissions Gets users who have access to the project @@ -80,7 +80,7 @@ def sync( project_id: str, *, client: Client, -) -> list["ProjectUser"] | None: +) -> Optional[List["ProjectUser"]]: """Get project permissions Gets users who have access to the project @@ -110,7 +110,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[list["ProjectUser"]]: +) -> Response[List["ProjectUser"]]: """Get project permissions Gets users who have access to the project @@ -140,7 +140,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> list["ProjectUser"] | None: +) -> Optional[List["ProjectUser"]]: """Get project permissions Gets users who have access to the project diff --git a/cirro_api_client/v1/api/projects/get_projects.py b/cirro_api_client/v1/api/projects/get_projects.py index ae14e81..9a76039 100644 --- a/cirro_api_client/v1/api/projects/get_projects.py +++ b/cirro_api_client/v1/api/projects/get_projects.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { +def _get_kwargs() -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": "/projects", } @@ -18,7 +18,7 @@ def _get_kwargs() -> dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["Project"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Project"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Projec errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Project"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Project"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[lis def sync_detailed( *, client: Client, -) -> Response[list["Project"]]: +) -> Response[List["Project"]]: """Get projects Retrieve a list of projects @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> list["Project"] | None: +) -> Optional[List["Project"]]: """Get projects Retrieve a list of projects @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[list["Project"]]: +) -> Response[List["Project"]]: """Get projects Retrieve a list of projects @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> list["Project"] | None: +) -> Optional[List["Project"]]: """Get projects Retrieve a list of projects diff --git a/cirro_api_client/v1/api/projects/redeploy_project.py b/cirro_api_client/v1/api/projects/redeploy_project.py index 106bec1..94da853 100644 --- a/cirro_api_client/v1/api/projects/redeploy_project.py +++ b/cirro_api_client/v1/api/projects/redeploy_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -10,8 +10,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}:re-deploy", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/projects/set_user_project_role.py b/cirro_api_client/v1/api/projects/set_user_project_role.py index 651810c..6daa624 100644 --- a/cirro_api_client/v1/api/projects/set_user_project_role.py +++ b/cirro_api_client/v1/api/projects/set_user_project_role.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( project_id: str, *, body: SetUserProjectRoleRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/permissions", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/projects/unarchive_project.py b/cirro_api_client/v1/api/projects/unarchive_project.py index 3a0ad79..c724507 100644 --- a/cirro_api_client/v1/api/projects/unarchive_project.py +++ b/cirro_api_client/v1/api/projects/unarchive_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -10,8 +10,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}:unarchive", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/projects/update_project.py b/cirro_api_client/v1/api/projects/update_project.py index bd3a294..0e4c510 100644 --- a/cirro_api_client/v1/api/projects/update_project.py +++ b/cirro_api_client/v1/api/projects/update_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: ProjectInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> ProjectDetail | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ProjectDetail]: if response.status_code == HTTPStatus.OK: response_200 = ProjectDetail.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ProjectInput, -) -> ProjectDetail | None: +) -> Optional[ProjectDetail]: """Update project Updates a project @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ProjectInput, -) -> ProjectDetail | None: +) -> Optional[ProjectDetail]: """Update project Updates a project diff --git a/cirro_api_client/v1/api/projects/update_project_tags.py b/cirro_api_client/v1/api/projects/update_project_tags.py index 3e314c8..e829300 100644 --- a/cirro_api_client/v1/api/projects/update_project_tags.py +++ b/cirro_api_client/v1/api/projects/update_project_tags.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -12,11 +12,11 @@ def _get_kwargs( project_id: str, *, - body: list["Tag"], -) -> dict[str, Any]: - headers: dict[str, Any] = {} + body: List["Tag"], +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}:tags", } @@ -33,7 +33,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None @@ -53,7 +53,7 @@ def sync_detailed( project_id: str, *, client: Client, - body: list["Tag"], + body: List["Tag"], ) -> Response[Any]: """Set project tags @@ -89,7 +89,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, - body: list["Tag"], + body: List["Tag"], ) -> Response[Any]: """Set project tags diff --git a/cirro_api_client/v1/api/references/create_project_reference.py b/cirro_api_client/v1/api/references/create_project_reference.py index 5d9fee5..cbb21fd 100644 --- a/cirro_api_client/v1/api/references/create_project_reference.py +++ b/cirro_api_client/v1/api/references/create_project_reference.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: CreateReferenceRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/references", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Reference | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Reference]: if response.status_code == HTTPStatus.OK: response_200 = Reference.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: CreateReferenceRequest, -) -> Reference | None: +) -> Optional[Reference]: """Create project reference Creates a reference @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: CreateReferenceRequest, -) -> Reference | None: +) -> Optional[Reference]: """Create project reference Creates a reference diff --git a/cirro_api_client/v1/api/references/delete_project_reference.py b/cirro_api_client/v1/api/references/delete_project_reference.py index 3a7698e..ba54693 100644 --- a/cirro_api_client/v1/api/references/delete_project_reference.py +++ b/cirro_api_client/v1/api/references/delete_project_reference.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -10,8 +10,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/projects/{project_id}/references", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/references/get_reference_types.py b/cirro_api_client/v1/api/references/get_reference_types.py index 2a4ece6..c50d7e0 100644 --- a/cirro_api_client/v1/api/references/get_reference_types.py +++ b/cirro_api_client/v1/api/references/get_reference_types.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { +def _get_kwargs() -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": "/reference-types", } @@ -18,7 +18,7 @@ def _get_kwargs() -> dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["ReferenceType"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ReferenceType"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Refere errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["ReferenceType"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ReferenceType"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[lis def sync_detailed( *, client: Client, -) -> Response[list["ReferenceType"]]: +) -> Response[List["ReferenceType"]]: """Get reference types List available reference types @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> list["ReferenceType"] | None: +) -> Optional[List["ReferenceType"]]: """Get reference types List available reference types @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[list["ReferenceType"]]: +) -> Response[List["ReferenceType"]]: """Get reference types List available reference types @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> list["ReferenceType"] | None: +) -> Optional[List["ReferenceType"]]: """Get reference types List available reference types diff --git a/cirro_api_client/v1/api/references/get_references.py b/cirro_api_client/v1/api/references/get_references.py index 220db9d..97c1dd8 100644 --- a/cirro_api_client/v1/api/references/get_references.py +++ b/cirro_api_client/v1/api/references/get_references.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { +def _get_kwargs() -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": "/references", } @@ -18,7 +18,7 @@ def _get_kwargs() -> dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["Reference"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Reference"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Refere errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Reference"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Reference"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[lis def sync_detailed( *, client: Client, -) -> Response[list["Reference"]]: +) -> Response[List["Reference"]]: """Get global references List available references (available to everyone) @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> list["Reference"] | None: +) -> Optional[List["Reference"]]: """Get global references List available references (available to everyone) @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[list["Reference"]]: +) -> Response[List["Reference"]]: """Get global references List available references (available to everyone) @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> list["Reference"] | None: +) -> Optional[List["Reference"]]: """Get global references List available references (available to everyone) diff --git a/cirro_api_client/v1/api/references/get_references_for_project.py b/cirro_api_client/v1/api/references/get_references_for_project.py index 1a69999..94e189b 100644 --- a/cirro_api_client/v1/api/references/get_references_for_project.py +++ b/cirro_api_client/v1/api/references/get_references_for_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/references", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["Reference"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Reference"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -34,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Refere errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Reference"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Reference"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +47,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[list["Reference"]]: +) -> Response[List["Reference"]]: """Get project references List available references for a given project @@ -80,7 +80,7 @@ def sync( project_id: str, *, client: Client, -) -> list["Reference"] | None: +) -> Optional[List["Reference"]]: """Get project references List available references for a given project @@ -110,7 +110,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[list["Reference"]]: +) -> Response[List["Reference"]]: """Get project references List available references for a given project @@ -140,7 +140,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> list["Reference"] | None: +) -> Optional[List["Reference"]]: """Get project references List available references for a given project diff --git a/cirro_api_client/v1/api/references/refresh_project_references.py b/cirro_api_client/v1/api/references/refresh_project_references.py index 1ca33cc..8c913a3 100644 --- a/cirro_api_client/v1/api/references/refresh_project_references.py +++ b/cirro_api_client/v1/api/references/refresh_project_references.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -10,8 +10,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/references", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/sharing/create_share.py b/cirro_api_client/v1/api/sharing/create_share.py index 54dcc45..630521a 100644 --- a/cirro_api_client/v1/api/sharing/create_share.py +++ b/cirro_api_client/v1/api/sharing/create_share.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: ShareInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/shares", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: ShareInput, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create share Create a new share to publish to other projects @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: ShareInput, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create share Create a new share to publish to other projects diff --git a/cirro_api_client/v1/api/sharing/delete_share.py b/cirro_api_client/v1/api/sharing/delete_share.py index 37e737d..0de3be9 100644 --- a/cirro_api_client/v1/api/sharing/delete_share.py +++ b/cirro_api_client/v1/api/sharing/delete_share.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, share_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/projects/{project_id}/shares/{share_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/sharing/get_discoverable_shares.py b/cirro_api_client/v1/api/sharing/get_discoverable_shares.py index 46b8513..c2c2d08 100644 --- a/cirro_api_client/v1/api/sharing/get_discoverable_shares.py +++ b/cirro_api_client/v1/api/sharing/get_discoverable_shares.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/shares/discover", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["Share"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Share"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -34,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Share" errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Share"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Share"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +47,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[list["Share"]]: +) -> Response[List["Share"]]: """Get discoverable shares Get shares that the project can request access to @@ -80,7 +80,7 @@ def sync( project_id: str, *, client: Client, -) -> list["Share"] | None: +) -> Optional[List["Share"]]: """Get discoverable shares Get shares that the project can request access to @@ -110,7 +110,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[list["Share"]]: +) -> Response[List["Share"]]: """Get discoverable shares Get shares that the project can request access to @@ -140,7 +140,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> list["Share"] | None: +) -> Optional[List["Share"]]: """Get discoverable shares Get shares that the project can request access to diff --git a/cirro_api_client/v1/api/sharing/get_share.py b/cirro_api_client/v1/api/sharing/get_share.py index 0e5165f..f6a2426 100644 --- a/cirro_api_client/v1/api/sharing/get_share.py +++ b/cirro_api_client/v1/api/sharing/get_share.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, share_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/shares/{share_id}", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> ShareDetail | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[ShareDetail]: if response.status_code == HTTPStatus.OK: response_200 = ShareDetail.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( share_id: str, *, client: Client, -) -> ShareDetail | None: +) -> Optional[ShareDetail]: """Get share Get details on a share that you've published or subscribed to @@ -146,7 +146,7 @@ async def asyncio( share_id: str, *, client: Client, -) -> ShareDetail | None: +) -> Optional[ShareDetail]: """Get share Get details on a share that you've published or subscribed to diff --git a/cirro_api_client/v1/api/sharing/get_shared_datasets.py b/cirro_api_client/v1/api/sharing/get_shared_datasets.py index b2bc777..433cbad 100644 --- a/cirro_api_client/v1/api/sharing/get_shared_datasets.py +++ b/cirro_api_client/v1/api/sharing/get_shared_datasets.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional, Union import httpx @@ -13,10 +13,10 @@ def _get_kwargs( project_id: str, share_id: str, *, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} params["limit"] = limit @@ -24,7 +24,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/shares/{share_id}/datasets", "params": params, @@ -33,7 +33,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseDatasetListDto | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseDatasetListDto]: if response.status_code == HTTPStatus.OK: response_200 = PaginatedResponseDatasetListDto.from_dict(response.json()) @@ -56,8 +56,8 @@ def sync_detailed( share_id: str, *, client: Client, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, ) -> Response[PaginatedResponseDatasetListDto]: """Get share datasets @@ -98,9 +98,9 @@ def sync( share_id: str, *, client: Client, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, -) -> PaginatedResponseDatasetListDto | None: + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, +) -> Optional[PaginatedResponseDatasetListDto]: """Get share datasets Get dataset listing for a share @@ -137,8 +137,8 @@ async def asyncio_detailed( share_id: str, *, client: Client, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, ) -> Response[PaginatedResponseDatasetListDto]: """Get share datasets @@ -176,9 +176,9 @@ async def asyncio( share_id: str, *, client: Client, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, -) -> PaginatedResponseDatasetListDto | None: + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, +) -> Optional[PaginatedResponseDatasetListDto]: """Get share datasets Get dataset listing for a share diff --git a/cirro_api_client/v1/api/sharing/get_shares.py b/cirro_api_client/v1/api/sharing/get_shares.py index 1af348a..ded07ce 100644 --- a/cirro_api_client/v1/api/sharing/get_shares.py +++ b/cirro_api_client/v1/api/sharing/get_shares.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/shares", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["Share"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Share"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -34,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Share" errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Share"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Share"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +47,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[list["Share"]]: +) -> Response[List["Share"]]: """Get shares Get shares for a project (both published and shared with the project) @@ -80,7 +80,7 @@ def sync( project_id: str, *, client: Client, -) -> list["Share"] | None: +) -> Optional[List["Share"]]: """Get shares Get shares for a project (both published and shared with the project) @@ -110,7 +110,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[list["Share"]]: +) -> Response[List["Share"]]: """Get shares Get shares for a project (both published and shared with the project) @@ -140,7 +140,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> list["Share"] | None: +) -> Optional[List["Share"]]: """Get shares Get shares for a project (both published and shared with the project) diff --git a/cirro_api_client/v1/api/sharing/subscribe_share.py b/cirro_api_client/v1/api/sharing/subscribe_share.py index 3a96098..cd3ae69 100644 --- a/cirro_api_client/v1/api/sharing/subscribe_share.py +++ b/cirro_api_client/v1/api/sharing/subscribe_share.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, share_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/shares/{share_id}:subscribe", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/sharing/unsubscribe_share.py b/cirro_api_client/v1/api/sharing/unsubscribe_share.py index f93635c..86e4620 100644 --- a/cirro_api_client/v1/api/sharing/unsubscribe_share.py +++ b/cirro_api_client/v1/api/sharing/unsubscribe_share.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, share_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/shares/{share_id}:unsubscribe", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/sharing/update_share.py b/cirro_api_client/v1/api/sharing/update_share.py index 2fd5c1d..2f9dbb9 100644 --- a/cirro_api_client/v1/api/sharing/update_share.py +++ b/cirro_api_client/v1/api/sharing/update_share.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( share_id: str, *, body: ShareInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/shares/{share_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/api/system/get_service_connections.py b/cirro_api_client/v1/api/system/get_service_connections.py index 98a75cf..67dadbb 100644 --- a/cirro_api_client/v1/api/system/get_service_connections.py +++ b/cirro_api_client/v1/api/system/get_service_connections.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { +def _get_kwargs() -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": "/service-connections", } @@ -18,7 +18,7 @@ def _get_kwargs() -> dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["ServiceConnection"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["ServiceConnection"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Servic errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["ServiceConnection"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["ServiceConnection"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[lis def sync_detailed( *, client: Client, -) -> Response[list["ServiceConnection"]]: +) -> Response[List["ServiceConnection"]]: """Get service connections List available service connections @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> list["ServiceConnection"] | None: +) -> Optional[List["ServiceConnection"]]: """Get service connections List available service connections @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[list["ServiceConnection"]]: +) -> Response[List["ServiceConnection"]]: """Get service connections List available service connections @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> list["ServiceConnection"] | None: +) -> Optional[List["ServiceConnection"]]: """Get service connections List available service connections diff --git a/cirro_api_client/v1/api/system/info.py b/cirro_api_client/v1/api/system/info.py index efe8b3c..c9bda11 100644 --- a/cirro_api_client/v1/api/system/info.py +++ b/cirro_api_client/v1/api/system/info.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { +def _get_kwargs() -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": "/info", } @@ -18,7 +18,7 @@ def _get_kwargs() -> dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> SystemInfoResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[SystemInfoResponse]: if response.status_code == HTTPStatus.OK: response_200 = SystemInfoResponse.from_dict(response.json()) @@ -63,7 +63,7 @@ def sync_detailed( def sync( *, client: Client, -) -> SystemInfoResponse | None: +) -> Optional[SystemInfoResponse]: """Get system info Raises: @@ -106,7 +106,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> SystemInfoResponse | None: +) -> Optional[SystemInfoResponse]: """Get system info Raises: diff --git a/cirro_api_client/v1/api/tools/move_dataset.py b/cirro_api_client/v1/api/tools/move_dataset.py index cb3b891..cf0a715 100644 --- a/cirro_api_client/v1/api/tools/move_dataset.py +++ b/cirro_api_client/v1/api/tools/move_dataset.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: MoveDatasetInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": "/tools/move-dataset", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> MoveDatasetResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[MoveDatasetResponse]: if response.status_code == HTTPStatus.OK: response_200 = MoveDatasetResponse.from_dict(response.json()) @@ -86,7 +86,7 @@ def sync( *, client: Client, body: MoveDatasetInput, -) -> MoveDatasetResponse | None: +) -> Optional[MoveDatasetResponse]: """Move a dataset to a different project Moves a dataset to a different project. The underlying S3 data is not transferred and will need to @@ -148,7 +148,7 @@ async def asyncio( *, client: Client, body: MoveDatasetInput, -) -> MoveDatasetResponse | None: +) -> Optional[MoveDatasetResponse]: """Move a dataset to a different project Moves a dataset to a different project. The underlying S3 data is not transferred and will need to diff --git a/cirro_api_client/v1/api/users/get_user.py b/cirro_api_client/v1/api/users/get_user.py index c778ed9..d92c1c6 100644 --- a/cirro_api_client/v1/api/users/get_user.py +++ b/cirro_api_client/v1/api/users/get_user.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( username: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/users/{username}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> UserDetail | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[UserDetail]: if response.status_code == HTTPStatus.OK: response_200 = UserDetail.from_dict(response.json()) @@ -75,7 +75,7 @@ def sync( username: str, *, client: Client, -) -> UserDetail | None: +) -> Optional[UserDetail]: """Get user Get user information @@ -135,7 +135,7 @@ async def asyncio( username: str, *, client: Client, -) -> UserDetail | None: +) -> Optional[UserDetail]: """Get user Get user information diff --git a/cirro_api_client/v1/api/users/invite_user.py b/cirro_api_client/v1/api/users/invite_user.py index a17e1d6..4ee4734 100644 --- a/cirro_api_client/v1/api/users/invite_user.py +++ b/cirro_api_client/v1/api/users/invite_user.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: InviteUserRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": "/users", } @@ -30,7 +30,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> InviteUserResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[InviteUserResponse]: if response.status_code == HTTPStatus.OK: response_200 = InviteUserResponse.from_dict(response.json()) @@ -85,7 +85,7 @@ def sync( *, client: Client, body: InviteUserRequest, -) -> InviteUserResponse | None: +) -> Optional[InviteUserResponse]: """Invite user Invites a user to the system @@ -145,7 +145,7 @@ async def asyncio( *, client: Client, body: InviteUserRequest, -) -> InviteUserResponse | None: +) -> Optional[InviteUserResponse]: """Invite user Invites a user to the system diff --git a/cirro_api_client/v1/api/users/list_users.py b/cirro_api_client/v1/api/users/list_users.py index 78ea692..af6323c 100644 --- a/cirro_api_client/v1/api/users/list_users.py +++ b/cirro_api_client/v1/api/users/list_users.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional, Union import httpx @@ -11,13 +11,13 @@ def _get_kwargs( *, - username: None | Unset | str = UNSET, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, -) -> dict[str, Any]: - params: dict[str, Any] = {} + username: Union[None, Unset, str] = UNSET, + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} - json_username: None | Unset | str + json_username: Union[None, Unset, str] if isinstance(username, Unset): json_username = UNSET else: @@ -30,7 +30,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "get", "url": "/users", "params": params, @@ -39,7 +39,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> PaginatedResponseUserDto | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[PaginatedResponseUserDto]: if response.status_code == HTTPStatus.OK: response_200 = PaginatedResponseUserDto.from_dict(response.json()) @@ -60,9 +60,9 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Pag def sync_detailed( *, client: Client, - username: None | Unset | str = UNSET, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, + username: Union[None, Unset, str] = UNSET, + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, ) -> Response[PaginatedResponseUserDto]: """List users @@ -99,10 +99,10 @@ def sync_detailed( def sync( *, client: Client, - username: None | Unset | str = UNSET, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, -) -> PaginatedResponseUserDto | None: + username: Union[None, Unset, str] = UNSET, + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, +) -> Optional[PaginatedResponseUserDto]: """List users Gets a list of users, matching an optional username pattern @@ -135,9 +135,9 @@ def sync( async def asyncio_detailed( *, client: Client, - username: None | Unset | str = UNSET, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, + username: Union[None, Unset, str] = UNSET, + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, ) -> Response[PaginatedResponseUserDto]: """List users @@ -171,10 +171,10 @@ async def asyncio_detailed( async def asyncio( *, client: Client, - username: None | Unset | str = UNSET, - limit: Unset | int = 5000, - next_token: Unset | str = UNSET, -) -> PaginatedResponseUserDto | None: + username: Union[None, Unset, str] = UNSET, + limit: Union[Unset, int] = 5000, + next_token: Union[Unset, str] = UNSET, +) -> Optional[PaginatedResponseUserDto]: """List users Gets a list of users, matching an optional username pattern diff --git a/cirro_api_client/v1/api/users/sign_out_user.py b/cirro_api_client/v1/api/users/sign_out_user.py index 9471e34..c290d4d 100644 --- a/cirro_api_client/v1/api/users/sign_out_user.py +++ b/cirro_api_client/v1/api/users/sign_out_user.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -10,8 +10,8 @@ def _get_kwargs( username: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/users/{username}:signOut", } @@ -19,7 +19,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/users/update_user.py b/cirro_api_client/v1/api/users/update_user.py index 4ab01f2..e3dad7f 100644 --- a/cirro_api_client/v1/api/users/update_user.py +++ b/cirro_api_client/v1/api/users/update_user.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( username: str, *, body: UpdateUserRequest, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/users/{username}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> User | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[User]: if response.status_code == HTTPStatus.OK: response_200 = User.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: UpdateUserRequest, -) -> User | None: +) -> Optional[User]: """Update user Update user information @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: UpdateUserRequest, -) -> User | None: +) -> Optional[User]: """Update user Update user information diff --git a/cirro_api_client/v1/api/workspaces/connect_workspace.py b/cirro_api_client/v1/api/workspaces/connect_workspace.py index e5f6eb6..fee9a4e 100644 --- a/cirro_api_client/v1/api/workspaces/connect_workspace.py +++ b/cirro_api_client/v1/api/workspaces/connect_workspace.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, workspace_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/workspaces/{workspace_id}:connect", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> WorkspaceConnectionResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[WorkspaceConnectionResponse]: if response.status_code == HTTPStatus.ACCEPTED: response_202 = WorkspaceConnectionResponse.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( workspace_id: str, *, client: Client, -) -> WorkspaceConnectionResponse | None: +) -> Optional[WorkspaceConnectionResponse]: """Connect to workspace Generates a URL to connect to the given workspace @@ -146,7 +146,7 @@ async def asyncio( workspace_id: str, *, client: Client, -) -> WorkspaceConnectionResponse | None: +) -> Optional[WorkspaceConnectionResponse]: """Connect to workspace Generates a URL to connect to the given workspace diff --git a/cirro_api_client/v1/api/workspaces/create_workspace.py b/cirro_api_client/v1/api/workspaces/create_workspace.py index d3e4617..57ccc68 100644 --- a/cirro_api_client/v1/api/workspaces/create_workspace.py +++ b/cirro_api_client/v1/api/workspaces/create_workspace.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( project_id: str, *, body: WorkspaceInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/workspaces", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> CreateResponse | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[CreateResponse]: if response.status_code == HTTPStatus.CREATED: response_201 = CreateResponse.from_dict(response.json()) @@ -90,7 +90,7 @@ def sync( *, client: Client, body: WorkspaceInput, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create workspace Creates a workspace within a project @@ -156,7 +156,7 @@ async def asyncio( *, client: Client, body: WorkspaceInput, -) -> CreateResponse | None: +) -> Optional[CreateResponse]: """Create workspace Creates a workspace within a project diff --git a/cirro_api_client/v1/api/workspaces/delete_workspace.py b/cirro_api_client/v1/api/workspaces/delete_workspace.py index 70abdd2..0d3a07d 100644 --- a/cirro_api_client/v1/api/workspaces/delete_workspace.py +++ b/cirro_api_client/v1/api/workspaces/delete_workspace.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, workspace_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/projects/{project_id}/workspaces/{workspace_id}", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/workspaces/disconnect_workspace.py b/cirro_api_client/v1/api/workspaces/disconnect_workspace.py index 033d3c3..a87b790 100644 --- a/cirro_api_client/v1/api/workspaces/disconnect_workspace.py +++ b/cirro_api_client/v1/api/workspaces/disconnect_workspace.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -13,14 +13,14 @@ def _get_kwargs( workspace_id: str, *, session_id: str, -) -> dict[str, Any]: - params: dict[str, Any] = {} +) -> Dict[str, Any]: + params: Dict[str, Any] = {} params["sessionId"] = session_id params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "delete", "url": f"/projects/{project_id}/workspaces/{workspace_id}:disconnect", "params": params, @@ -29,7 +29,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/workspaces/get_workspace.py b/cirro_api_client/v1/api/workspaces/get_workspace.py index cc137bd..a755235 100644 --- a/cirro_api_client/v1/api/workspaces/get_workspace.py +++ b/cirro_api_client/v1/api/workspaces/get_workspace.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -12,8 +12,8 @@ def _get_kwargs( project_id: str, workspace_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/workspaces/{workspace_id}", } @@ -21,7 +21,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Workspace | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Workspace]: if response.status_code == HTTPStatus.OK: response_200 = Workspace.from_dict(response.json()) @@ -80,7 +80,7 @@ def sync( workspace_id: str, *, client: Client, -) -> Workspace | None: +) -> Optional[Workspace]: """Get workspace Get details of a particular workspace @@ -146,7 +146,7 @@ async def asyncio( workspace_id: str, *, client: Client, -) -> Workspace | None: +) -> Optional[Workspace]: """Get workspace Get details of a particular workspace diff --git a/cirro_api_client/v1/api/workspaces/get_workspace_environments.py b/cirro_api_client/v1/api/workspaces/get_workspace_environments.py index 37f839e..e6a4c80 100644 --- a/cirro_api_client/v1/api/workspaces/get_workspace_environments.py +++ b/cirro_api_client/v1/api/workspaces/get_workspace_environments.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> dict[str, Any]: - _kwargs: dict[str, Any] = { +def _get_kwargs() -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": "/workspace-environments", } @@ -18,7 +18,7 @@ def _get_kwargs() -> dict[str, Any]: return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["WorkspaceEnvironment"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["WorkspaceEnvironment"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -32,7 +32,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Worksp errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["WorkspaceEnvironment"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["WorkspaceEnvironment"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -44,7 +44,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[lis def sync_detailed( *, client: Client, -) -> Response[list["WorkspaceEnvironment"]]: +) -> Response[List["WorkspaceEnvironment"]]: """Get workspace environments Retrieves a list of pre-defined workspace environments available to use @@ -70,7 +70,7 @@ def sync_detailed( def sync( *, client: Client, -) -> list["WorkspaceEnvironment"] | None: +) -> Optional[List["WorkspaceEnvironment"]]: """Get workspace environments Retrieves a list of pre-defined workspace environments available to use @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( *, client: Client, -) -> Response[list["WorkspaceEnvironment"]]: +) -> Response[List["WorkspaceEnvironment"]]: """Get workspace environments Retrieves a list of pre-defined workspace environments available to use @@ -117,7 +117,7 @@ async def asyncio_detailed( async def asyncio( *, client: Client, -) -> list["WorkspaceEnvironment"] | None: +) -> Optional[List["WorkspaceEnvironment"]]: """Get workspace environments Retrieves a list of pre-defined workspace environments available to use diff --git a/cirro_api_client/v1/api/workspaces/get_workspaces.py b/cirro_api_client/v1/api/workspaces/get_workspaces.py index efd8a9f..5f3958e 100644 --- a/cirro_api_client/v1/api/workspaces/get_workspaces.py +++ b/cirro_api_client/v1/api/workspaces/get_workspaces.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "get", "url": f"/projects/{project_id}/workspaces", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> list["Workspace"] | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List["Workspace"]]: if response.status_code == HTTPStatus.OK: response_200 = [] _response_200 = response.json() @@ -34,7 +34,7 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Worksp errors.handle_error_response(response, client.raise_on_unexpected_status) -def _build_response(*, client: Client, response: httpx.Response) -> Response[list["Workspace"]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[List["Workspace"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -47,7 +47,7 @@ def sync_detailed( project_id: str, *, client: Client, -) -> Response[list["Workspace"]]: +) -> Response[List["Workspace"]]: """Get workspaces Retrieves a list of workspaces that the user has access to @@ -80,7 +80,7 @@ def sync( project_id: str, *, client: Client, -) -> list["Workspace"] | None: +) -> Optional[List["Workspace"]]: """Get workspaces Retrieves a list of workspaces that the user has access to @@ -110,7 +110,7 @@ async def asyncio_detailed( project_id: str, *, client: Client, -) -> Response[list["Workspace"]]: +) -> Response[List["Workspace"]]: """Get workspaces Retrieves a list of workspaces that the user has access to @@ -140,7 +140,7 @@ async def asyncio( project_id: str, *, client: Client, -) -> list["Workspace"] | None: +) -> Optional[List["Workspace"]]: """Get workspaces Retrieves a list of workspaces that the user has access to diff --git a/cirro_api_client/v1/api/workspaces/start_workspace.py b/cirro_api_client/v1/api/workspaces/start_workspace.py index db66f8c..98b4ed3 100644 --- a/cirro_api_client/v1/api/workspaces/start_workspace.py +++ b/cirro_api_client/v1/api/workspaces/start_workspace.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, workspace_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/workspaces/{workspace_id}:start", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/workspaces/stop_workspace.py b/cirro_api_client/v1/api/workspaces/stop_workspace.py index 22e0a7d..c258ba3 100644 --- a/cirro_api_client/v1/api/workspaces/stop_workspace.py +++ b/cirro_api_client/v1/api/workspaces/stop_workspace.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -11,8 +11,8 @@ def _get_kwargs( project_id: str, workspace_id: str, -) -> dict[str, Any]: - _kwargs: dict[str, Any] = { +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { "method": "post", "url": f"/projects/{project_id}/workspaces/{workspace_id}:stop", } @@ -20,7 +20,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.ACCEPTED: return None diff --git a/cirro_api_client/v1/api/workspaces/update_workspace.py b/cirro_api_client/v1/api/workspaces/update_workspace.py index cb4ad95..aa5b8c6 100644 --- a/cirro_api_client/v1/api/workspaces/update_workspace.py +++ b/cirro_api_client/v1/api/workspaces/update_workspace.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any +from typing import Any, Dict, Optional import httpx @@ -14,10 +14,10 @@ def _get_kwargs( workspace_id: str, *, body: WorkspaceInput, -) -> dict[str, Any]: - headers: dict[str, Any] = {} +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} - _kwargs: dict[str, Any] = { + _kwargs: Dict[str, Any] = { "method": "put", "url": f"/projects/{project_id}/workspaces/{workspace_id}", } @@ -31,7 +31,7 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Client, response: httpx.Response) -> Any | None: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]: if response.status_code == HTTPStatus.OK: return None diff --git a/cirro_api_client/v1/client.py b/cirro_api_client/v1/client.py index 2de3fa6..f2816dc 100644 --- a/cirro_api_client/v1/client.py +++ b/cirro_api_client/v1/client.py @@ -1,5 +1,5 @@ import ssl -from typing import Any +from typing import Any, Dict, Optional, Union import httpx from attrs import define, evolve, field @@ -39,19 +39,19 @@ class Client: raise_on_unexpected_status: bool = field(default=False, kw_only=True) auth_method: httpx.Auth = field(default=None, kw_only=True) _base_url: str - _cookies: dict[str, str] = field(factory=dict, kw_only=True) - _headers: dict[str, str] = field(factory=dict, kw_only=True) - _timeout: httpx.Timeout | None = field(default=None, kw_only=True) - _verify_ssl: str | bool | ssl.SSLContext = field(default=True, kw_only=True) + _cookies: Dict[str, str] = field(factory=dict, kw_only=True) + _headers: Dict[str, str] = field(factory=dict, kw_only=True) + _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True) + _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True) _follow_redirects: bool = field(default=False, kw_only=True) - _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True) - _client: httpx.Client | None = field(default=None, init=False) - _async_client: httpx.AsyncClient | None = field(default=None, init=False) + _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True) + _client: Optional[httpx.Client] = field(default=None, init=False) + _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) def get_auth(self): return self.auth_method - def with_headers(self, headers: dict[str, str]) -> "Client": + def with_headers(self, headers: Dict[str, str]) -> "Client": """Get a new client matching this one with additional headers""" if self._client is not None: self._client.headers.update(headers) @@ -59,7 +59,7 @@ def with_headers(self, headers: dict[str, str]) -> "Client": self._async_client.headers.update(headers) return evolve(self, headers={**self._headers, **headers}) - def with_cookies(self, cookies: dict[str, str]) -> "Client": + def with_cookies(self, cookies: Dict[str, str]) -> "Client": """Get a new client matching this one with additional cookies""" if self._client is not None: self._client.cookies.update(cookies) diff --git a/cirro_api_client/v1/errors.py b/cirro_api_client/v1/errors.py index 413e2b4..c679971 100644 --- a/cirro_api_client/v1/errors.py +++ b/cirro_api_client/v1/errors.py @@ -1,6 +1,7 @@ """Contains shared errors types that can be raised from API functions""" from http import HTTPStatus +from typing import Dict import httpx @@ -37,7 +38,7 @@ def __init__(self, status_code: int, content: bytes): class CirroException(Exception): """Raised when the server returns a known error response""" - def __init__(self, error_response_data: dict): + def __init__(self, error_response_data: Dict): self.error_response = PortalErrorResponse.from_dict(error_response_data) super().__init__(self.error_response.error_detail) diff --git a/cirro_api_client/v1/models/agent.py b/cirro_api_client/v1/models/agent.py index 12d91cd..54f6f68 100644 --- a/cirro_api_client/v1/models/agent.py +++ b/cirro_api_client/v1/models/agent.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,23 +25,23 @@ class Agent: """ status: AgentStatus - id: Unset | str = UNSET - name: Unset | str = UNSET + id: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET tags: Union[Unset, "AgentTags"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: status = self.status.value id = self.id name = self.name - tags: Unset | dict[str, Any] = UNSET + tags: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.tags, Unset): tags = self.tags.to_dict() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -58,7 +58,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.agent_tags import AgentTags d = src_dict.copy() @@ -69,7 +69,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: name = d.pop("name", UNSET) _tags = d.pop("tags", UNSET) - tags: Unset | AgentTags + tags: Union[Unset, AgentTags] if isinstance(_tags, Unset): tags = UNSET else: @@ -86,5 +86,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return agent @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_detail.py b/cirro_api_client/v1/models/agent_detail.py index 3ec130a..f5a09c2 100644 --- a/cirro_api_client/v1/models/agent_detail.py +++ b/cirro_api_client/v1/models/agent_detail.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -43,9 +43,9 @@ class AgentDetail: registration: Union["AgentRegistration", None, Unset] = UNSET tags: Union["AgentDetailTags", None, Unset] = UNSET environment_configuration: Union["AgentDetailEnvironmentConfiguration", None, Unset] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: from ..models.agent_detail_environment_configuration import AgentDetailEnvironmentConfiguration from ..models.agent_detail_tags import AgentDetailTags from ..models.agent_registration import AgentRegistration @@ -64,7 +64,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at.isoformat() - registration: dict[str, Any] | None | Unset + registration: Union[Dict[str, Any], None, Unset] if isinstance(self.registration, Unset): registration = UNSET elif isinstance(self.registration, AgentRegistration): @@ -72,7 +72,7 @@ def to_dict(self) -> dict[str, Any]: else: registration = self.registration - tags: dict[str, Any] | None | Unset + tags: Union[Dict[str, Any], None, Unset] if isinstance(self.tags, Unset): tags = UNSET elif isinstance(self.tags, AgentDetailTags): @@ -80,7 +80,7 @@ def to_dict(self) -> dict[str, Any]: else: tags = self.tags - environment_configuration: dict[str, Any] | None | Unset + environment_configuration: Union[Dict[str, Any], None, Unset] if isinstance(self.environment_configuration, Unset): environment_configuration = UNSET elif isinstance(self.environment_configuration, AgentDetailEnvironmentConfiguration): @@ -88,7 +88,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_configuration = self.environment_configuration - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -111,7 +111,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.agent_detail_environment_configuration import AgentDetailEnvironmentConfiguration from ..models.agent_detail_tags import AgentDetailTags from ..models.agent_registration import AgentRegistration @@ -199,5 +199,5 @@ def _parse_environment_configuration(data: object) -> Union["AgentDetailEnvironm return agent_detail @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_detail_environment_configuration.py b/cirro_api_client/v1/models/agent_detail_environment_configuration.py index 9cbcaa4..f0990c5 100644 --- a/cirro_api_client/v1/models/agent_detail_environment_configuration.py +++ b/cirro_api_client/v1/models/agent_detail_environment_configuration.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class AgentDetailEnvironmentConfiguration: """ """ - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() agent_detail_environment_configuration = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return agent_detail_environment_configuration @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_detail_tags.py b/cirro_api_client/v1/models/agent_detail_tags.py index bb67ec2..fdd3e93 100644 --- a/cirro_api_client/v1/models/agent_detail_tags.py +++ b/cirro_api_client/v1/models/agent_detail_tags.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class AgentDetailTags: """ """ - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() agent_detail_tags = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return agent_detail_tags @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_input.py b/cirro_api_client/v1/models/agent_input.py index 0238673..bf7447e 100644 --- a/cirro_api_client/v1/models/agent_input.py +++ b/cirro_api_client/v1/models/agent_input.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -31,13 +31,13 @@ class AgentInput: name: str agent_role_arn: str - id: None | Unset | str = UNSET + id: Union[None, Unset, str] = UNSET configuration_options_schema: Union["AgentInputConfigurationOptionsSchema", None, Unset] = UNSET environment_configuration: Union["AgentInputEnvironmentConfiguration", None, Unset] = UNSET tags: Union["AgentInputTags", None, Unset] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: from ..models.agent_input_configuration_options_schema import AgentInputConfigurationOptionsSchema from ..models.agent_input_environment_configuration import AgentInputEnvironmentConfiguration from ..models.agent_input_tags import AgentInputTags @@ -46,13 +46,13 @@ def to_dict(self) -> dict[str, Any]: agent_role_arn = self.agent_role_arn - id: None | Unset | str + id: Union[None, Unset, str] if isinstance(self.id, Unset): id = UNSET else: id = self.id - configuration_options_schema: dict[str, Any] | None | Unset + configuration_options_schema: Union[Dict[str, Any], None, Unset] if isinstance(self.configuration_options_schema, Unset): configuration_options_schema = UNSET elif isinstance(self.configuration_options_schema, AgentInputConfigurationOptionsSchema): @@ -60,7 +60,7 @@ def to_dict(self) -> dict[str, Any]: else: configuration_options_schema = self.configuration_options_schema - environment_configuration: dict[str, Any] | None | Unset + environment_configuration: Union[Dict[str, Any], None, Unset] if isinstance(self.environment_configuration, Unset): environment_configuration = UNSET elif isinstance(self.environment_configuration, AgentInputEnvironmentConfiguration): @@ -68,7 +68,7 @@ def to_dict(self) -> dict[str, Any]: else: environment_configuration = self.environment_configuration - tags: dict[str, Any] | None | Unset + tags: Union[Dict[str, Any], None, Unset] if isinstance(self.tags, Unset): tags = UNSET elif isinstance(self.tags, AgentInputTags): @@ -76,7 +76,7 @@ def to_dict(self) -> dict[str, Any]: else: tags = self.tags - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -96,7 +96,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.agent_input_configuration_options_schema import AgentInputConfigurationOptionsSchema from ..models.agent_input_environment_configuration import AgentInputEnvironmentConfiguration from ..models.agent_input_tags import AgentInputTags @@ -106,12 +106,12 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: agent_role_arn = d.pop("agentRoleArn") - def _parse_id(data: object) -> None | Unset | str: + def _parse_id(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) id = _parse_id(d.pop("id", UNSET)) @@ -181,5 +181,5 @@ def _parse_tags(data: object) -> Union["AgentInputTags", None, Unset]: return agent_input @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_input_configuration_options_schema.py b/cirro_api_client/v1/models/agent_input_configuration_options_schema.py index 18fece7..af170ad 100644 --- a/cirro_api_client/v1/models/agent_input_configuration_options_schema.py +++ b/cirro_api_client/v1/models/agent_input_configuration_options_schema.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class AgentInputConfigurationOptionsSchema: """The configuration options available for the agent""" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() agent_input_configuration_options_schema = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return agent_input_configuration_options_schema @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_input_environment_configuration.py b/cirro_api_client/v1/models/agent_input_environment_configuration.py index a3d34fd..7c5ac6d 100644 --- a/cirro_api_client/v1/models/agent_input_environment_configuration.py +++ b/cirro_api_client/v1/models/agent_input_environment_configuration.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,17 +15,17 @@ class AgentInputEnvironmentConfiguration: """ - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() agent_input_environment_configuration = cls() @@ -33,5 +33,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return agent_input_environment_configuration @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_input_tags.py b/cirro_api_client/v1/models/agent_input_tags.py index 1cc7580..ccfba73 100644 --- a/cirro_api_client/v1/models/agent_input_tags.py +++ b/cirro_api_client/v1/models/agent_input_tags.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,17 +15,17 @@ class AgentInputTags: """ - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() agent_input_tags = cls() @@ -33,5 +33,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return agent_input_tags @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_registration.py b/cirro_api_client/v1/models/agent_registration.py index c3f18a5..1f2914f 100644 --- a/cirro_api_client/v1/models/agent_registration.py +++ b/cirro_api_client/v1/models/agent_registration.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +22,9 @@ class AgentRegistration: agent_version: str hostname: str os: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: local_ip = self.local_ip remote_ip = self.remote_ip @@ -35,7 +35,7 @@ def to_dict(self) -> dict[str, Any]: os = self.os - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -50,7 +50,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() local_ip = d.pop("localIp") @@ -74,5 +74,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return agent_registration @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/agent_tags.py b/cirro_api_client/v1/models/agent_tags.py index 8ef63d0..2da7cc5 100644 --- a/cirro_api_client/v1/models/agent_tags.py +++ b/cirro_api_client/v1/models/agent_tags.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class AgentTags: """Tags associated with the agent""" - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() agent_tags = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return agent_tags @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/allowed_data_type.py b/cirro_api_client/v1/models/allowed_data_type.py index a1e305d..f584e2c 100644 --- a/cirro_api_client/v1/models/allowed_data_type.py +++ b/cirro_api_client/v1/models/allowed_data_type.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,10 +21,10 @@ class AllowedDataType: description: str error_msg: str - allowed_patterns: list["FileNamePattern"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + allowed_patterns: List["FileNamePattern"] + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: description = self.description error_msg = self.error_msg @@ -34,7 +34,7 @@ def to_dict(self) -> dict[str, Any]: allowed_patterns_item = allowed_patterns_item_data.to_dict() allowed_patterns.append(allowed_patterns_item) - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -47,7 +47,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.file_name_pattern import FileNamePattern d = src_dict.copy() @@ -72,5 +72,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return allowed_data_type @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/approve_project_access_request.py b/cirro_api_client/v1/models/approve_project_access_request.py index 2770484..5f47c56 100644 --- a/cirro_api_client/v1/models/approve_project_access_request.py +++ b/cirro_api_client/v1/models/approve_project_access_request.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,12 +16,12 @@ class ApproveProjectAccessRequest: """ role: ProjectRole - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: role = self.role.value - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -32,7 +32,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() role = ProjectRole(d.pop("role")) @@ -44,5 +44,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return approve_project_access_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/artifact.py b/cirro_api_client/v1/models/artifact.py index a2ecd4f..f9c70fd 100644 --- a/cirro_api_client/v1/models/artifact.py +++ b/cirro_api_client/v1/models/artifact.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,14 +19,14 @@ class Artifact: type: ArtifactType path: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: type = self.type.value path = self.path - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -38,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() type = ArtifactType(d.pop("type")) @@ -53,5 +53,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return artifact @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/audit_event.py b/cirro_api_client/v1/models/audit_event.py index 7700104..6376582 100644 --- a/cirro_api_client/v1/models/audit_event.py +++ b/cirro_api_client/v1/models/audit_event.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -33,19 +33,19 @@ class AuditEvent: created_at (Union[Unset, datetime.datetime]): The date and time the event was created """ - id: Unset | str = UNSET - event_type: Unset | str = UNSET - project_id: Unset | str = UNSET - entity_id: Unset | str = UNSET - entity_type: Unset | str = UNSET + id: Union[Unset, str] = UNSET + event_type: Union[Unset, str] = UNSET + project_id: Union[Unset, str] = UNSET + entity_id: Union[Unset, str] = UNSET + entity_type: Union[Unset, str] = UNSET event_detail: Union["AuditEventEventDetail", None, Unset] = UNSET changes: Union["AuditEventChanges", None, Unset] = UNSET - username: Unset | str = UNSET - ip_address: Unset | str = UNSET - created_at: Unset | datetime.datetime = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + username: Union[Unset, str] = UNSET + ip_address: Union[Unset, str] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: from ..models.audit_event_changes import AuditEventChanges from ..models.audit_event_event_detail import AuditEventEventDetail @@ -59,7 +59,7 @@ def to_dict(self) -> dict[str, Any]: entity_type = self.entity_type - event_detail: dict[str, Any] | None | Unset + event_detail: Union[Dict[str, Any], None, Unset] if isinstance(self.event_detail, Unset): event_detail = UNSET elif isinstance(self.event_detail, AuditEventEventDetail): @@ -67,7 +67,7 @@ def to_dict(self) -> dict[str, Any]: else: event_detail = self.event_detail - changes: dict[str, Any] | None | Unset + changes: Union[Dict[str, Any], None, Unset] if isinstance(self.changes, Unset): changes = UNSET elif isinstance(self.changes, AuditEventChanges): @@ -79,11 +79,11 @@ def to_dict(self) -> dict[str, Any]: ip_address = self.ip_address - created_at: Unset | str = UNSET + created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if id is not UNSET: @@ -110,7 +110,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.audit_event_changes import AuditEventChanges from ..models.audit_event_event_detail import AuditEventEventDetail @@ -164,7 +164,7 @@ def _parse_changes(data: object) -> Union["AuditEventChanges", None, Unset]: ip_address = d.pop("ipAddress", UNSET) _created_at = d.pop("createdAt", UNSET) - created_at: Unset | datetime.datetime + created_at: Union[Unset, datetime.datetime] if isinstance(_created_at, Unset): created_at = UNSET else: @@ -187,5 +187,5 @@ def _parse_changes(data: object) -> Union["AuditEventChanges", None, Unset]: return audit_event @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/audit_event_changes.py b/cirro_api_client/v1/models/audit_event_changes.py index fc814c5..c99871f 100644 --- a/cirro_api_client/v1/models/audit_event_changes.py +++ b/cirro_api_client/v1/models/audit_event_changes.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,17 +15,17 @@ class AuditEventChanges: """ - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() audit_event_changes = cls() @@ -33,5 +33,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return audit_event_changes @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/audit_event_event_detail.py b/cirro_api_client/v1/models/audit_event_event_detail.py index c05d037..ca9ab44 100644 --- a/cirro_api_client/v1/models/audit_event_event_detail.py +++ b/cirro_api_client/v1/models/audit_event_event_detail.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class AuditEventEventDetail: """The details of the event, such as the request details sent from the client""" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() audit_event_event_detail = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return audit_event_event_detail @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/auth_info.py b/cirro_api_client/v1/models/auth_info.py index 3776f89..50cbf3a 100644 --- a/cirro_api_client/v1/models/auth_info.py +++ b/cirro_api_client/v1/models/auth_info.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +22,9 @@ class AuthInfo: ui_app_id: str drive_app_id: str endpoint: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: user_pool_id = self.user_pool_id sdk_app_id = self.sdk_app_id @@ -35,7 +35,7 @@ def to_dict(self) -> dict[str, Any]: endpoint = self.endpoint - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -50,7 +50,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() user_pool_id = d.pop("userPoolId") @@ -74,5 +74,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return auth_info @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/aws_credentials.py b/cirro_api_client/v1/models/aws_credentials.py index b66f042..b3854a6 100644 --- a/cirro_api_client/v1/models/aws_credentials.py +++ b/cirro_api_client/v1/models/aws_credentials.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,10 +25,10 @@ class AWSCredentials: secret_access_key: str session_token: str expiration: datetime.datetime - region: Unset | str = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + region: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: access_key_id = self.access_key_id secret_access_key = self.secret_access_key @@ -39,7 +39,7 @@ def to_dict(self) -> dict[str, Any]: region = self.region - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -55,7 +55,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() access_key_id = d.pop("accessKeyId") @@ -79,5 +79,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return aws_credentials @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/billing_account.py b/cirro_api_client/v1/models/billing_account.py index 86989d9..9c162a2 100644 --- a/cirro_api_client/v1/models/billing_account.py +++ b/cirro_api_client/v1/models/billing_account.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -32,16 +32,16 @@ class BillingAccount: id: str name: str organization: str - contacts: list["Contact"] + contacts: List["Contact"] customer_type: CustomerType billing_method: BillingMethod primary_budget_number: str owner: str - shared_with: list[str] + shared_with: List[str] is_archived: bool - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -65,7 +65,7 @@ def to_dict(self) -> dict[str, Any]: is_archived = self.is_archived - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -85,7 +85,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.contact import Contact d = src_dict.copy() @@ -110,7 +110,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: owner = d.pop("owner") - shared_with = cast(list[str], d.pop("sharedWith")) + shared_with = cast(List[str], d.pop("sharedWith")) is_archived = d.pop("isArchived") @@ -131,5 +131,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return billing_account @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/billing_account_request.py b/cirro_api_client/v1/models/billing_account_request.py index cd83db2..7351d24 100644 --- a/cirro_api_client/v1/models/billing_account_request.py +++ b/cirro_api_client/v1/models/billing_account_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -27,15 +27,15 @@ class BillingAccountRequest: """ name: str - contacts: list["Contact"] + contacts: List["Contact"] customer_type: CustomerType billing_method: BillingMethod primary_budget_number: str owner: str - shared_with: list[str] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + shared_with: List[str] + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name contacts = [] @@ -53,7 +53,7 @@ def to_dict(self) -> dict[str, Any]: shared_with = self.shared_with - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -70,7 +70,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.contact import Contact d = src_dict.copy() @@ -91,7 +91,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: owner = d.pop("owner") - shared_with = cast(list[str], d.pop("sharedWith")) + shared_with = cast(List[str], d.pop("sharedWith")) billing_account_request = cls( name=name, @@ -107,5 +107,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return billing_account_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/calculate_pipeline_cost_request.py b/cirro_api_client/v1/models/calculate_pipeline_cost_request.py index b22e89e..98ea5c6 100644 --- a/cirro_api_client/v1/models/calculate_pipeline_cost_request.py +++ b/cirro_api_client/v1/models/calculate_pipeline_cost_request.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class CalculatePipelineCostRequest: """ """ - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() calculate_pipeline_cost_request = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return calculate_pipeline_cost_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/classification_input.py b/cirro_api_client/v1/models/classification_input.py index 0b2432a..e202904 100644 --- a/cirro_api_client/v1/models/classification_input.py +++ b/cirro_api_client/v1/models/classification_input.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,17 +17,17 @@ class ClassificationInput: name: str description: str - requirement_ids: list[str] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + requirement_ids: List[str] + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name description = self.description requirement_ids = self.requirement_ids - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,13 +40,13 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") description = d.pop("description") - requirement_ids = cast(list[str], d.pop("requirementIds")) + requirement_ids = cast(List[str], d.pop("requirementIds")) classification_input = cls( name=name, @@ -58,5 +58,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return classification_input @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/cloud_account.py b/cirro_api_client/v1/models/cloud_account.py index 3f8d18d..04bade4 100644 --- a/cirro_api_client/v1/models/cloud_account.py +++ b/cirro_api_client/v1/models/cloud_account.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,12 +21,12 @@ class CloudAccount: """ account_type: CloudAccountType - account_id: Unset | str = UNSET - account_name: Unset | str = UNSET - region_name: Unset | str = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + account_id: Union[Unset, str] = UNSET + account_name: Union[Unset, str] = UNSET + region_name: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: account_type = self.account_type.value account_id = self.account_id @@ -35,7 +35,7 @@ def to_dict(self) -> dict[str, Any]: region_name = self.region_name - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -52,7 +52,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() account_type = CloudAccountType(d.pop("accountType")) @@ -73,5 +73,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return cloud_account @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/column_definition.py b/cirro_api_client/v1/models/column_definition.py index 339de1b..9b93224 100644 --- a/cirro_api_client/v1/models/column_definition.py +++ b/cirro_api_client/v1/models/column_definition.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,19 +17,19 @@ class ColumnDefinition: desc (Union[Unset, str]): Description of the column """ - col: Unset | str = UNSET - name: Unset | str = UNSET - desc: Unset | str = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + col: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + desc: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: col = self.col name = self.name desc = self.desc - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if col is not UNSET: @@ -42,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() col = d.pop("col", UNSET) @@ -60,5 +60,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return column_definition @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/compute_environment_configuration.py b/cirro_api_client/v1/models/compute_environment_configuration.py index da9be40..d4bbbb7 100644 --- a/cirro_api_client/v1/models/compute_environment_configuration.py +++ b/cirro_api_client/v1/models/compute_environment_configuration.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -34,14 +34,14 @@ class ComputeEnvironmentConfiguration: environment_type: EnvironmentType created_at: datetime.datetime updated_at: datetime.datetime - id: Unset | str = UNSET - name: Unset | str = UNSET + id: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET properties: Union[Unset, "ComputeEnvironmentConfigurationProperties"] = UNSET agent: Union["Agent", None, Unset] = UNSET - created_by: Unset | str = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + created_by: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: from ..models.agent import Agent environment_type = self.environment_type.value @@ -54,11 +54,11 @@ def to_dict(self) -> dict[str, Any]: name = self.name - properties: Unset | dict[str, Any] = UNSET + properties: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.properties, Unset): properties = self.properties.to_dict() - agent: dict[str, Any] | None | Unset + agent: Union[Dict[str, Any], None, Unset] if isinstance(self.agent, Unset): agent = UNSET elif isinstance(self.agent, Agent): @@ -68,7 +68,7 @@ def to_dict(self) -> dict[str, Any]: created_by = self.created_by - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -91,7 +91,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.agent import Agent from ..models.compute_environment_configuration_properties import ComputeEnvironmentConfigurationProperties @@ -107,7 +107,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: name = d.pop("name", UNSET) _properties = d.pop("properties", UNSET) - properties: Unset | ComputeEnvironmentConfigurationProperties + properties: Union[Unset, ComputeEnvironmentConfigurationProperties] if isinstance(_properties, Unset): properties = UNSET else: @@ -147,5 +147,5 @@ def _parse_agent(data: object) -> Union["Agent", None, Unset]: return compute_environment_configuration @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/compute_environment_configuration_input.py b/cirro_api_client/v1/models/compute_environment_configuration_input.py index 1a4fc4d..61591cc 100644 --- a/cirro_api_client/v1/models/compute_environment_configuration_input.py +++ b/cirro_api_client/v1/models/compute_environment_configuration_input.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,24 +24,24 @@ class ComputeEnvironmentConfigurationInput: """ name: str - agent_id: None | Unset | str = UNSET + agent_id: Union[None, Unset, str] = UNSET properties: Union["ComputeEnvironmentConfigurationInputProperties", None, Unset] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: from ..models.compute_environment_configuration_input_properties import ( ComputeEnvironmentConfigurationInputProperties, ) name = self.name - agent_id: None | Unset | str + agent_id: Union[None, Unset, str] if isinstance(self.agent_id, Unset): agent_id = UNSET else: agent_id = self.agent_id - properties: dict[str, Any] | None | Unset + properties: Union[Dict[str, Any], None, Unset] if isinstance(self.properties, Unset): properties = UNSET elif isinstance(self.properties, ComputeEnvironmentConfigurationInputProperties): @@ -49,7 +49,7 @@ def to_dict(self) -> dict[str, Any]: else: properties = self.properties - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -64,7 +64,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.compute_environment_configuration_input_properties import ( ComputeEnvironmentConfigurationInputProperties, ) @@ -72,12 +72,12 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") - def _parse_agent_id(data: object) -> None | Unset | str: + def _parse_agent_id(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) agent_id = _parse_agent_id(d.pop("agentId", UNSET)) @@ -108,5 +108,5 @@ def _parse_properties(data: object) -> Union["ComputeEnvironmentConfigurationInp return compute_environment_configuration_input @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/compute_environment_configuration_input_properties.py b/cirro_api_client/v1/models/compute_environment_configuration_input_properties.py index 22e33f3..0b06d10 100644 --- a/cirro_api_client/v1/models/compute_environment_configuration_input_properties.py +++ b/cirro_api_client/v1/models/compute_environment_configuration_input_properties.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class ComputeEnvironmentConfigurationInputProperties: """ """ - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() compute_environment_configuration_input_properties = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return compute_environment_configuration_input_properties @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/compute_environment_configuration_properties.py b/cirro_api_client/v1/models/compute_environment_configuration_properties.py index 11de835..88d17ce 100644 --- a/cirro_api_client/v1/models/compute_environment_configuration_properties.py +++ b/cirro_api_client/v1/models/compute_environment_configuration_properties.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class ComputeEnvironmentConfigurationProperties: """Configuration properties passed to the environment""" - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() compute_environment_configuration_properties = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return compute_environment_configuration_properties @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/contact.py b/cirro_api_client/v1/models/contact.py index 36c1064..163daed 100644 --- a/cirro_api_client/v1/models/contact.py +++ b/cirro_api_client/v1/models/contact.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,9 +20,9 @@ class Contact: organization: str email: str phone: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name organization = self.organization @@ -31,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: phone = self.phone - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -45,7 +45,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -66,5 +66,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return contact @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/contact_input.py b/cirro_api_client/v1/models/contact_input.py index 306d178..0a8a160 100644 --- a/cirro_api_client/v1/models/contact_input.py +++ b/cirro_api_client/v1/models/contact_input.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +22,9 @@ class ContactInput: name: str phone: str email: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: title = self.title description = self.description @@ -35,7 +35,7 @@ def to_dict(self) -> dict[str, Any]: email = self.email - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -50,7 +50,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() title = d.pop("title") @@ -74,5 +74,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return contact_input @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/cost_response.py b/cirro_api_client/v1/models/cost_response.py index 0b3492d..16eae86 100644 --- a/cirro_api_client/v1/models/cost_response.py +++ b/cirro_api_client/v1/models/cost_response.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,23 +23,23 @@ class CostResponse: is_estimate (Union[Unset, bool]): Whether this is an estimated cost """ - total_cost: Unset | float = UNSET - groups: Unset | list["GroupCost"] = UNSET - tasks: Unset | list["TaskCost"] = UNSET - is_estimate: Unset | bool = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + total_cost: Union[Unset, float] = UNSET + groups: Union[Unset, List["GroupCost"]] = UNSET + tasks: Union[Unset, List["TaskCost"]] = UNSET + is_estimate: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: total_cost = self.total_cost - groups: Unset | list[dict[str, Any]] = UNSET + groups: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.groups, Unset): groups = [] for groups_item_data in self.groups: groups_item = groups_item_data.to_dict() groups.append(groups_item) - tasks: Unset | list[dict[str, Any]] = UNSET + tasks: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.tasks, Unset): tasks = [] for tasks_item_data in self.tasks: @@ -48,7 +48,7 @@ def to_dict(self) -> dict[str, Any]: is_estimate = self.is_estimate - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if total_cost is not UNSET: @@ -63,7 +63,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.group_cost import GroupCost from ..models.task_cost import TaskCost @@ -97,5 +97,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return cost_response @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/create_notebook_instance_request.py b/cirro_api_client/v1/models/create_notebook_instance_request.py index 991b8c0..e08e2d0 100644 --- a/cirro_api_client/v1/models/create_notebook_instance_request.py +++ b/cirro_api_client/v1/models/create_notebook_instance_request.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,13 +23,13 @@ class CreateNotebookInstanceRequest: name: str instance_type: str - accelerator_types: list[str] + accelerator_types: List[str] volume_size_gb: int - git_repositories: list[str] | None | Unset = UNSET - is_shared_with_project: Unset | bool = False - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + git_repositories: Union[List[str], None, Unset] = UNSET + is_shared_with_project: Union[Unset, bool] = False + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name instance_type = self.instance_type @@ -38,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: volume_size_gb = self.volume_size_gb - git_repositories: list[str] | None | Unset + git_repositories: Union[List[str], None, Unset] if isinstance(self.git_repositories, Unset): git_repositories = UNSET elif isinstance(self.git_repositories, list): @@ -49,7 +49,7 @@ def to_dict(self) -> dict[str, Any]: is_shared_with_project = self.is_shared_with_project - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -67,17 +67,17 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") instance_type = d.pop("instanceType") - accelerator_types = cast(list[str], d.pop("acceleratorTypes")) + accelerator_types = cast(List[str], d.pop("acceleratorTypes")) volume_size_gb = d.pop("volumeSizeGB") - def _parse_git_repositories(data: object) -> list[str] | None | Unset: + def _parse_git_repositories(data: object) -> Union[List[str], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -85,12 +85,12 @@ def _parse_git_repositories(data: object) -> list[str] | None | Unset: try: if not isinstance(data, list): raise TypeError() - git_repositories_type_0 = cast(list[str], data) + git_repositories_type_0 = cast(List[str], data) return git_repositories_type_0 except: # noqa: E722 pass - return cast(list[str] | None | Unset, data) + return cast(Union[List[str], None, Unset], data) git_repositories = _parse_git_repositories(d.pop("gitRepositories", UNSET)) @@ -109,5 +109,5 @@ def _parse_git_repositories(data: object) -> list[str] | None | Unset: return create_notebook_instance_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/create_project_access_request.py b/cirro_api_client/v1/models/create_project_access_request.py index bde7483..494fb21 100644 --- a/cirro_api_client/v1/models/create_project_access_request.py +++ b/cirro_api_client/v1/models/create_project_access_request.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,14 +18,14 @@ class CreateProjectAccessRequest: role: ProjectRole message: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: role = self.role.value message = self.message - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -37,7 +37,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() role = ProjectRole(d.pop("role")) @@ -52,5 +52,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return create_project_access_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/create_reference_request.py b/cirro_api_client/v1/models/create_reference_request.py index 2e42104..7e860f1 100644 --- a/cirro_api_client/v1/models/create_reference_request.py +++ b/cirro_api_client/v1/models/create_reference_request.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,10 +19,10 @@ class CreateReferenceRequest: name: str description: str type: str - expected_files: list[str] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + expected_files: List[str] + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name description = self.description @@ -31,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: expected_files = self.expected_files - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -45,7 +45,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -53,7 +53,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: type = d.pop("type") - expected_files = cast(list[str], d.pop("expectedFiles")) + expected_files = cast(List[str], d.pop("expectedFiles")) create_reference_request = cls( name=name, @@ -66,5 +66,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return create_reference_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/create_response.py b/cirro_api_client/v1/models/create_response.py index f8927b3..2798030 100644 --- a/cirro_api_client/v1/models/create_response.py +++ b/cirro_api_client/v1/models/create_response.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class CreateResponse: id: str message: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id message = self.message - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,7 +35,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -50,5 +50,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return create_response @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/custom_pipeline_settings.py b/cirro_api_client/v1/models/custom_pipeline_settings.py index 018b43f..aba1b06 100644 --- a/cirro_api_client/v1/models/custom_pipeline_settings.py +++ b/cirro_api_client/v1/models/custom_pipeline_settings.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -29,23 +29,23 @@ class CustomPipelineSettings: """ repository: str - branch: Unset | str = "main" - folder: Unset | str = ".cirro" - repository_type: None | RepositoryType | Unset = UNSET - last_sync: None | Unset | datetime.datetime = UNSET - sync_status: None | SyncStatus | Unset = UNSET - commit_hash: None | Unset | str = UNSET - is_authorized: Unset | bool = False - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: + branch: Union[Unset, str] = "main" + folder: Union[Unset, str] = ".cirro" + repository_type: Union[None, RepositoryType, Unset] = UNSET + last_sync: Union[None, Unset, datetime.datetime] = UNSET + sync_status: Union[None, SyncStatus, Unset] = UNSET + commit_hash: Union[None, Unset, str] = UNSET + is_authorized: Union[Unset, bool] = False + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: repository = self.repository branch = self.branch folder = self.folder - repository_type: None | Unset | str + repository_type: Union[None, Unset, str] if isinstance(self.repository_type, Unset): repository_type = UNSET elif isinstance(self.repository_type, RepositoryType): @@ -53,7 +53,7 @@ def to_dict(self) -> dict[str, Any]: else: repository_type = self.repository_type - last_sync: None | Unset | str + last_sync: Union[None, Unset, str] if isinstance(self.last_sync, Unset): last_sync = UNSET elif isinstance(self.last_sync, datetime.datetime): @@ -61,7 +61,7 @@ def to_dict(self) -> dict[str, Any]: else: last_sync = self.last_sync - sync_status: None | Unset | str + sync_status: Union[None, Unset, str] if isinstance(self.sync_status, Unset): sync_status = UNSET elif isinstance(self.sync_status, SyncStatus): @@ -69,7 +69,7 @@ def to_dict(self) -> dict[str, Any]: else: sync_status = self.sync_status - commit_hash: None | Unset | str + commit_hash: Union[None, Unset, str] if isinstance(self.commit_hash, Unset): commit_hash = UNSET else: @@ -77,7 +77,7 @@ def to_dict(self) -> dict[str, Any]: is_authorized = self.is_authorized - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -102,7 +102,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() repository = d.pop("repository") @@ -110,7 +110,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: folder = d.pop("folder", UNSET) - def _parse_repository_type(data: object) -> None | RepositoryType | Unset: + def _parse_repository_type(data: object) -> Union[None, RepositoryType, Unset]: if data is None: return data if isinstance(data, Unset): @@ -123,11 +123,11 @@ def _parse_repository_type(data: object) -> None | RepositoryType | Unset: return repository_type_type_1 except: # noqa: E722 pass - return cast(None | RepositoryType | Unset, data) + return cast(Union[None, RepositoryType, Unset], data) repository_type = _parse_repository_type(d.pop("repositoryType", UNSET)) - def _parse_last_sync(data: object) -> None | Unset | datetime.datetime: + def _parse_last_sync(data: object) -> Union[None, Unset, datetime.datetime]: if data is None: return data if isinstance(data, Unset): @@ -140,11 +140,11 @@ def _parse_last_sync(data: object) -> None | Unset | datetime.datetime: return last_sync_type_0 except: # noqa: E722 pass - return cast(None | Unset | datetime.datetime, data) + return cast(Union[None, Unset, datetime.datetime], data) last_sync = _parse_last_sync(d.pop("lastSync", UNSET)) - def _parse_sync_status(data: object) -> None | SyncStatus | Unset: + def _parse_sync_status(data: object) -> Union[None, SyncStatus, Unset]: if data is None: return data if isinstance(data, Unset): @@ -157,16 +157,16 @@ def _parse_sync_status(data: object) -> None | SyncStatus | Unset: return sync_status_type_1 except: # noqa: E722 pass - return cast(None | SyncStatus | Unset, data) + return cast(Union[None, SyncStatus, Unset], data) sync_status = _parse_sync_status(d.pop("syncStatus", UNSET)) - def _parse_commit_hash(data: object) -> None | Unset | str: + def _parse_commit_hash(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) commit_hash = _parse_commit_hash(d.pop("commitHash", UNSET)) @@ -187,5 +187,5 @@ def _parse_commit_hash(data: object) -> None | Unset | str: return custom_pipeline_settings @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/custom_process_input.py b/cirro_api_client/v1/models/custom_process_input.py index 36839fe..5ccb4c9 100644 --- a/cirro_api_client/v1/models/custom_process_input.py +++ b/cirro_api_client/v1/models/custom_process_input.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -45,22 +45,22 @@ class CustomProcessInput: name: str description: str executor: Executor - child_process_ids: list[str] - parent_process_ids: list[str] - linked_project_ids: list[str] - data_type: None | Unset | str = UNSET - category: Unset | str = UNSET - documentation_url: None | Unset | str = UNSET - file_requirements_message: None | Unset | str = UNSET + child_process_ids: List[str] + parent_process_ids: List[str] + linked_project_ids: List[str] + data_type: Union[None, Unset, str] = UNSET + category: Union[Unset, str] = UNSET + documentation_url: Union[None, Unset, str] = UNSET + file_requirements_message: Union[None, Unset, str] = UNSET pipeline_code: Union["PipelineCode", None, Unset] = UNSET - is_tenant_wide: Unset | bool = UNSET - allow_multiple_sources: Unset | bool = UNSET - uses_sample_sheet: Unset | bool = UNSET + is_tenant_wide: Union[Unset, bool] = UNSET + allow_multiple_sources: Union[Unset, bool] = UNSET + uses_sample_sheet: Union[Unset, bool] = UNSET custom_settings: Union["CustomPipelineSettings", None, Unset] = UNSET - file_mapping_rules: list["FileMappingRule"] | None | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + file_mapping_rules: Union[List["FileMappingRule"], None, Unset] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: from ..models.custom_pipeline_settings import CustomPipelineSettings from ..models.pipeline_code import PipelineCode @@ -78,7 +78,7 @@ def to_dict(self) -> dict[str, Any]: linked_project_ids = self.linked_project_ids - data_type: None | Unset | str + data_type: Union[None, Unset, str] if isinstance(self.data_type, Unset): data_type = UNSET else: @@ -86,19 +86,19 @@ def to_dict(self) -> dict[str, Any]: category = self.category - documentation_url: None | Unset | str + documentation_url: Union[None, Unset, str] if isinstance(self.documentation_url, Unset): documentation_url = UNSET else: documentation_url = self.documentation_url - file_requirements_message: None | Unset | str + file_requirements_message: Union[None, Unset, str] if isinstance(self.file_requirements_message, Unset): file_requirements_message = UNSET else: file_requirements_message = self.file_requirements_message - pipeline_code: dict[str, Any] | None | Unset + pipeline_code: Union[Dict[str, Any], None, Unset] if isinstance(self.pipeline_code, Unset): pipeline_code = UNSET elif isinstance(self.pipeline_code, PipelineCode): @@ -112,7 +112,7 @@ def to_dict(self) -> dict[str, Any]: uses_sample_sheet = self.uses_sample_sheet - custom_settings: dict[str, Any] | None | Unset + custom_settings: Union[Dict[str, Any], None, Unset] if isinstance(self.custom_settings, Unset): custom_settings = UNSET elif isinstance(self.custom_settings, CustomPipelineSettings): @@ -120,7 +120,7 @@ def to_dict(self) -> dict[str, Any]: else: custom_settings = self.custom_settings - file_mapping_rules: list[dict[str, Any]] | None | Unset + file_mapping_rules: Union[List[Dict[str, Any]], None, Unset] if isinstance(self.file_mapping_rules, Unset): file_mapping_rules = UNSET elif isinstance(self.file_mapping_rules, list): @@ -132,7 +132,7 @@ def to_dict(self) -> dict[str, Any]: else: file_mapping_rules = self.file_mapping_rules - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -169,7 +169,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.custom_pipeline_settings import CustomPipelineSettings from ..models.file_mapping_rule import FileMappingRule from ..models.pipeline_code import PipelineCode @@ -183,38 +183,38 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: executor = Executor(d.pop("executor")) - child_process_ids = cast(list[str], d.pop("childProcessIds")) + child_process_ids = cast(List[str], d.pop("childProcessIds")) - parent_process_ids = cast(list[str], d.pop("parentProcessIds")) + parent_process_ids = cast(List[str], d.pop("parentProcessIds")) - linked_project_ids = cast(list[str], d.pop("linkedProjectIds")) + linked_project_ids = cast(List[str], d.pop("linkedProjectIds")) - def _parse_data_type(data: object) -> None | Unset | str: + def _parse_data_type(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) data_type = _parse_data_type(d.pop("dataType", UNSET)) category = d.pop("category", UNSET) - def _parse_documentation_url(data: object) -> None | Unset | str: + def _parse_documentation_url(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) documentation_url = _parse_documentation_url(d.pop("documentationUrl", UNSET)) - def _parse_file_requirements_message(data: object) -> None | Unset | str: + def _parse_file_requirements_message(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) file_requirements_message = _parse_file_requirements_message(d.pop("fileRequirementsMessage", UNSET)) @@ -258,7 +258,7 @@ def _parse_custom_settings(data: object) -> Union["CustomPipelineSettings", None custom_settings = _parse_custom_settings(d.pop("customSettings", UNSET)) - def _parse_file_mapping_rules(data: object) -> list["FileMappingRule"] | None | Unset: + def _parse_file_mapping_rules(data: object) -> Union[List["FileMappingRule"], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -276,7 +276,7 @@ def _parse_file_mapping_rules(data: object) -> list["FileMappingRule"] | None | return file_mapping_rules_type_0 except: # noqa: E722 pass - return cast(list["FileMappingRule"] | None | Unset, data) + return cast(Union[List["FileMappingRule"], None, Unset], data) file_mapping_rules = _parse_file_mapping_rules(d.pop("fileMappingRules", UNSET)) @@ -304,5 +304,5 @@ def _parse_file_mapping_rules(data: object) -> list["FileMappingRule"] | None | return custom_process_input @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dashboard.py b/cirro_api_client/v1/models/dashboard.py index 434c052..7224b38 100644 --- a/cirro_api_client/v1/models/dashboard.py +++ b/cirro_api_client/v1/models/dashboard.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -33,15 +33,15 @@ class Dashboard: id: str name: str description: str - process_ids: list[str] + process_ids: List[str] created_by: str created_at: datetime.datetime updated_at: datetime.datetime dashboard_data: Union[Unset, "DashboardDashboardData"] = UNSET info: Union[Unset, "DashboardInfo"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -56,15 +56,15 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at.isoformat() - dashboard_data: Unset | dict[str, Any] = UNSET + dashboard_data: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.dashboard_data, Unset): dashboard_data = self.dashboard_data.to_dict() - info: Unset | dict[str, Any] = UNSET + info: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.info, Unset): info = self.info.to_dict() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -85,7 +85,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.dashboard_dashboard_data import DashboardDashboardData from ..models.dashboard_info import DashboardInfo @@ -96,7 +96,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: description = d.pop("description") - process_ids = cast(list[str], d.pop("processIds")) + process_ids = cast(List[str], d.pop("processIds")) created_by = d.pop("createdBy") @@ -105,14 +105,14 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: updated_at = isoparse(d.pop("updatedAt")) _dashboard_data = d.pop("dashboardData", UNSET) - dashboard_data: Unset | DashboardDashboardData + dashboard_data: Union[Unset, DashboardDashboardData] if isinstance(_dashboard_data, Unset): dashboard_data = UNSET else: dashboard_data = DashboardDashboardData.from_dict(_dashboard_data) _info = d.pop("info", UNSET) - info: Unset | DashboardInfo + info: Union[Unset, DashboardInfo] if isinstance(_info, Unset): info = UNSET else: @@ -134,5 +134,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return dashboard @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dashboard_dashboard_data.py b/cirro_api_client/v1/models/dashboard_dashboard_data.py index 1af0f2e..f65feee 100644 --- a/cirro_api_client/v1/models/dashboard_dashboard_data.py +++ b/cirro_api_client/v1/models/dashboard_dashboard_data.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class DashboardDashboardData: """ """ - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() dashboard_dashboard_data = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return dashboard_dashboard_data @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dashboard_info.py b/cirro_api_client/v1/models/dashboard_info.py index 71785ca..9df6aff 100644 --- a/cirro_api_client/v1/models/dashboard_info.py +++ b/cirro_api_client/v1/models/dashboard_info.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class DashboardInfo: """ """ - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() dashboard_info = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return dashboard_info @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dashboard_request.py b/cirro_api_client/v1/models/dashboard_request.py index be0d9f6..358eb79 100644 --- a/cirro_api_client/v1/models/dashboard_request.py +++ b/cirro_api_client/v1/models/dashboard_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,27 +26,27 @@ class DashboardRequest: name: str description: str - process_ids: list[str] + process_ids: List[str] dashboard_data: Union[Unset, "DashboardRequestDashboardData"] = UNSET info: Union[Unset, "DashboardRequestInfo"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name description = self.description process_ids = self.process_ids - dashboard_data: Unset | dict[str, Any] = UNSET + dashboard_data: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.dashboard_data, Unset): dashboard_data = self.dashboard_data.to_dict() - info: Unset | dict[str, Any] = UNSET + info: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.info, Unset): info = self.info.to_dict() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -63,7 +63,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.dashboard_request_dashboard_data import DashboardRequestDashboardData from ..models.dashboard_request_info import DashboardRequestInfo @@ -72,17 +72,17 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: description = d.pop("description") - process_ids = cast(list[str], d.pop("processIds")) + process_ids = cast(List[str], d.pop("processIds")) _dashboard_data = d.pop("dashboardData", UNSET) - dashboard_data: Unset | DashboardRequestDashboardData + dashboard_data: Union[Unset, DashboardRequestDashboardData] if isinstance(_dashboard_data, Unset): dashboard_data = UNSET else: dashboard_data = DashboardRequestDashboardData.from_dict(_dashboard_data) _info = d.pop("info", UNSET) - info: Unset | DashboardRequestInfo + info: Union[Unset, DashboardRequestInfo] if isinstance(_info, Unset): info = UNSET else: @@ -100,5 +100,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return dashboard_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dashboard_request_dashboard_data.py b/cirro_api_client/v1/models/dashboard_request_dashboard_data.py index 53a3fb3..21e68ab 100644 --- a/cirro_api_client/v1/models/dashboard_request_dashboard_data.py +++ b/cirro_api_client/v1/models/dashboard_request_dashboard_data.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class DashboardRequestDashboardData: """ """ - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() dashboard_request_dashboard_data = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return dashboard_request_dashboard_data @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dashboard_request_info.py b/cirro_api_client/v1/models/dashboard_request_info.py index 2381482..69c7b1d 100644 --- a/cirro_api_client/v1/models/dashboard_request_info.py +++ b/cirro_api_client/v1/models/dashboard_request_info.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class DashboardRequestInfo: """ """ - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() dashboard_request_info = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return dashboard_request_info @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/data_file.py b/cirro_api_client/v1/models/data_file.py index 158e080..86a00cc 100644 --- a/cirro_api_client/v1/models/data_file.py +++ b/cirro_api_client/v1/models/data_file.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,14 +20,14 @@ class DataFile: path: str metadata: "DataFileMetadata" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: path = self.path metadata = self.metadata.to_dict() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -39,7 +39,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.data_file_metadata import DataFileMetadata d = src_dict.copy() @@ -56,5 +56,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return data_file @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/data_file_metadata.py b/cirro_api_client/v1/models/data_file_metadata.py index e6dc777..1080d87 100644 --- a/cirro_api_client/v1/models/data_file_metadata.py +++ b/cirro_api_client/v1/models/data_file_metadata.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class DataFileMetadata: """ """ - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() data_file_metadata = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return data_file_metadata @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset.py b/cirro_api_client/v1/models/dataset.py index c8f5e73..b60afaf 100644 --- a/cirro_api_client/v1/models/dataset.py +++ b/cirro_api_client/v1/models/dataset.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -36,15 +36,15 @@ class Dataset: description: str project_id: str process_id: str - source_dataset_ids: list[str] + source_dataset_ids: List[str] status: Status - tags: list["Tag"] + tags: List["Tag"] created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -70,7 +70,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -91,7 +91,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.tag import Tag d = src_dict.copy() @@ -105,7 +105,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: process_id = d.pop("processId") - source_dataset_ids = cast(list[str], d.pop("sourceDatasetIds")) + source_dataset_ids = cast(List[str], d.pop("sourceDatasetIds")) status = Status(d.pop("status")) @@ -140,5 +140,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return dataset @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_assets_manifest.py b/cirro_api_client/v1/models/dataset_assets_manifest.py index 2eaaae7..1890850 100644 --- a/cirro_api_client/v1/models/dataset_assets_manifest.py +++ b/cirro_api_client/v1/models/dataset_assets_manifest.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -27,18 +27,18 @@ class DatasetAssetsManifest: artifacts (Union[Unset, List['Artifact']]): Artifacts associated with the dataset """ - domain: Unset | str = UNSET - files: Unset | list["FileEntry"] = UNSET - total_files: Unset | int = UNSET - viz: Unset | list["DatasetViz"] = UNSET - tables: Unset | list["Table"] = UNSET - artifacts: Unset | list["Artifact"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + domain: Union[Unset, str] = UNSET + files: Union[Unset, List["FileEntry"]] = UNSET + total_files: Union[Unset, int] = UNSET + viz: Union[Unset, List["DatasetViz"]] = UNSET + tables: Union[Unset, List["Table"]] = UNSET + artifacts: Union[Unset, List["Artifact"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: domain = self.domain - files: Unset | list[dict[str, Any]] = UNSET + files: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.files, Unset): files = [] for files_item_data in self.files: @@ -47,28 +47,28 @@ def to_dict(self) -> dict[str, Any]: total_files = self.total_files - viz: Unset | list[dict[str, Any]] = UNSET + viz: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.viz, Unset): viz = [] for viz_item_data in self.viz: viz_item = viz_item_data.to_dict() viz.append(viz_item) - tables: Unset | list[dict[str, Any]] = UNSET + tables: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.tables, Unset): tables = [] for tables_item_data in self.tables: tables_item = tables_item_data.to_dict() tables.append(tables_item) - artifacts: Unset | list[dict[str, Any]] = UNSET + artifacts: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.artifacts, Unset): artifacts = [] for artifacts_item_data in self.artifacts: artifacts_item = artifacts_item_data.to_dict() artifacts.append(artifacts_item) - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if domain is not UNSET: @@ -87,7 +87,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.artifact import Artifact from ..models.dataset_viz import DatasetViz from ..models.file_entry import FileEntry @@ -139,5 +139,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return dataset_assets_manifest @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_condition.py b/cirro_api_client/v1/models/dataset_condition.py index 5e5b161..208ea02 100644 --- a/cirro_api_client/v1/models/dataset_condition.py +++ b/cirro_api_client/v1/models/dataset_condition.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,14 +18,14 @@ class DatasetCondition: field: DatasetConditionField value: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: field = self.field.value value = self.value - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -37,7 +37,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() field = DatasetConditionField(d.pop("field")) @@ -52,5 +52,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return dataset_condition @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_detail.py b/cirro_api_client/v1/models/dataset_detail.py index 77b4275..b892146 100644 --- a/cirro_api_client/v1/models/dataset_detail.py +++ b/cirro_api_client/v1/models/dataset_detail.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -55,25 +55,25 @@ class DatasetDetail: s3: str process_id: str project_id: str - source_dataset_ids: list[str] - source_datasets: list["NamedItem"] - source_sample_ids: list[str] + source_dataset_ids: List[str] + source_datasets: List["NamedItem"] + source_sample_ids: List[str] source_sample_files_map: "DatasetDetailSourceSampleFilesMap" status: Status status_message: str - tags: list["Tag"] + tags: List["Tag"] params: "DatasetDetailParams" info: "DatasetDetailInfo" is_view_restricted: bool created_by: str created_at: datetime.datetime updated_at: datetime.datetime - originating_project_id: Unset | str = UNSET + originating_project_id: Union[Unset, str] = UNSET share: Union["NamedItem", None, Unset] = UNSET - total_size_bytes: None | Unset | int = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + total_size_bytes: Union[None, Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: from ..models.named_item import NamedItem id = self.id @@ -122,7 +122,7 @@ def to_dict(self) -> dict[str, Any]: originating_project_id = self.originating_project_id - share: dict[str, Any] | None | Unset + share: Union[Dict[str, Any], None, Unset] if isinstance(self.share, Unset): share = UNSET elif isinstance(self.share, NamedItem): @@ -130,13 +130,13 @@ def to_dict(self) -> dict[str, Any]: else: share = self.share - total_size_bytes: None | Unset | int + total_size_bytes: Union[None, Unset, int] if isinstance(self.total_size_bytes, Unset): total_size_bytes = UNSET else: total_size_bytes = self.total_size_bytes - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -171,7 +171,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.dataset_detail_info import DatasetDetailInfo from ..models.dataset_detail_params import DatasetDetailParams from ..models.dataset_detail_source_sample_files_map import DatasetDetailSourceSampleFilesMap @@ -191,7 +191,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: project_id = d.pop("projectId") - source_dataset_ids = cast(list[str], d.pop("sourceDatasetIds")) + source_dataset_ids = cast(List[str], d.pop("sourceDatasetIds")) source_datasets = [] _source_datasets = d.pop("sourceDatasets") @@ -200,7 +200,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: source_datasets.append(source_datasets_item) - source_sample_ids = cast(list[str], d.pop("sourceSampleIds")) + source_sample_ids = cast(List[str], d.pop("sourceSampleIds")) source_sample_files_map = DatasetDetailSourceSampleFilesMap.from_dict(d.pop("sourceSampleFilesMap")) @@ -246,12 +246,12 @@ def _parse_share(data: object) -> Union["NamedItem", None, Unset]: share = _parse_share(d.pop("share", UNSET)) - def _parse_total_size_bytes(data: object) -> None | Unset | int: + def _parse_total_size_bytes(data: object) -> Union[None, Unset, int]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(Union[None, Unset, int], data) total_size_bytes = _parse_total_size_bytes(d.pop("totalSizeBytes", UNSET)) @@ -284,5 +284,5 @@ def _parse_total_size_bytes(data: object) -> None | Unset | int: return dataset_detail @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_detail_info.py b/cirro_api_client/v1/models/dataset_detail_info.py index 9638afb..81e6604 100644 --- a/cirro_api_client/v1/models/dataset_detail_info.py +++ b/cirro_api_client/v1/models/dataset_detail_info.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class DatasetDetailInfo: """ """ - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() dataset_detail_info = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return dataset_detail_info @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_detail_params.py b/cirro_api_client/v1/models/dataset_detail_params.py index 2f11055..30c09a3 100644 --- a/cirro_api_client/v1/models/dataset_detail_params.py +++ b/cirro_api_client/v1/models/dataset_detail_params.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class DatasetDetailParams: """ """ - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() dataset_detail_params = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return dataset_detail_params @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_detail_source_sample_files_map.py b/cirro_api_client/v1/models/dataset_detail_source_sample_files_map.py index 52778c7..9dc26ef 100644 --- a/cirro_api_client/v1/models/dataset_detail_source_sample_files_map.py +++ b/cirro_api_client/v1/models/dataset_detail_source_sample_files_map.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,10 +10,10 @@ class DatasetDetailSourceSampleFilesMap: """Keys are sampleIds, and the lists are file paths to include.""" - additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, List[str]] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = prop @@ -22,13 +22,13 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() dataset_detail_source_sample_files_map = cls() additional_properties = {} for prop_name, prop_dict in d.items(): - additional_property = cast(list[str], prop_dict) + additional_property = cast(List[str], prop_dict) additional_properties[prop_name] = additional_property @@ -36,5 +36,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return dataset_detail_source_sample_files_map @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_viz.py b/cirro_api_client/v1/models/dataset_viz.py index 9c12578..4d4b24d 100644 --- a/cirro_api_client/v1/models/dataset_viz.py +++ b/cirro_api_client/v1/models/dataset_viz.py @@ -1,5 +1,4 @@ -import builtins -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,14 +23,14 @@ class DatasetViz: config (Union[Unset, DatasetVizConfig]): Config or path to config used to render viz """ - path: Unset | str = UNSET - name: Unset | str = UNSET - desc: Unset | str = UNSET - type: Unset | str = UNSET + path: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + desc: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET config: Union[Unset, "DatasetVizConfig"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: path = self.path name = self.name @@ -40,11 +39,11 @@ def to_dict(self) -> dict[str, Any]: type = self.type - config: Unset | dict[str, Any] = UNSET + config: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.config, Unset): config = self.config.to_dict() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if path is not UNSET: @@ -61,7 +60,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: builtins.type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.dataset_viz_config import DatasetVizConfig d = src_dict.copy() @@ -74,7 +73,7 @@ def from_dict(cls: builtins.type[T], src_dict: dict[str, Any]) -> T: type = d.pop("type", UNSET) _config = d.pop("config", UNSET) - config: Unset | DatasetVizConfig + config: Union[Unset, DatasetVizConfig] if isinstance(_config, Unset): config = UNSET else: @@ -92,5 +91,5 @@ def from_dict(cls: builtins.type[T], src_dict: dict[str, Any]) -> T: return dataset_viz @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/dataset_viz_config.py b/cirro_api_client/v1/models/dataset_viz_config.py index 7486442..7cd5cff 100644 --- a/cirro_api_client/v1/models/dataset_viz_config.py +++ b/cirro_api_client/v1/models/dataset_viz_config.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class DatasetVizConfig: """Config or path to config used to render viz""" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() dataset_viz_config = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return dataset_viz_config @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/discussion.py b/cirro_api_client/v1/models/discussion.py index 6f1bb96..51e0f57 100644 --- a/cirro_api_client/v1/models/discussion.py +++ b/cirro_api_client/v1/models/discussion.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -40,9 +40,9 @@ class Discussion: last_message_time: datetime.datetime created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -63,7 +63,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -83,7 +83,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.entity import Entity d = src_dict.copy() @@ -124,5 +124,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return discussion @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/discussion_input.py b/cirro_api_client/v1/models/discussion_input.py index 3e5a19e..a158b86 100644 --- a/cirro_api_client/v1/models/discussion_input.py +++ b/cirro_api_client/v1/models/discussion_input.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,9 +28,9 @@ class DiscussionInput: entity: "Entity" type: DiscussionType project_id: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name description = self.description @@ -41,7 +41,7 @@ def to_dict(self) -> dict[str, Any]: project_id = self.project_id - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.entity import Entity d = src_dict.copy() @@ -82,5 +82,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return discussion_input @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/entity.py b/cirro_api_client/v1/models/entity.py index 92ad5c2..3dfcd49 100644 --- a/cirro_api_client/v1/models/entity.py +++ b/cirro_api_client/v1/models/entity.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,14 +18,14 @@ class Entity: type: EntityType id: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: type = self.type.value id = self.id - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -37,7 +37,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() type = EntityType(d.pop("type")) @@ -52,5 +52,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return entity @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/error_message.py b/cirro_api_client/v1/models/error_message.py index 7e7b7c3..c25cfd9 100644 --- a/cirro_api_client/v1/models/error_message.py +++ b/cirro_api_client/v1/models/error_message.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,12 +14,12 @@ class ErrorMessage: """ message: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: message = self.message - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -30,7 +30,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() message = d.pop("message") @@ -42,5 +42,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return error_message @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/feature_flags.py b/cirro_api_client/v1/models/feature_flags.py index 7615466..3107594 100644 --- a/cirro_api_client/v1/models/feature_flags.py +++ b/cirro_api_client/v1/models/feature_flags.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +22,9 @@ class FeatureFlags: project_requests_enabled: bool workspaces_enabled: bool drive_enabled: bool - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: sftp_enabled = self.sftp_enabled governance_enabled = self.governance_enabled @@ -35,7 +35,7 @@ def to_dict(self) -> dict[str, Any]: drive_enabled = self.drive_enabled - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -50,7 +50,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() sftp_enabled = d.pop("sftpEnabled") @@ -74,5 +74,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return feature_flags @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/file_entry.py b/cirro_api_client/v1/models/file_entry.py index 86b41b7..9aa3602 100644 --- a/cirro_api_client/v1/models/file_entry.py +++ b/cirro_api_client/v1/models/file_entry.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,21 +21,21 @@ class FileEntry: metadata (Union[Unset, FileEntryMetadata]): Metadata associated with the file Example: {'read': 1}. """ - path: Unset | str = UNSET - size: Unset | int = UNSET + path: Union[Unset, str] = UNSET + size: Union[Unset, int] = UNSET metadata: Union[Unset, "FileEntryMetadata"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: path = self.path size = self.size - metadata: Unset | dict[str, Any] = UNSET + metadata: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if path is not UNSET: @@ -48,7 +48,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.file_entry_metadata import FileEntryMetadata d = src_dict.copy() @@ -57,7 +57,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: size = d.pop("size", UNSET) _metadata = d.pop("metadata", UNSET) - metadata: Unset | FileEntryMetadata + metadata: Union[Unset, FileEntryMetadata] if isinstance(_metadata, Unset): metadata = UNSET else: @@ -73,5 +73,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return file_entry @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/file_entry_metadata.py b/cirro_api_client/v1/models/file_entry_metadata.py index 3ca09c8..b44803d 100644 --- a/cirro_api_client/v1/models/file_entry_metadata.py +++ b/cirro_api_client/v1/models/file_entry_metadata.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,17 +15,17 @@ class FileEntryMetadata: """ - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() file_entry_metadata = cls() @@ -33,5 +33,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return file_entry_metadata @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/file_mapping_rule.py b/cirro_api_client/v1/models/file_mapping_rule.py index 0caa0f7..6a322e8 100644 --- a/cirro_api_client/v1/models/file_mapping_rule.py +++ b/cirro_api_client/v1/models/file_mapping_rule.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,13 +25,13 @@ class FileMappingRule: """ description: str - file_name_patterns: list["FileNamePattern"] - min_: Unset | int = UNSET - max_: Unset | int = UNSET - is_sample: Unset | bool = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + file_name_patterns: List["FileNamePattern"] + min_: Union[Unset, int] = UNSET + max_: Union[Unset, int] = UNSET + is_sample: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: description = self.description file_name_patterns = [] @@ -45,7 +45,7 @@ def to_dict(self) -> dict[str, Any]: is_sample = self.is_sample - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -63,7 +63,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.file_name_pattern import FileNamePattern d = src_dict.copy() @@ -94,5 +94,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return file_mapping_rule @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/file_name_match.py b/cirro_api_client/v1/models/file_name_match.py index 77dd615..dc89802 100644 --- a/cirro_api_client/v1/models/file_name_match.py +++ b/cirro_api_client/v1/models/file_name_match.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,16 +18,16 @@ class FileNameMatch: file_name: str sample_name: str regex_pattern_match: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: file_name = self.file_name sample_name = self.sample_name regex_pattern_match = self.regex_pattern_match - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,7 +40,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() file_name = d.pop("fileName") @@ -58,5 +58,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return file_name_match @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/file_name_pattern.py b/cirro_api_client/v1/models/file_name_pattern.py index b9cc4bd..1dbc48f 100644 --- a/cirro_api_client/v1/models/file_name_pattern.py +++ b/cirro_api_client/v1/models/file_name_pattern.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,21 +20,21 @@ class FileNamePattern: example_name: str sample_matching_pattern: str - description: None | Unset | str = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + description: Union[None, Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: example_name = self.example_name sample_matching_pattern = self.sample_matching_pattern - description: None | Unset | str + description: Union[None, Unset, str] if isinstance(self.description, Unset): description = UNSET else: description = self.description - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -48,18 +48,18 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() example_name = d.pop("exampleName") sample_matching_pattern = d.pop("sampleMatchingPattern") - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) description = _parse_description(d.pop("description", UNSET)) @@ -73,5 +73,5 @@ def _parse_description(data: object) -> None | Unset | str: return file_name_pattern @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/file_requirements.py b/cirro_api_client/v1/models/file_requirements.py index 6ebd0e6..0c01843 100644 --- a/cirro_api_client/v1/models/file_requirements.py +++ b/cirro_api_client/v1/models/file_requirements.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,12 +19,12 @@ class FileRequirements: allowed_data_types (List['AllowedDataType']): """ - files: list[str] + files: List[str] error_msg: str - allowed_data_types: list["AllowedDataType"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + allowed_data_types: List["AllowedDataType"] + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: files = self.files error_msg = self.error_msg @@ -34,7 +34,7 @@ def to_dict(self) -> dict[str, Any]: allowed_data_types_item = allowed_data_types_item_data.to_dict() allowed_data_types.append(allowed_data_types_item) - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -47,11 +47,11 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.allowed_data_type import AllowedDataType d = src_dict.copy() - files = cast(list[str], d.pop("files")) + files = cast(List[str], d.pop("files")) error_msg = d.pop("errorMsg") @@ -72,5 +72,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return file_requirements @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/form_schema.py b/cirro_api_client/v1/models/form_schema.py index df7d530..28357ca 100644 --- a/cirro_api_client/v1/models/form_schema.py +++ b/cirro_api_client/v1/models/form_schema.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,18 +23,18 @@ class FormSchema: form: Union[Unset, "FormSchemaForm"] = UNSET ui: Union[Unset, "FormSchemaUi"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - form: Unset | dict[str, Any] = UNSET + def to_dict(self) -> Dict[str, Any]: + form: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.form, Unset): form = self.form.to_dict() - ui: Unset | dict[str, Any] = UNSET + ui: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ui, Unset): ui = self.ui.to_dict() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if form is not UNSET: @@ -45,20 +45,20 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.form_schema_form import FormSchemaForm from ..models.form_schema_ui import FormSchemaUi d = src_dict.copy() _form = d.pop("form", UNSET) - form: Unset | FormSchemaForm + form: Union[Unset, FormSchemaForm] if isinstance(_form, Unset): form = UNSET else: form = FormSchemaForm.from_dict(_form) _ui = d.pop("ui", UNSET) - ui: Unset | FormSchemaUi + ui: Union[Unset, FormSchemaUi] if isinstance(_ui, Unset): ui = UNSET else: @@ -73,5 +73,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return form_schema @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/form_schema_form.py b/cirro_api_client/v1/models/form_schema_form.py index 632cb51..eaf6c96 100644 --- a/cirro_api_client/v1/models/form_schema_form.py +++ b/cirro_api_client/v1/models/form_schema_form.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class FormSchemaForm: """JSONSchema representation of the parameters""" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() form_schema_form = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return form_schema_form @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/form_schema_ui.py b/cirro_api_client/v1/models/form_schema_ui.py index 0eaa050..eceb456 100644 --- a/cirro_api_client/v1/models/form_schema_ui.py +++ b/cirro_api_client/v1/models/form_schema_ui.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class FormSchemaUi: """Describes how the form should be rendered, see rjsf""" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() form_schema_ui = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return form_schema_ui @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/fulfillment_response.py b/cirro_api_client/v1/models/fulfillment_response.py index 1b28b61..018b21a 100644 --- a/cirro_api_client/v1/models/fulfillment_response.py +++ b/cirro_api_client/v1/models/fulfillment_response.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class FulfillmentResponse: fulfillment_id: str path: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: fulfillment_id = self.fulfillment_id path = self.path - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,7 +35,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() fulfillment_id = d.pop("fulfillmentId") @@ -50,5 +50,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return fulfillment_response @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/generate_sftp_credentials_request.py b/cirro_api_client/v1/models/generate_sftp_credentials_request.py index ec07406..9809148 100644 --- a/cirro_api_client/v1/models/generate_sftp_credentials_request.py +++ b/cirro_api_client/v1/models/generate_sftp_credentials_request.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,13 +15,13 @@ class GenerateSftpCredentialsRequest: lifetime_days (Union[Unset, int]): Number of days the credentials are valid for Default: 1. """ - lifetime_days: Unset | int = 1 - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + lifetime_days: Union[Unset, int] = 1 + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: lifetime_days = self.lifetime_days - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if lifetime_days is not UNSET: @@ -30,7 +30,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() lifetime_days = d.pop("lifetimeDays", UNSET) @@ -42,5 +42,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return generate_sftp_credentials_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/get_execution_logs_response.py b/cirro_api_client/v1/models/get_execution_logs_response.py index 9ca54e6..e9de414 100644 --- a/cirro_api_client/v1/models/get_execution_logs_response.py +++ b/cirro_api_client/v1/models/get_execution_logs_response.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,16 +17,16 @@ class GetExecutionLogsResponse: events (List['LogEntry']): """ - events: list["LogEntry"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + events: List["LogEntry"] + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: events = [] for events_item_data in self.events: events_item = events_item_data.to_dict() events.append(events_item) - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -37,7 +37,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.log_entry import LogEntry d = src_dict.copy() @@ -56,5 +56,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return get_execution_logs_response @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/get_project_summary_response_200.py b/cirro_api_client/v1/models/get_project_summary_response_200.py index f914745..9552fcd 100644 --- a/cirro_api_client/v1/models/get_project_summary_response_200.py +++ b/cirro_api_client/v1/models/get_project_summary_response_200.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,10 +14,10 @@ class GetProjectSummaryResponse200: """ """ - additional_properties: dict[str, list["Task"]] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, List["Task"]] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = [] for additional_property_item_data in prop: @@ -29,7 +29,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.task import Task d = src_dict.copy() @@ -50,5 +50,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return get_project_summary_response_200 @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_classification.py b/cirro_api_client/v1/models/governance_classification.py index eac8897..88e9446 100644 --- a/cirro_api_client/v1/models/governance_classification.py +++ b/cirro_api_client/v1/models/governance_classification.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,13 +24,13 @@ class GovernanceClassification: id: str name: str description: str - requirement_ids: list[str] + requirement_ids: List[str] created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -45,7 +45,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -62,7 +62,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -70,7 +70,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: description = d.pop("description") - requirement_ids = cast(list[str], d.pop("requirementIds")) + requirement_ids = cast(List[str], d.pop("requirementIds")) created_by = d.pop("createdBy") @@ -92,5 +92,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return governance_classification @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_contact.py b/cirro_api_client/v1/models/governance_contact.py index c095442..9d66a9b 100644 --- a/cirro_api_client/v1/models/governance_contact.py +++ b/cirro_api_client/v1/models/governance_contact.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -32,9 +32,9 @@ class GovernanceContact: created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id title = self.title @@ -53,7 +53,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -72,7 +72,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -108,5 +108,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return governance_contact @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_expiry.py b/cirro_api_client/v1/models/governance_expiry.py index 514d13f..7eecbc4 100644 --- a/cirro_api_client/v1/models/governance_expiry.py +++ b/cirro_api_client/v1/models/governance_expiry.py @@ -1,6 +1,5 @@ -import builtins import datetime -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,23 +20,23 @@ class GovernanceExpiry: date (Union[None, Unset, datetime.datetime]): The date for an absolute expiration """ - type: Unset | GovernanceExpiryType = UNSET - days: None | Unset | int = UNSET - date: None | Unset | datetime.datetime = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + type: Union[Unset, GovernanceExpiryType] = UNSET + days: Union[None, Unset, int] = UNSET + date: Union[None, Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - type: Unset | str = UNSET + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET if not isinstance(self.type, Unset): type = self.type.value - days: None | Unset | int + days: Union[None, Unset, int] if isinstance(self.days, Unset): days = UNSET else: days = self.days - date: None | Unset | str + date: Union[None, Unset, str] if isinstance(self.date, Unset): date = UNSET elif isinstance(self.date, datetime.datetime): @@ -45,7 +44,7 @@ def to_dict(self) -> dict[str, Any]: else: date = self.date - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if type is not UNSET: @@ -58,25 +57,25 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: builtins.type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() _type = d.pop("type", UNSET) - type: Unset | GovernanceExpiryType + type: Union[Unset, GovernanceExpiryType] if isinstance(_type, Unset): type = UNSET else: type = GovernanceExpiryType(_type) - def _parse_days(data: object) -> None | Unset | int: + def _parse_days(data: object) -> Union[None, Unset, int]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(Union[None, Unset, int], data) days = _parse_days(d.pop("days", UNSET)) - def _parse_date(data: object) -> None | Unset | datetime.datetime: + def _parse_date(data: object) -> Union[None, Unset, datetime.datetime]: if data is None: return data if isinstance(data, Unset): @@ -89,7 +88,7 @@ def _parse_date(data: object) -> None | Unset | datetime.datetime: return date_type_0 except: # noqa: E722 pass - return cast(None | Unset | datetime.datetime, data) + return cast(Union[None, Unset, datetime.datetime], data) date = _parse_date(d.pop("date", UNSET)) @@ -103,5 +102,5 @@ def _parse_date(data: object) -> None | Unset | datetime.datetime: return governance_expiry @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_file.py b/cirro_api_client/v1/models/governance_file.py index 74c4260..cdd0327 100644 --- a/cirro_api_client/v1/models/governance_file.py +++ b/cirro_api_client/v1/models/governance_file.py @@ -1,5 +1,4 @@ -import builtins -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,24 +19,24 @@ class GovernanceFile: type (Union[Unset, GovernanceFileType]): The options for supplementals for governance requirements """ - name: Unset | str = UNSET - description: Unset | str = UNSET - src: Unset | str = UNSET - type: Unset | GovernanceFileType = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + name: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + src: Union[Unset, str] = UNSET + type: Union[Unset, GovernanceFileType] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name description = self.description src = self.src - type: Unset | str = UNSET + type: Union[Unset, str] = UNSET if not isinstance(self.type, Unset): type = self.type.value - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if name is not UNSET: @@ -52,7 +51,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: builtins.type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name", UNSET) @@ -61,7 +60,7 @@ def from_dict(cls: builtins.type[T], src_dict: dict[str, Any]) -> T: src = d.pop("src", UNSET) _type = d.pop("type", UNSET) - type: Unset | GovernanceFileType + type: Union[Unset, GovernanceFileType] if isinstance(_type, Unset): type = UNSET else: @@ -78,5 +77,5 @@ def from_dict(cls: builtins.type[T], src_dict: dict[str, Any]) -> T: return governance_file @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_file_access_request.py b/cirro_api_client/v1/models/governance_file_access_request.py index ece154a..4c7fad1 100644 --- a/cirro_api_client/v1/models/governance_file_access_request.py +++ b/cirro_api_client/v1/models/governance_file_access_request.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,33 +20,33 @@ class GovernanceFileAccessRequest: """ access_type: GovernanceAccessType - fulfillment_id: None | Unset | str = UNSET - project_id: None | Unset | str = UNSET - token_lifetime_hours: None | Unset | int = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + fulfillment_id: Union[None, Unset, str] = UNSET + project_id: Union[None, Unset, str] = UNSET + token_lifetime_hours: Union[None, Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: access_type = self.access_type.value - fulfillment_id: None | Unset | str + fulfillment_id: Union[None, Unset, str] if isinstance(self.fulfillment_id, Unset): fulfillment_id = UNSET else: fulfillment_id = self.fulfillment_id - project_id: None | Unset | str + project_id: Union[None, Unset, str] if isinstance(self.project_id, Unset): project_id = UNSET else: project_id = self.project_id - token_lifetime_hours: None | Unset | int + token_lifetime_hours: Union[None, Unset, int] if isinstance(self.token_lifetime_hours, Unset): token_lifetime_hours = UNSET else: token_lifetime_hours = self.token_lifetime_hours - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -63,34 +63,34 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() access_type = GovernanceAccessType(d.pop("accessType")) - def _parse_fulfillment_id(data: object) -> None | Unset | str: + def _parse_fulfillment_id(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) fulfillment_id = _parse_fulfillment_id(d.pop("fulfillmentId", UNSET)) - def _parse_project_id(data: object) -> None | Unset | str: + def _parse_project_id(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) project_id = _parse_project_id(d.pop("projectId", UNSET)) - def _parse_token_lifetime_hours(data: object) -> None | Unset | int: + def _parse_token_lifetime_hours(data: object) -> Union[None, Unset, int]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(Union[None, Unset, int], data) token_lifetime_hours = _parse_token_lifetime_hours(d.pop("tokenLifetimeHours", UNSET)) @@ -105,5 +105,5 @@ def _parse_token_lifetime_hours(data: object) -> None | Unset | int: return governance_file_access_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_file_input.py b/cirro_api_client/v1/models/governance_file_input.py index e90e1d9..f37a99a 100644 --- a/cirro_api_client/v1/models/governance_file_input.py +++ b/cirro_api_client/v1/models/governance_file_input.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +22,9 @@ class GovernanceFileInput: description: str src: str type: GovernanceFileType - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name description = self.description @@ -33,7 +33,7 @@ def to_dict(self) -> dict[str, Any]: type = self.type.value - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -47,7 +47,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -68,5 +68,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return governance_file_input @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_requirement.py b/cirro_api_client/v1/models/governance_requirement.py index 8c1811e..bfe8c7f 100644 --- a/cirro_api_client/v1/models/governance_requirement.py +++ b/cirro_api_client/v1/models/governance_requirement.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -53,22 +53,22 @@ class GovernanceRequirement: type: GovernanceType path: str scope: GovernanceScope - contact_ids: list[str] + contact_ids: List[str] expiration: "GovernanceExpiry" created_by: str created_at: datetime.datetime updated_at: datetime.datetime - project_id: Unset | str = UNSET - acceptance: GovernanceScope | None | Unset = UNSET - enactment_date: None | Unset | datetime.datetime = UNSET - supplemental_docs: list["GovernanceFile"] | None | Unset = UNSET + project_id: Union[Unset, str] = UNSET + acceptance: Union[GovernanceScope, None, Unset] = UNSET + enactment_date: Union[None, Unset, datetime.datetime] = UNSET + supplemental_docs: Union[List["GovernanceFile"], None, Unset] = UNSET file: Union["GovernanceFile", None, Unset] = UNSET - authorship: GovernanceScope | None | Unset = UNSET + authorship: Union[GovernanceScope, None, Unset] = UNSET project_file_map: Union["GovernanceRequirementProjectFileMap", None, Unset] = UNSET - verification_method: GovernanceTrainingVerification | None | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + verification_method: Union[GovernanceTrainingVerification, None, Unset] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: from ..models.governance_file import GovernanceFile from ..models.governance_requirement_project_file_map import GovernanceRequirementProjectFileMap @@ -96,7 +96,7 @@ def to_dict(self) -> dict[str, Any]: project_id = self.project_id - acceptance: None | Unset | str + acceptance: Union[None, Unset, str] if isinstance(self.acceptance, Unset): acceptance = UNSET elif isinstance(self.acceptance, GovernanceScope): @@ -104,7 +104,7 @@ def to_dict(self) -> dict[str, Any]: else: acceptance = self.acceptance - enactment_date: None | Unset | str + enactment_date: Union[None, Unset, str] if isinstance(self.enactment_date, Unset): enactment_date = UNSET elif isinstance(self.enactment_date, datetime.datetime): @@ -112,7 +112,7 @@ def to_dict(self) -> dict[str, Any]: else: enactment_date = self.enactment_date - supplemental_docs: list[dict[str, Any]] | None | Unset + supplemental_docs: Union[List[Dict[str, Any]], None, Unset] if isinstance(self.supplemental_docs, Unset): supplemental_docs = UNSET elif isinstance(self.supplemental_docs, list): @@ -124,7 +124,7 @@ def to_dict(self) -> dict[str, Any]: else: supplemental_docs = self.supplemental_docs - file: dict[str, Any] | None | Unset + file: Union[Dict[str, Any], None, Unset] if isinstance(self.file, Unset): file = UNSET elif isinstance(self.file, GovernanceFile): @@ -132,7 +132,7 @@ def to_dict(self) -> dict[str, Any]: else: file = self.file - authorship: None | Unset | str + authorship: Union[None, Unset, str] if isinstance(self.authorship, Unset): authorship = UNSET elif isinstance(self.authorship, GovernanceScope): @@ -140,7 +140,7 @@ def to_dict(self) -> dict[str, Any]: else: authorship = self.authorship - project_file_map: dict[str, Any] | None | Unset + project_file_map: Union[Dict[str, Any], None, Unset] if isinstance(self.project_file_map, Unset): project_file_map = UNSET elif isinstance(self.project_file_map, GovernanceRequirementProjectFileMap): @@ -148,7 +148,7 @@ def to_dict(self) -> dict[str, Any]: else: project_file_map = self.project_file_map - verification_method: None | Unset | str + verification_method: Union[None, Unset, str] if isinstance(self.verification_method, Unset): verification_method = UNSET elif isinstance(self.verification_method, GovernanceTrainingVerification): @@ -156,7 +156,7 @@ def to_dict(self) -> dict[str, Any]: else: verification_method = self.verification_method - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -193,7 +193,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.governance_expiry import GovernanceExpiry from ..models.governance_file import GovernanceFile from ..models.governance_requirement_project_file_map import GovernanceRequirementProjectFileMap @@ -211,7 +211,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: scope = GovernanceScope(d.pop("scope")) - contact_ids = cast(list[str], d.pop("contactIds")) + contact_ids = cast(List[str], d.pop("contactIds")) expiration = GovernanceExpiry.from_dict(d.pop("expiration")) @@ -223,7 +223,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: project_id = d.pop("projectId", UNSET) - def _parse_acceptance(data: object) -> GovernanceScope | None | Unset: + def _parse_acceptance(data: object) -> Union[GovernanceScope, None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -236,11 +236,11 @@ def _parse_acceptance(data: object) -> GovernanceScope | None | Unset: return acceptance_type_1 except: # noqa: E722 pass - return cast(GovernanceScope | None | Unset, data) + return cast(Union[GovernanceScope, None, Unset], data) acceptance = _parse_acceptance(d.pop("acceptance", UNSET)) - def _parse_enactment_date(data: object) -> None | Unset | datetime.datetime: + def _parse_enactment_date(data: object) -> Union[None, Unset, datetime.datetime]: if data is None: return data if isinstance(data, Unset): @@ -253,11 +253,11 @@ def _parse_enactment_date(data: object) -> None | Unset | datetime.datetime: return enactment_date_type_0 except: # noqa: E722 pass - return cast(None | Unset | datetime.datetime, data) + return cast(Union[None, Unset, datetime.datetime], data) enactment_date = _parse_enactment_date(d.pop("enactmentDate", UNSET)) - def _parse_supplemental_docs(data: object) -> list["GovernanceFile"] | None | Unset: + def _parse_supplemental_docs(data: object) -> Union[List["GovernanceFile"], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -275,7 +275,7 @@ def _parse_supplemental_docs(data: object) -> list["GovernanceFile"] | None | Un return supplemental_docs_type_0 except: # noqa: E722 pass - return cast(list["GovernanceFile"] | None | Unset, data) + return cast(Union[List["GovernanceFile"], None, Unset], data) supplemental_docs = _parse_supplemental_docs(d.pop("supplementalDocs", UNSET)) @@ -296,7 +296,7 @@ def _parse_file(data: object) -> Union["GovernanceFile", None, Unset]: file = _parse_file(d.pop("file", UNSET)) - def _parse_authorship(data: object) -> GovernanceScope | None | Unset: + def _parse_authorship(data: object) -> Union[GovernanceScope, None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -309,7 +309,7 @@ def _parse_authorship(data: object) -> GovernanceScope | None | Unset: return authorship_type_1 except: # noqa: E722 pass - return cast(GovernanceScope | None | Unset, data) + return cast(Union[GovernanceScope, None, Unset], data) authorship = _parse_authorship(d.pop("authorship", UNSET)) @@ -330,7 +330,7 @@ def _parse_project_file_map(data: object) -> Union["GovernanceRequirementProject project_file_map = _parse_project_file_map(d.pop("projectFileMap", UNSET)) - def _parse_verification_method(data: object) -> GovernanceTrainingVerification | None | Unset: + def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerification, None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -343,7 +343,7 @@ def _parse_verification_method(data: object) -> GovernanceTrainingVerification | return verification_method_type_1 except: # noqa: E722 pass - return cast(GovernanceTrainingVerification | None | Unset, data) + return cast(Union[GovernanceTrainingVerification, None, Unset], data) verification_method = _parse_verification_method(d.pop("verificationMethod", UNSET)) @@ -373,5 +373,5 @@ def _parse_verification_method(data: object) -> GovernanceTrainingVerification | return governance_requirement @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/governance_requirement_project_file_map.py b/cirro_api_client/v1/models/governance_requirement_project_file_map.py index 5519eff..274aabf 100644 --- a/cirro_api_client/v1/models/governance_requirement_project_file_map.py +++ b/cirro_api_client/v1/models/governance_requirement_project_file_map.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,10 +14,10 @@ class GovernanceRequirementProjectFileMap: """Files supplied by each project when authorship is project""" - additional_properties: dict[str, "GovernanceFile"] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, "GovernanceFile"] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = prop.to_dict() field_dict.update({}) @@ -25,7 +25,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.governance_file import GovernanceFile d = src_dict.copy() @@ -41,5 +41,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return governance_requirement_project_file_map @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/group_cost.py b/cirro_api_client/v1/models/group_cost.py index 13d2ea5..18de1d7 100644 --- a/cirro_api_client/v1/models/group_cost.py +++ b/cirro_api_client/v1/models/group_cost.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,16 +16,16 @@ class GroupCost: cost (Union[Unset, float]): Cost """ - name: Unset | str = UNSET - cost: Unset | float = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + name: Union[Unset, str] = UNSET + cost: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name cost = self.cost - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if name is not UNSET: @@ -36,7 +36,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name", UNSET) @@ -51,5 +51,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return group_cost @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/import_data_request.py b/cirro_api_client/v1/models/import_data_request.py index afe0ec4..c8c3c92 100644 --- a/cirro_api_client/v1/models/import_data_request.py +++ b/cirro_api_client/v1/models/import_data_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,19 +23,19 @@ class ImportDataRequest: """ name: str - public_ids: list[str] - description: Unset | str = UNSET - tags: list["Tag"] | None | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + public_ids: List[str] + description: Union[Unset, str] = UNSET + tags: Union[List["Tag"], None, Unset] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name public_ids = self.public_ids description = self.description - tags: list[dict[str, Any]] | None | Unset + tags: Union[List[Dict[str, Any]], None, Unset] if isinstance(self.tags, Unset): tags = UNSET elif isinstance(self.tags, list): @@ -47,7 +47,7 @@ def to_dict(self) -> dict[str, Any]: else: tags = self.tags - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -63,17 +63,17 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.tag import Tag d = src_dict.copy() name = d.pop("name") - public_ids = cast(list[str], d.pop("publicIds")) + public_ids = cast(List[str], d.pop("publicIds")) description = d.pop("description", UNSET) - def _parse_tags(data: object) -> list["Tag"] | None | Unset: + def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -91,7 +91,7 @@ def _parse_tags(data: object) -> list["Tag"] | None | Unset: return tags_type_0 except: # noqa: E722 pass - return cast(list["Tag"] | None | Unset, data) + return cast(Union[List["Tag"], None, Unset], data) tags = _parse_tags(d.pop("tags", UNSET)) @@ -106,5 +106,5 @@ def _parse_tags(data: object) -> list["Tag"] | None | Unset: return import_data_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/invite_user_request.py b/cirro_api_client/v1/models/invite_user_request.py index 8c457d6..82762b0 100644 --- a/cirro_api_client/v1/models/invite_user_request.py +++ b/cirro_api_client/v1/models/invite_user_request.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,16 +18,16 @@ class InviteUserRequest: name: str organization: str email: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name organization = self.organization email = self.email - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,7 +40,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -58,5 +58,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return invite_user_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/invite_user_response.py b/cirro_api_client/v1/models/invite_user_response.py index 5fa148a..ee42ed6 100644 --- a/cirro_api_client/v1/models/invite_user_response.py +++ b/cirro_api_client/v1/models/invite_user_response.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,12 +14,12 @@ class InviteUserResponse: """ message: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: message = self.message - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -30,7 +30,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() message = d.pop("message") @@ -42,5 +42,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return invite_user_response @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/log_entry.py b/cirro_api_client/v1/models/log_entry.py index 949a47a..0e570c6 100644 --- a/cirro_api_client/v1/models/log_entry.py +++ b/cirro_api_client/v1/models/log_entry.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,15 +17,15 @@ class LogEntry: """ message: str - timestamp: Unset | int = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + timestamp: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: message = self.message timestamp = self.timestamp - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -38,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() message = d.pop("message") @@ -53,5 +53,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return log_entry @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/login_provider.py b/cirro_api_client/v1/models/login_provider.py index e6fb9f9..babf40e 100644 --- a/cirro_api_client/v1/models/login_provider.py +++ b/cirro_api_client/v1/models/login_provider.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,9 +20,9 @@ class LoginProvider: name: str description: str logo_url: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -31,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: logo_url = self.logo_url - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -45,7 +45,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -66,5 +66,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return login_provider @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/message.py b/cirro_api_client/v1/models/message.py index 5ae1306..32b120d 100644 --- a/cirro_api_client/v1/models/message.py +++ b/cirro_api_client/v1/models/message.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -33,15 +33,15 @@ class Message: message_type: MessageType id: str message: str - links: list["Entity"] + links: List["Entity"] has_replies: bool created_by: str created_at: datetime.datetime updated_at: datetime.datetime - parent_message_id: None | Unset | str = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + parent_message_id: Union[None, Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: message_type = self.message_type.value id = self.id @@ -61,13 +61,13 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at.isoformat() - parent_message_id: None | Unset | str + parent_message_id: Union[None, Unset, str] if isinstance(self.parent_message_id, Unset): parent_message_id = UNSET else: parent_message_id = self.parent_message_id - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -87,7 +87,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.entity import Entity d = src_dict.copy() @@ -112,12 +112,12 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: updated_at = isoparse(d.pop("updatedAt")) - def _parse_parent_message_id(data: object) -> None | Unset | str: + def _parse_parent_message_id(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) parent_message_id = _parse_parent_message_id(d.pop("parentMessageId", UNSET)) @@ -137,5 +137,5 @@ def _parse_parent_message_id(data: object) -> None | Unset | str: return message @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/message_input.py b/cirro_api_client/v1/models/message_input.py index 9a7811b..613adea 100644 --- a/cirro_api_client/v1/models/message_input.py +++ b/cirro_api_client/v1/models/message_input.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,19 +17,19 @@ class MessageInput: """ message: str - parent_message_id: None | Unset | str = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + parent_message_id: Union[None, Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: message = self.message - parent_message_id: None | Unset | str + parent_message_id: Union[None, Unset, str] if isinstance(self.parent_message_id, Unset): parent_message_id = UNSET else: parent_message_id = self.parent_message_id - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,16 +42,16 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() message = d.pop("message") - def _parse_parent_message_id(data: object) -> None | Unset | str: + def _parse_parent_message_id(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) parent_message_id = _parse_parent_message_id(d.pop("parentMessageId", UNSET)) @@ -64,5 +64,5 @@ def _parse_parent_message_id(data: object) -> None | Unset | str: return message_input @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/metric_record.py b/cirro_api_client/v1/models/metric_record.py index d37abec..ad5bc21 100644 --- a/cirro_api_client/v1/models/metric_record.py +++ b/cirro_api_client/v1/models/metric_record.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,22 +25,22 @@ class MetricRecord: """ unit: str - date: Unset | datetime.date = UNSET + date: Union[Unset, datetime.date] = UNSET services: Union[Unset, "MetricRecordServices"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: unit = self.unit - date: Unset | str = UNSET + date: Union[Unset, str] = UNSET if not isinstance(self.date, Unset): date = self.date.isoformat() - services: Unset | dict[str, Any] = UNSET + services: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.services, Unset): services = self.services.to_dict() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -55,21 +55,21 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.metric_record_services import MetricRecordServices d = src_dict.copy() unit = d.pop("unit") _date = d.pop("date", UNSET) - date: Unset | datetime.date + date: Union[Unset, datetime.date] if isinstance(_date, Unset): date = UNSET else: date = isoparse(_date).date() _services = d.pop("services", UNSET) - services: Unset | MetricRecordServices + services: Union[Unset, MetricRecordServices] if isinstance(_services, Unset): services = UNSET else: @@ -85,5 +85,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return metric_record @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/metric_record_services.py b/cirro_api_client/v1/models/metric_record_services.py index d06daff..5649a8f 100644 --- a/cirro_api_client/v1/models/metric_record_services.py +++ b/cirro_api_client/v1/models/metric_record_services.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,17 +15,17 @@ class MetricRecordServices: """ - additional_properties: dict[str, float] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, float] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() metric_record_services = cls() @@ -33,5 +33,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return metric_record_services @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/mounted_dataset.py b/cirro_api_client/v1/models/mounted_dataset.py index b47898f..d7f9e5c 100644 --- a/cirro_api_client/v1/models/mounted_dataset.py +++ b/cirro_api_client/v1/models/mounted_dataset.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,14 +17,14 @@ class MountedDataset: name: str uri: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name uri = self.uri - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -36,7 +36,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -51,5 +51,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return mounted_dataset @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/move_dataset_input.py b/cirro_api_client/v1/models/move_dataset_input.py index 9e3844d..5d3182c 100644 --- a/cirro_api_client/v1/models/move_dataset_input.py +++ b/cirro_api_client/v1/models/move_dataset_input.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,16 +18,16 @@ class MoveDatasetInput: dataset_id: str source_project_id: str target_project_id: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: dataset_id = self.dataset_id source_project_id = self.source_project_id target_project_id = self.target_project_id - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,7 +40,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() dataset_id = d.pop("datasetId") @@ -58,5 +58,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return move_dataset_input @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/move_dataset_response.py b/cirro_api_client/v1/models/move_dataset_response.py index ccbea4f..2180e35 100644 --- a/cirro_api_client/v1/models/move_dataset_response.py +++ b/cirro_api_client/v1/models/move_dataset_response.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,17 +17,17 @@ class MoveDatasetResponse: s_3_copy_command: str s_3_delete_command: str - samples_not_moved: list[str] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + samples_not_moved: List[str] + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: s_3_copy_command = self.s_3_copy_command s_3_delete_command = self.s_3_delete_command samples_not_moved = self.samples_not_moved - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,13 +40,13 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() s_3_copy_command = d.pop("s3CopyCommand") s_3_delete_command = d.pop("s3DeleteCommand") - samples_not_moved = cast(list[str], d.pop("samplesNotMoved")) + samples_not_moved = cast(List[str], d.pop("samplesNotMoved")) move_dataset_response = cls( s_3_copy_command=s_3_copy_command, @@ -58,5 +58,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return move_dataset_response @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/named_item.py b/cirro_api_client/v1/models/named_item.py index 967aa6d..2350132 100644 --- a/cirro_api_client/v1/models/named_item.py +++ b/cirro_api_client/v1/models/named_item.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class NamedItem: id: str name: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,7 +35,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -50,5 +50,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return named_item @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/notebook_instance.py b/cirro_api_client/v1/models/notebook_instance.py index 0e92783..6917f63 100644 --- a/cirro_api_client/v1/models/notebook_instance.py +++ b/cirro_api_client/v1/models/notebook_instance.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -33,16 +33,16 @@ class NotebookInstance: status: Status status_message: str instance_type: str - accelerator_types: list[str] - git_repositories: list[str] + accelerator_types: List[str] + git_repositories: List[str] volume_size_gb: int is_shared_with_project: bool created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -67,7 +67,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -89,7 +89,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -101,9 +101,9 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: instance_type = d.pop("instanceType") - accelerator_types = cast(list[str], d.pop("acceleratorTypes")) + accelerator_types = cast(List[str], d.pop("acceleratorTypes")) - git_repositories = cast(list[str], d.pop("gitRepositories")) + git_repositories = cast(List[str], d.pop("gitRepositories")) volume_size_gb = d.pop("volumeSizeGB") @@ -134,5 +134,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return notebook_instance @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/notebook_instance_status_response.py b/cirro_api_client/v1/models/notebook_instance_status_response.py index 68182d0..8042a48 100644 --- a/cirro_api_client/v1/models/notebook_instance_status_response.py +++ b/cirro_api_client/v1/models/notebook_instance_status_response.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class NotebookInstanceStatusResponse: status: str status_message: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: status = self.status status_message = self.status_message - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,7 +35,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() status = d.pop("status") @@ -50,5 +50,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return notebook_instance_status_response @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/open_notebook_instance_response.py b/cirro_api_client/v1/models/open_notebook_instance_response.py index 1c56285..de09606 100644 --- a/cirro_api_client/v1/models/open_notebook_instance_response.py +++ b/cirro_api_client/v1/models/open_notebook_instance_response.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class OpenNotebookInstanceResponse: url: str message: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: url = self.url message = self.message - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,7 +35,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() url = d.pop("url") @@ -50,5 +50,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return open_notebook_instance_response @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/paginated_response_dataset_list_dto.py b/cirro_api_client/v1/models/paginated_response_dataset_list_dto.py index 2a48ecd..02f7cd2 100644 --- a/cirro_api_client/v1/models/paginated_response_dataset_list_dto.py +++ b/cirro_api_client/v1/models/paginated_response_dataset_list_dto.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,11 +18,11 @@ class PaginatedResponseDatasetListDto: next_token (str): """ - data: list["Dataset"] + data: List["Dataset"] next_token: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -30,7 +30,7 @@ def to_dict(self) -> dict[str, Any]: next_token = self.next_token - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.dataset import Dataset d = src_dict.copy() @@ -64,5 +64,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return paginated_response_dataset_list_dto @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/paginated_response_discussion.py b/cirro_api_client/v1/models/paginated_response_discussion.py index cedec65..c0ed35f 100644 --- a/cirro_api_client/v1/models/paginated_response_discussion.py +++ b/cirro_api_client/v1/models/paginated_response_discussion.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,11 +18,11 @@ class PaginatedResponseDiscussion: next_token (str): """ - data: list["Discussion"] + data: List["Discussion"] next_token: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -30,7 +30,7 @@ def to_dict(self) -> dict[str, Any]: next_token = self.next_token - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.discussion import Discussion d = src_dict.copy() @@ -64,5 +64,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return paginated_response_discussion @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/paginated_response_message.py b/cirro_api_client/v1/models/paginated_response_message.py index cce6f2b..17022c9 100644 --- a/cirro_api_client/v1/models/paginated_response_message.py +++ b/cirro_api_client/v1/models/paginated_response_message.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,11 +18,11 @@ class PaginatedResponseMessage: next_token (str): """ - data: list["Message"] + data: List["Message"] next_token: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -30,7 +30,7 @@ def to_dict(self) -> dict[str, Any]: next_token = self.next_token - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.message import Message d = src_dict.copy() @@ -64,5 +64,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return paginated_response_message @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/paginated_response_sample_dto.py b/cirro_api_client/v1/models/paginated_response_sample_dto.py index 116f6c7..75b4995 100644 --- a/cirro_api_client/v1/models/paginated_response_sample_dto.py +++ b/cirro_api_client/v1/models/paginated_response_sample_dto.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,11 +18,11 @@ class PaginatedResponseSampleDto: next_token (str): """ - data: list["Sample"] + data: List["Sample"] next_token: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -30,7 +30,7 @@ def to_dict(self) -> dict[str, Any]: next_token = self.next_token - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.sample import Sample d = src_dict.copy() @@ -64,5 +64,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return paginated_response_sample_dto @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/paginated_response_user_dto.py b/cirro_api_client/v1/models/paginated_response_user_dto.py index 0a30e8b..65f185a 100644 --- a/cirro_api_client/v1/models/paginated_response_user_dto.py +++ b/cirro_api_client/v1/models/paginated_response_user_dto.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,11 +18,11 @@ class PaginatedResponseUserDto: next_token (str): """ - data: list["User"] + data: List["User"] next_token: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -30,7 +30,7 @@ def to_dict(self) -> dict[str, Any]: next_token = self.next_token - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.user import User d = src_dict.copy() @@ -64,5 +64,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return paginated_response_user_dto @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/pipeline_code.py b/cirro_api_client/v1/models/pipeline_code.py index 7e4d4f9..bd60ed8 100644 --- a/cirro_api_client/v1/models/pipeline_code.py +++ b/cirro_api_client/v1/models/pipeline_code.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,9 +23,9 @@ class PipelineCode: version: str repository_type: RepositoryType entry_point: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: repository_path = self.repository_path version = self.version @@ -34,7 +34,7 @@ def to_dict(self) -> dict[str, Any]: entry_point = self.entry_point - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -48,7 +48,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() repository_path = d.pop("repositoryPath") @@ -69,5 +69,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return pipeline_code @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/pipeline_cost.py b/cirro_api_client/v1/models/pipeline_cost.py index 9650495..4a9e401 100644 --- a/cirro_api_client/v1/models/pipeline_cost.py +++ b/cirro_api_client/v1/models/pipeline_cost.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,13 +17,13 @@ class PipelineCost: description (Union[Unset, str]): Description of the cost calculation """ - total_cost: None | Unset | float = UNSET - is_estimate: Unset | bool = UNSET - description: Unset | str = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + total_cost: Union[None, Unset, float] = UNSET + is_estimate: Union[Unset, bool] = UNSET + description: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - total_cost: None | Unset | float + def to_dict(self) -> Dict[str, Any]: + total_cost: Union[None, Unset, float] if isinstance(self.total_cost, Unset): total_cost = UNSET else: @@ -33,7 +33,7 @@ def to_dict(self) -> dict[str, Any]: description = self.description - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if total_cost is not UNSET: @@ -46,15 +46,15 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() - def _parse_total_cost(data: object) -> None | Unset | float: + def _parse_total_cost(data: object) -> Union[None, Unset, float]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | float, data) + return cast(Union[None, Unset, float], data) total_cost = _parse_total_cost(d.pop("totalCost", UNSET)) @@ -72,5 +72,5 @@ def _parse_total_cost(data: object) -> None | Unset | float: return pipeline_cost @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/portal_error_response.py b/cirro_api_client/v1/models/portal_error_response.py index 87edcd5..e7f445f 100644 --- a/cirro_api_client/v1/models/portal_error_response.py +++ b/cirro_api_client/v1/models/portal_error_response.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,10 +23,10 @@ class PortalErrorResponse: status_code: int error_code: str error_detail: str - errors: list["ErrorMessage"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + errors: List["ErrorMessage"] + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: status_code = self.status_code error_code = self.error_code @@ -38,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: errors_item = errors_item_data.to_dict() errors.append(errors_item) - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -52,7 +52,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.error_message import ErrorMessage d = src_dict.copy() @@ -80,5 +80,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return portal_error_response @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/process.py b/cirro_api_client/v1/models/process.py index c0572a3..513eb8d 100644 --- a/cirro_api_client/v1/models/process.py +++ b/cirro_api_client/v1/models/process.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -44,23 +44,23 @@ class Process: description: str data_type: str executor: Executor - child_process_ids: list[str] - parent_process_ids: list[str] - linked_project_ids: list[str] + child_process_ids: List[str] + parent_process_ids: List[str] + linked_project_ids: List[str] is_tenant_wide: bool allow_multiple_sources: bool uses_sample_sheet: bool is_archived: bool - category: Unset | str = UNSET - pipeline_type: Unset | str = UNSET - documentation_url: Unset | str = UNSET - file_requirements_message: Unset | str = UNSET - owner: None | Unset | str = UNSET - created_at: Unset | datetime.datetime = UNSET - updated_at: Unset | datetime.datetime = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: + category: Union[Unset, str] = UNSET + pipeline_type: Union[Unset, str] = UNSET + documentation_url: Union[Unset, str] = UNSET + file_requirements_message: Union[Unset, str] = UNSET + owner: Union[None, Unset, str] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -93,21 +93,21 @@ def to_dict(self) -> dict[str, Any]: file_requirements_message = self.file_requirements_message - owner: None | Unset | str + owner: Union[None, Unset, str] if isinstance(self.owner, Unset): owner = UNSET else: owner = self.owner - created_at: Unset | str = UNSET + created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - updated_at: Unset | str = UNSET + updated_at: Union[Unset, str] = UNSET if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -143,7 +143,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -155,11 +155,11 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: executor = Executor(d.pop("executor")) - child_process_ids = cast(list[str], d.pop("childProcessIds")) + child_process_ids = cast(List[str], d.pop("childProcessIds")) - parent_process_ids = cast(list[str], d.pop("parentProcessIds")) + parent_process_ids = cast(List[str], d.pop("parentProcessIds")) - linked_project_ids = cast(list[str], d.pop("linkedProjectIds")) + linked_project_ids = cast(List[str], d.pop("linkedProjectIds")) is_tenant_wide = d.pop("isTenantWide") @@ -177,24 +177,24 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: file_requirements_message = d.pop("fileRequirementsMessage", UNSET) - def _parse_owner(data: object) -> None | Unset | str: + def _parse_owner(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) owner = _parse_owner(d.pop("owner", UNSET)) _created_at = d.pop("createdAt", UNSET) - created_at: Unset | datetime.datetime + created_at: Union[Unset, datetime.datetime] if isinstance(_created_at, Unset): created_at = UNSET else: created_at = isoparse(_created_at) _updated_at = d.pop("updatedAt", UNSET) - updated_at: Unset | datetime.datetime + updated_at: Union[Unset, datetime.datetime] if isinstance(_updated_at, Unset): updated_at = UNSET else: @@ -226,5 +226,5 @@ def _parse_owner(data: object) -> None | Unset | str: return process @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/process_detail.py b/cirro_api_client/v1/models/process_detail.py index da73a3b..d362c70 100644 --- a/cirro_api_client/v1/models/process_detail.py +++ b/cirro_api_client/v1/models/process_detail.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -53,26 +53,26 @@ class ProcessDetail: description: str data_type: str executor: Executor - child_process_ids: list[str] - parent_process_ids: list[str] - linked_project_ids: list[str] + child_process_ids: List[str] + parent_process_ids: List[str] + linked_project_ids: List[str] is_tenant_wide: bool allow_multiple_sources: bool uses_sample_sheet: bool is_archived: bool - category: Unset | str = UNSET - pipeline_type: Unset | str = UNSET - documentation_url: Unset | str = UNSET - file_requirements_message: Unset | str = UNSET + category: Union[Unset, str] = UNSET + pipeline_type: Union[Unset, str] = UNSET + documentation_url: Union[Unset, str] = UNSET + file_requirements_message: Union[Unset, str] = UNSET pipeline_code: Union["PipelineCode", None, Unset] = UNSET - owner: None | Unset | str = UNSET + owner: Union[None, Unset, str] = UNSET custom_settings: Union["CustomPipelineSettings", None, Unset] = UNSET - file_mapping_rules: list["FileMappingRule"] | None | Unset = UNSET - created_at: Unset | datetime.datetime = UNSET - updated_at: Unset | datetime.datetime = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + file_mapping_rules: Union[List["FileMappingRule"], None, Unset] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: from ..models.custom_pipeline_settings import CustomPipelineSettings from ..models.pipeline_code import PipelineCode @@ -108,7 +108,7 @@ def to_dict(self) -> dict[str, Any]: file_requirements_message = self.file_requirements_message - pipeline_code: dict[str, Any] | None | Unset + pipeline_code: Union[Dict[str, Any], None, Unset] if isinstance(self.pipeline_code, Unset): pipeline_code = UNSET elif isinstance(self.pipeline_code, PipelineCode): @@ -116,13 +116,13 @@ def to_dict(self) -> dict[str, Any]: else: pipeline_code = self.pipeline_code - owner: None | Unset | str + owner: Union[None, Unset, str] if isinstance(self.owner, Unset): owner = UNSET else: owner = self.owner - custom_settings: dict[str, Any] | None | Unset + custom_settings: Union[Dict[str, Any], None, Unset] if isinstance(self.custom_settings, Unset): custom_settings = UNSET elif isinstance(self.custom_settings, CustomPipelineSettings): @@ -130,7 +130,7 @@ def to_dict(self) -> dict[str, Any]: else: custom_settings = self.custom_settings - file_mapping_rules: list[dict[str, Any]] | None | Unset + file_mapping_rules: Union[List[Dict[str, Any]], None, Unset] if isinstance(self.file_mapping_rules, Unset): file_mapping_rules = UNSET elif isinstance(self.file_mapping_rules, list): @@ -142,15 +142,15 @@ def to_dict(self) -> dict[str, Any]: else: file_mapping_rules = self.file_mapping_rules - created_at: Unset | str = UNSET + created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - updated_at: Unset | str = UNSET + updated_at: Union[Unset, str] = UNSET if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -192,7 +192,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.custom_pipeline_settings import CustomPipelineSettings from ..models.file_mapping_rule import FileMappingRule from ..models.pipeline_code import PipelineCode @@ -208,11 +208,11 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: executor = Executor(d.pop("executor")) - child_process_ids = cast(list[str], d.pop("childProcessIds")) + child_process_ids = cast(List[str], d.pop("childProcessIds")) - parent_process_ids = cast(list[str], d.pop("parentProcessIds")) + parent_process_ids = cast(List[str], d.pop("parentProcessIds")) - linked_project_ids = cast(list[str], d.pop("linkedProjectIds")) + linked_project_ids = cast(List[str], d.pop("linkedProjectIds")) is_tenant_wide = d.pop("isTenantWide") @@ -247,12 +247,12 @@ def _parse_pipeline_code(data: object) -> Union["PipelineCode", None, Unset]: pipeline_code = _parse_pipeline_code(d.pop("pipelineCode", UNSET)) - def _parse_owner(data: object) -> None | Unset | str: + def _parse_owner(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) owner = _parse_owner(d.pop("owner", UNSET)) @@ -273,7 +273,7 @@ def _parse_custom_settings(data: object) -> Union["CustomPipelineSettings", None custom_settings = _parse_custom_settings(d.pop("customSettings", UNSET)) - def _parse_file_mapping_rules(data: object) -> list["FileMappingRule"] | None | Unset: + def _parse_file_mapping_rules(data: object) -> Union[List["FileMappingRule"], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -291,19 +291,19 @@ def _parse_file_mapping_rules(data: object) -> list["FileMappingRule"] | None | return file_mapping_rules_type_0 except: # noqa: E722 pass - return cast(list["FileMappingRule"] | None | Unset, data) + return cast(Union[List["FileMappingRule"], None, Unset], data) file_mapping_rules = _parse_file_mapping_rules(d.pop("fileMappingRules", UNSET)) _created_at = d.pop("createdAt", UNSET) - created_at: Unset | datetime.datetime + created_at: Union[Unset, datetime.datetime] if isinstance(_created_at, Unset): created_at = UNSET else: created_at = isoparse(_created_at) _updated_at = d.pop("updatedAt", UNSET) - updated_at: Unset | datetime.datetime + updated_at: Union[Unset, datetime.datetime] if isinstance(_updated_at, Unset): updated_at = UNSET else: @@ -338,5 +338,5 @@ def _parse_file_mapping_rules(data: object) -> list["FileMappingRule"] | None | return process_detail @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project.py b/cirro_api_client/v1/models/project.py index 59b885f..b409ff2 100644 --- a/cirro_api_client/v1/models/project.py +++ b/cirro_api_client/v1/models/project.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -30,13 +30,13 @@ class Project: name: str description: str status: Status - tags: list["Tag"] + tags: List["Tag"] organization: str - classification_ids: list[str] + classification_ids: List[str] billing_account_id: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: billing_account_id = self.billing_account_id - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -74,7 +74,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.tag import Tag d = src_dict.copy() @@ -95,7 +95,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: organization = d.pop("organization") - classification_ids = cast(list[str], d.pop("classificationIds")) + classification_ids = cast(List[str], d.pop("classificationIds")) billing_account_id = d.pop("billingAccountId") @@ -114,5 +114,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return project @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_access_request.py b/cirro_api_client/v1/models/project_access_request.py index 1e29e3b..7b0a13b 100644 --- a/cirro_api_client/v1/models/project_access_request.py +++ b/cirro_api_client/v1/models/project_access_request.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -35,9 +35,9 @@ class ProjectAccessRequest: reviewer_username: str created_at: datetime.datetime expiry: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id username = self.username @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: expiry = self.expiry.isoformat() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -75,7 +75,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -111,5 +111,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return project_access_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_create_options.py b/cirro_api_client/v1/models/project_create_options.py index 8a12143..df22131 100644 --- a/cirro_api_client/v1/models/project_create_options.py +++ b/cirro_api_client/v1/models/project_create_options.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,14 +19,14 @@ class ProjectCreateOptions: wizard_url (str): """ - enabled_account_types: list[CloudAccountType] + enabled_account_types: List[CloudAccountType] portal_account_id: str portal_region: str template_url: str wizard_url: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: enabled_account_types = [] for enabled_account_types_item_data in self.enabled_account_types: enabled_account_types_item = enabled_account_types_item_data.value @@ -40,7 +40,7 @@ def to_dict(self) -> dict[str, Any]: wizard_url = self.wizard_url - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -55,7 +55,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() enabled_account_types = [] _enabled_account_types = d.pop("enabledAccountTypes") @@ -84,5 +84,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return project_create_options @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_detail.py b/cirro_api_client/v1/models/project_detail.py index f6d61b0..e6588bd 100644 --- a/cirro_api_client/v1/models/project_detail.py +++ b/cirro_api_client/v1/models/project_detail.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -44,21 +44,21 @@ class ProjectDetail: name: str description: str billing_account_id: str - contacts: list["Contact"] + contacts: List["Contact"] organization: str status: Status settings: "ProjectSettings" account: "CloudAccount" status_message: str - tags: list["Tag"] - classification_ids: list[str] + tags: List["Tag"] + classification_ids: List[str] created_by: str created_at: datetime.datetime updated_at: datetime.datetime - deployed_at: None | Unset | datetime.datetime = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + deployed_at: Union[None, Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -95,7 +95,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at.isoformat() - deployed_at: None | Unset | str + deployed_at: Union[None, Unset, str] if isinstance(self.deployed_at, Unset): deployed_at = UNSET elif isinstance(self.deployed_at, datetime.datetime): @@ -103,7 +103,7 @@ def to_dict(self) -> dict[str, Any]: else: deployed_at = self.deployed_at - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -130,7 +130,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.cloud_account import CloudAccount from ..models.contact import Contact from ..models.project_settings import ProjectSettings @@ -169,7 +169,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: tags.append(tags_item) - classification_ids = cast(list[str], d.pop("classificationIds")) + classification_ids = cast(List[str], d.pop("classificationIds")) created_by = d.pop("createdBy") @@ -177,7 +177,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: updated_at = isoparse(d.pop("updatedAt")) - def _parse_deployed_at(data: object) -> None | Unset | datetime.datetime: + def _parse_deployed_at(data: object) -> Union[None, Unset, datetime.datetime]: if data is None: return data if isinstance(data, Unset): @@ -190,7 +190,7 @@ def _parse_deployed_at(data: object) -> None | Unset | datetime.datetime: return deployed_at_type_0 except: # noqa: E722 pass - return cast(None | Unset | datetime.datetime, data) + return cast(Union[None, Unset, datetime.datetime], data) deployed_at = _parse_deployed_at(d.pop("deployedAt", UNSET)) @@ -217,5 +217,5 @@ def _parse_deployed_at(data: object) -> None | Unset | datetime.datetime: return project_detail @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_file_access_request.py b/cirro_api_client/v1/models/project_file_access_request.py index 4b24171..a2a3f6c 100644 --- a/cirro_api_client/v1/models/project_file_access_request.py +++ b/cirro_api_client/v1/models/project_file_access_request.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,26 +19,26 @@ class ProjectFileAccessRequest: """ access_type: ProjectAccessType - dataset_id: None | Unset | str = UNSET - token_lifetime_hours: None | Unset | int = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + dataset_id: Union[None, Unset, str] = UNSET + token_lifetime_hours: Union[None, Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: access_type = self.access_type.value - dataset_id: None | Unset | str + dataset_id: Union[None, Unset, str] if isinstance(self.dataset_id, Unset): dataset_id = UNSET else: dataset_id = self.dataset_id - token_lifetime_hours: None | Unset | int + token_lifetime_hours: Union[None, Unset, int] if isinstance(self.token_lifetime_hours, Unset): token_lifetime_hours = UNSET else: token_lifetime_hours = self.token_lifetime_hours - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -53,25 +53,25 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() access_type = ProjectAccessType(d.pop("accessType")) - def _parse_dataset_id(data: object) -> None | Unset | str: + def _parse_dataset_id(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) dataset_id = _parse_dataset_id(d.pop("datasetId", UNSET)) - def _parse_token_lifetime_hours(data: object) -> None | Unset | int: + def _parse_token_lifetime_hours(data: object) -> Union[None, Unset, int]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(Union[None, Unset, int], data) token_lifetime_hours = _parse_token_lifetime_hours(d.pop("tokenLifetimeHours", UNSET)) @@ -85,5 +85,5 @@ def _parse_token_lifetime_hours(data: object) -> None | Unset | int: return project_file_access_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_input.py b/cirro_api_client/v1/models/project_input.py index 8dfd057..91a60ad 100644 --- a/cirro_api_client/v1/models/project_input.py +++ b/cirro_api_client/v1/models/project_input.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -33,13 +33,13 @@ class ProjectInput: description: str billing_account_id: str settings: "ProjectSettings" - contacts: list["Contact"] + contacts: List["Contact"] account: Union["CloudAccount", None, Unset] = UNSET - classification_ids: list[str] | None | Unset = UNSET - tags: list["Tag"] | None | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + classification_ids: Union[List[str], None, Unset] = UNSET + tags: Union[List["Tag"], None, Unset] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: from ..models.cloud_account import CloudAccount name = self.name @@ -55,7 +55,7 @@ def to_dict(self) -> dict[str, Any]: contacts_item = contacts_item_data.to_dict() contacts.append(contacts_item) - account: dict[str, Any] | None | Unset + account: Union[Dict[str, Any], None, Unset] if isinstance(self.account, Unset): account = UNSET elif isinstance(self.account, CloudAccount): @@ -63,7 +63,7 @@ def to_dict(self) -> dict[str, Any]: else: account = self.account - classification_ids: list[str] | None | Unset + classification_ids: Union[List[str], None, Unset] if isinstance(self.classification_ids, Unset): classification_ids = UNSET elif isinstance(self.classification_ids, list): @@ -72,7 +72,7 @@ def to_dict(self) -> dict[str, Any]: else: classification_ids = self.classification_ids - tags: list[dict[str, Any]] | None | Unset + tags: Union[List[Dict[str, Any]], None, Unset] if isinstance(self.tags, Unset): tags = UNSET elif isinstance(self.tags, list): @@ -84,7 +84,7 @@ def to_dict(self) -> dict[str, Any]: else: tags = self.tags - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -105,7 +105,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.cloud_account import CloudAccount from ..models.contact import Contact from ..models.project_settings import ProjectSettings @@ -144,7 +144,7 @@ def _parse_account(data: object) -> Union["CloudAccount", None, Unset]: account = _parse_account(d.pop("account", UNSET)) - def _parse_classification_ids(data: object) -> list[str] | None | Unset: + def _parse_classification_ids(data: object) -> Union[List[str], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -152,16 +152,16 @@ def _parse_classification_ids(data: object) -> list[str] | None | Unset: try: if not isinstance(data, list): raise TypeError() - classification_ids_type_0 = cast(list[str], data) + classification_ids_type_0 = cast(List[str], data) return classification_ids_type_0 except: # noqa: E722 pass - return cast(list[str] | None | Unset, data) + return cast(Union[List[str], None, Unset], data) classification_ids = _parse_classification_ids(d.pop("classificationIds", UNSET)) - def _parse_tags(data: object) -> list["Tag"] | None | Unset: + def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -179,7 +179,7 @@ def _parse_tags(data: object) -> list["Tag"] | None | Unset: return tags_type_0 except: # noqa: E722 pass - return cast(list["Tag"] | None | Unset, data) + return cast(Union[List["Tag"], None, Unset], data) tags = _parse_tags(d.pop("tags", UNSET)) @@ -198,5 +198,5 @@ def _parse_tags(data: object) -> list["Tag"] | None | Unset: return project_input @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_metrics.py b/cirro_api_client/v1/models/project_metrics.py index 46b52dd..158aa75 100644 --- a/cirro_api_client/v1/models/project_metrics.py +++ b/cirro_api_client/v1/models/project_metrics.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,28 +26,28 @@ class ProjectMetrics: """ project_id: str - costs: Unset | list["MetricRecord"] = UNSET - storage_metrics: Unset | list["MetricRecord"] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + costs: Union[Unset, List["MetricRecord"]] = UNSET + storage_metrics: Union[Unset, List["MetricRecord"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: project_id = self.project_id - costs: Unset | list[dict[str, Any]] = UNSET + costs: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.costs, Unset): costs = [] for costs_item_data in self.costs: costs_item = costs_item_data.to_dict() costs.append(costs_item) - storage_metrics: Unset | list[dict[str, Any]] = UNSET + storage_metrics: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.storage_metrics, Unset): storage_metrics = [] for storage_metrics_item_data in self.storage_metrics: storage_metrics_item = storage_metrics_item_data.to_dict() storage_metrics.append(storage_metrics_item) - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -62,7 +62,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.metric_record import MetricRecord d = src_dict.copy() @@ -92,5 +92,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return project_metrics @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_request.py b/cirro_api_client/v1/models/project_request.py index dc9be52..fdbf74a 100644 --- a/cirro_api_client/v1/models/project_request.py +++ b/cirro_api_client/v1/models/project_request.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,13 +20,13 @@ class ProjectRequest: name: str description: str - classification_ids: list[str] + classification_ids: List[str] billing_info: str admin_username: str message: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name description = self.description @@ -39,7 +39,7 @@ def to_dict(self) -> dict[str, Any]: message = self.message - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -55,13 +55,13 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") description = d.pop("description") - classification_ids = cast(list[str], d.pop("classificationIds")) + classification_ids = cast(List[str], d.pop("classificationIds")) billing_info = d.pop("billingInfo") @@ -82,5 +82,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return project_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_requirement.py b/cirro_api_client/v1/models/project_requirement.py index 6984b95..e5f3353 100644 --- a/cirro_api_client/v1/models/project_requirement.py +++ b/cirro_api_client/v1/models/project_requirement.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -63,27 +63,27 @@ class ProjectRequirement: path: str supplemental_path: str scope: GovernanceScope - contacts: list["GovernanceContact"] + contacts: List["GovernanceContact"] is_enacted: bool is_project_configured: bool is_fulfilled: bool - acceptance: GovernanceScope | None | Unset = UNSET - enactment_date: None | Unset | datetime.datetime = UNSET - expiration_type: Unset | GovernanceExpiryType = UNSET - expiration_days_after_completion: None | Unset | int = UNSET - expiration_date: None | Unset | datetime.datetime = UNSET - supplemental_docs: list["GovernanceFile"] | None | Unset = UNSET + acceptance: Union[GovernanceScope, None, Unset] = UNSET + enactment_date: Union[None, Unset, datetime.datetime] = UNSET + expiration_type: Union[Unset, GovernanceExpiryType] = UNSET + expiration_days_after_completion: Union[None, Unset, int] = UNSET + expiration_date: Union[None, Unset, datetime.datetime] = UNSET + supplemental_docs: Union[List["GovernanceFile"], None, Unset] = UNSET file: Union["GovernanceFile", None, Unset] = UNSET - authorship: GovernanceScope | None | Unset = UNSET - verification_method: GovernanceTrainingVerification | None | Unset = UNSET - fulfillment_id: None | Unset | str = UNSET - fulfillment_date: None | Unset | datetime.datetime = UNSET - fulfillment_file: None | Unset | str = UNSET - fulfillment_path: None | Unset | str = UNSET - requires_user_fulfillment: Unset | bool = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: + authorship: Union[GovernanceScope, None, Unset] = UNSET + verification_method: Union[GovernanceTrainingVerification, None, Unset] = UNSET + fulfillment_id: Union[None, Unset, str] = UNSET + fulfillment_date: Union[None, Unset, datetime.datetime] = UNSET + fulfillment_file: Union[None, Unset, str] = UNSET + fulfillment_path: Union[None, Unset, str] = UNSET + requires_user_fulfillment: Union[Unset, bool] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: from ..models.governance_file import GovernanceFile id = self.id @@ -111,7 +111,7 @@ def to_dict(self) -> dict[str, Any]: is_fulfilled = self.is_fulfilled - acceptance: None | Unset | str + acceptance: Union[None, Unset, str] if isinstance(self.acceptance, Unset): acceptance = UNSET elif isinstance(self.acceptance, GovernanceScope): @@ -119,7 +119,7 @@ def to_dict(self) -> dict[str, Any]: else: acceptance = self.acceptance - enactment_date: None | Unset | str + enactment_date: Union[None, Unset, str] if isinstance(self.enactment_date, Unset): enactment_date = UNSET elif isinstance(self.enactment_date, datetime.datetime): @@ -127,17 +127,17 @@ def to_dict(self) -> dict[str, Any]: else: enactment_date = self.enactment_date - expiration_type: Unset | str = UNSET + expiration_type: Union[Unset, str] = UNSET if not isinstance(self.expiration_type, Unset): expiration_type = self.expiration_type.value - expiration_days_after_completion: None | Unset | int + expiration_days_after_completion: Union[None, Unset, int] if isinstance(self.expiration_days_after_completion, Unset): expiration_days_after_completion = UNSET else: expiration_days_after_completion = self.expiration_days_after_completion - expiration_date: None | Unset | str + expiration_date: Union[None, Unset, str] if isinstance(self.expiration_date, Unset): expiration_date = UNSET elif isinstance(self.expiration_date, datetime.datetime): @@ -145,7 +145,7 @@ def to_dict(self) -> dict[str, Any]: else: expiration_date = self.expiration_date - supplemental_docs: list[dict[str, Any]] | None | Unset + supplemental_docs: Union[List[Dict[str, Any]], None, Unset] if isinstance(self.supplemental_docs, Unset): supplemental_docs = UNSET elif isinstance(self.supplemental_docs, list): @@ -157,7 +157,7 @@ def to_dict(self) -> dict[str, Any]: else: supplemental_docs = self.supplemental_docs - file: dict[str, Any] | None | Unset + file: Union[Dict[str, Any], None, Unset] if isinstance(self.file, Unset): file = UNSET elif isinstance(self.file, GovernanceFile): @@ -165,7 +165,7 @@ def to_dict(self) -> dict[str, Any]: else: file = self.file - authorship: None | Unset | str + authorship: Union[None, Unset, str] if isinstance(self.authorship, Unset): authorship = UNSET elif isinstance(self.authorship, GovernanceScope): @@ -173,7 +173,7 @@ def to_dict(self) -> dict[str, Any]: else: authorship = self.authorship - verification_method: None | Unset | str + verification_method: Union[None, Unset, str] if isinstance(self.verification_method, Unset): verification_method = UNSET elif isinstance(self.verification_method, GovernanceTrainingVerification): @@ -181,13 +181,13 @@ def to_dict(self) -> dict[str, Any]: else: verification_method = self.verification_method - fulfillment_id: None | Unset | str + fulfillment_id: Union[None, Unset, str] if isinstance(self.fulfillment_id, Unset): fulfillment_id = UNSET else: fulfillment_id = self.fulfillment_id - fulfillment_date: None | Unset | str + fulfillment_date: Union[None, Unset, str] if isinstance(self.fulfillment_date, Unset): fulfillment_date = UNSET elif isinstance(self.fulfillment_date, datetime.datetime): @@ -195,13 +195,13 @@ def to_dict(self) -> dict[str, Any]: else: fulfillment_date = self.fulfillment_date - fulfillment_file: None | Unset | str + fulfillment_file: Union[None, Unset, str] if isinstance(self.fulfillment_file, Unset): fulfillment_file = UNSET else: fulfillment_file = self.fulfillment_file - fulfillment_path: None | Unset | str + fulfillment_path: Union[None, Unset, str] if isinstance(self.fulfillment_path, Unset): fulfillment_path = UNSET else: @@ -209,7 +209,7 @@ def to_dict(self) -> dict[str, Any]: requires_user_fulfillment = self.requires_user_fulfillment - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -258,7 +258,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.governance_contact import GovernanceContact from ..models.governance_file import GovernanceFile @@ -290,7 +290,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: is_fulfilled = d.pop("isFulfilled") - def _parse_acceptance(data: object) -> GovernanceScope | None | Unset: + def _parse_acceptance(data: object) -> Union[GovernanceScope, None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -303,11 +303,11 @@ def _parse_acceptance(data: object) -> GovernanceScope | None | Unset: return acceptance_type_1 except: # noqa: E722 pass - return cast(GovernanceScope | None | Unset, data) + return cast(Union[GovernanceScope, None, Unset], data) acceptance = _parse_acceptance(d.pop("acceptance", UNSET)) - def _parse_enactment_date(data: object) -> None | Unset | datetime.datetime: + def _parse_enactment_date(data: object) -> Union[None, Unset, datetime.datetime]: if data is None: return data if isinstance(data, Unset): @@ -320,29 +320,29 @@ def _parse_enactment_date(data: object) -> None | Unset | datetime.datetime: return enactment_date_type_0 except: # noqa: E722 pass - return cast(None | Unset | datetime.datetime, data) + return cast(Union[None, Unset, datetime.datetime], data) enactment_date = _parse_enactment_date(d.pop("enactmentDate", UNSET)) _expiration_type = d.pop("expirationType", UNSET) - expiration_type: Unset | GovernanceExpiryType + expiration_type: Union[Unset, GovernanceExpiryType] if isinstance(_expiration_type, Unset): expiration_type = UNSET else: expiration_type = GovernanceExpiryType(_expiration_type) - def _parse_expiration_days_after_completion(data: object) -> None | Unset | int: + def _parse_expiration_days_after_completion(data: object) -> Union[None, Unset, int]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | int, data) + return cast(Union[None, Unset, int], data) expiration_days_after_completion = _parse_expiration_days_after_completion( d.pop("expirationDaysAfterCompletion", UNSET) ) - def _parse_expiration_date(data: object) -> None | Unset | datetime.datetime: + def _parse_expiration_date(data: object) -> Union[None, Unset, datetime.datetime]: if data is None: return data if isinstance(data, Unset): @@ -355,11 +355,11 @@ def _parse_expiration_date(data: object) -> None | Unset | datetime.datetime: return expiration_date_type_0 except: # noqa: E722 pass - return cast(None | Unset | datetime.datetime, data) + return cast(Union[None, Unset, datetime.datetime], data) expiration_date = _parse_expiration_date(d.pop("expirationDate", UNSET)) - def _parse_supplemental_docs(data: object) -> list["GovernanceFile"] | None | Unset: + def _parse_supplemental_docs(data: object) -> Union[List["GovernanceFile"], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -377,7 +377,7 @@ def _parse_supplemental_docs(data: object) -> list["GovernanceFile"] | None | Un return supplemental_docs_type_0 except: # noqa: E722 pass - return cast(list["GovernanceFile"] | None | Unset, data) + return cast(Union[List["GovernanceFile"], None, Unset], data) supplemental_docs = _parse_supplemental_docs(d.pop("supplementalDocs", UNSET)) @@ -398,7 +398,7 @@ def _parse_file(data: object) -> Union["GovernanceFile", None, Unset]: file = _parse_file(d.pop("file", UNSET)) - def _parse_authorship(data: object) -> GovernanceScope | None | Unset: + def _parse_authorship(data: object) -> Union[GovernanceScope, None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -411,11 +411,11 @@ def _parse_authorship(data: object) -> GovernanceScope | None | Unset: return authorship_type_1 except: # noqa: E722 pass - return cast(GovernanceScope | None | Unset, data) + return cast(Union[GovernanceScope, None, Unset], data) authorship = _parse_authorship(d.pop("authorship", UNSET)) - def _parse_verification_method(data: object) -> GovernanceTrainingVerification | None | Unset: + def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerification, None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -428,20 +428,20 @@ def _parse_verification_method(data: object) -> GovernanceTrainingVerification | return verification_method_type_1 except: # noqa: E722 pass - return cast(GovernanceTrainingVerification | None | Unset, data) + return cast(Union[GovernanceTrainingVerification, None, Unset], data) verification_method = _parse_verification_method(d.pop("verificationMethod", UNSET)) - def _parse_fulfillment_id(data: object) -> None | Unset | str: + def _parse_fulfillment_id(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) fulfillment_id = _parse_fulfillment_id(d.pop("fulfillmentId", UNSET)) - def _parse_fulfillment_date(data: object) -> None | Unset | datetime.datetime: + def _parse_fulfillment_date(data: object) -> Union[None, Unset, datetime.datetime]: if data is None: return data if isinstance(data, Unset): @@ -454,25 +454,25 @@ def _parse_fulfillment_date(data: object) -> None | Unset | datetime.datetime: return fulfillment_date_type_0 except: # noqa: E722 pass - return cast(None | Unset | datetime.datetime, data) + return cast(Union[None, Unset, datetime.datetime], data) fulfillment_date = _parse_fulfillment_date(d.pop("fulfillmentDate", UNSET)) - def _parse_fulfillment_file(data: object) -> None | Unset | str: + def _parse_fulfillment_file(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) fulfillment_file = _parse_fulfillment_file(d.pop("fulfillmentFile", UNSET)) - def _parse_fulfillment_path(data: object) -> None | Unset | str: + def _parse_fulfillment_path(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) fulfillment_path = _parse_fulfillment_path(d.pop("fulfillmentPath", UNSET)) @@ -510,5 +510,5 @@ def _parse_fulfillment_path(data: object) -> None | Unset | str: return project_requirement @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_settings.py b/cirro_api_client/v1/models/project_settings.py index 3cb32b3..3ec8132 100644 --- a/cirro_api_client/v1/models/project_settings.py +++ b/cirro_api_client/v1/models/project_settings.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -52,31 +52,31 @@ class ProjectSettings: budget_amount: int budget_period: BudgetPeriod - enable_backup: Unset | bool = False - enable_sftp: Unset | bool = False - service_connections: Unset | list[str] = UNSET - kms_arn: None | Unset | str = UNSET - retention_policy_days: Unset | int = 7 - temporary_storage_lifetime_days: Unset | int = 14 - vpc_id: None | Unset | str = UNSET - batch_subnets: list[str] | None | Unset = UNSET - sagemaker_subnets: list[str] | None | Unset = UNSET - workspace_subnets: list[str] | None | Unset = UNSET - max_spot_vcpu: Unset | int = 0 - max_fpgavcpu: Unset | int = 0 - max_gpuvcpu: Unset | int = 0 - enable_dragen: Unset | bool = False - dragen_ami: None | Unset | str = UNSET - max_workspaces_vcpu: Unset | int = 0 - max_workspaces_gpuvcpu: Unset | int = 0 - max_workspaces_per_user: Unset | int = 0 - is_discoverable: None | Unset | bool = False - is_shareable: None | Unset | bool = False - has_pipelines_enabled: None | Unset | bool = False - has_workspaces_enabled: None | Unset | bool = False - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: + enable_backup: Union[Unset, bool] = False + enable_sftp: Union[Unset, bool] = False + service_connections: Union[Unset, List[str]] = UNSET + kms_arn: Union[None, Unset, str] = UNSET + retention_policy_days: Union[Unset, int] = 7 + temporary_storage_lifetime_days: Union[Unset, int] = 14 + vpc_id: Union[None, Unset, str] = UNSET + batch_subnets: Union[List[str], None, Unset] = UNSET + sagemaker_subnets: Union[List[str], None, Unset] = UNSET + workspace_subnets: Union[List[str], None, Unset] = UNSET + max_spot_vcpu: Union[Unset, int] = 0 + max_fpgavcpu: Union[Unset, int] = 0 + max_gpuvcpu: Union[Unset, int] = 0 + enable_dragen: Union[Unset, bool] = False + dragen_ami: Union[None, Unset, str] = UNSET + max_workspaces_vcpu: Union[Unset, int] = 0 + max_workspaces_gpuvcpu: Union[Unset, int] = 0 + max_workspaces_per_user: Union[Unset, int] = 0 + is_discoverable: Union[None, Unset, bool] = False + is_shareable: Union[None, Unset, bool] = False + has_pipelines_enabled: Union[None, Unset, bool] = False + has_workspaces_enabled: Union[None, Unset, bool] = False + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: budget_amount = self.budget_amount budget_period = self.budget_period.value @@ -85,11 +85,11 @@ def to_dict(self) -> dict[str, Any]: enable_sftp = self.enable_sftp - service_connections: Unset | list[str] = UNSET + service_connections: Union[Unset, List[str]] = UNSET if not isinstance(self.service_connections, Unset): service_connections = self.service_connections - kms_arn: None | Unset | str + kms_arn: Union[None, Unset, str] if isinstance(self.kms_arn, Unset): kms_arn = UNSET else: @@ -99,13 +99,13 @@ def to_dict(self) -> dict[str, Any]: temporary_storage_lifetime_days = self.temporary_storage_lifetime_days - vpc_id: None | Unset | str + vpc_id: Union[None, Unset, str] if isinstance(self.vpc_id, Unset): vpc_id = UNSET else: vpc_id = self.vpc_id - batch_subnets: list[str] | None | Unset + batch_subnets: Union[List[str], None, Unset] if isinstance(self.batch_subnets, Unset): batch_subnets = UNSET elif isinstance(self.batch_subnets, list): @@ -114,7 +114,7 @@ def to_dict(self) -> dict[str, Any]: else: batch_subnets = self.batch_subnets - sagemaker_subnets: list[str] | None | Unset + sagemaker_subnets: Union[List[str], None, Unset] if isinstance(self.sagemaker_subnets, Unset): sagemaker_subnets = UNSET elif isinstance(self.sagemaker_subnets, list): @@ -123,7 +123,7 @@ def to_dict(self) -> dict[str, Any]: else: sagemaker_subnets = self.sagemaker_subnets - workspace_subnets: list[str] | None | Unset + workspace_subnets: Union[List[str], None, Unset] if isinstance(self.workspace_subnets, Unset): workspace_subnets = UNSET elif isinstance(self.workspace_subnets, list): @@ -140,7 +140,7 @@ def to_dict(self) -> dict[str, Any]: enable_dragen = self.enable_dragen - dragen_ami: None | Unset | str + dragen_ami: Union[None, Unset, str] if isinstance(self.dragen_ami, Unset): dragen_ami = UNSET else: @@ -152,31 +152,31 @@ def to_dict(self) -> dict[str, Any]: max_workspaces_per_user = self.max_workspaces_per_user - is_discoverable: None | Unset | bool + is_discoverable: Union[None, Unset, bool] if isinstance(self.is_discoverable, Unset): is_discoverable = UNSET else: is_discoverable = self.is_discoverable - is_shareable: None | Unset | bool + is_shareable: Union[None, Unset, bool] if isinstance(self.is_shareable, Unset): is_shareable = UNSET else: is_shareable = self.is_shareable - has_pipelines_enabled: None | Unset | bool + has_pipelines_enabled: Union[None, Unset, bool] if isinstance(self.has_pipelines_enabled, Unset): has_pipelines_enabled = UNSET else: has_pipelines_enabled = self.has_pipelines_enabled - has_workspaces_enabled: None | Unset | bool + has_workspaces_enabled: Union[None, Unset, bool] if isinstance(self.has_workspaces_enabled, Unset): has_workspaces_enabled = UNSET else: has_workspaces_enabled = self.has_workspaces_enabled - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -232,7 +232,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() budget_amount = d.pop("budgetAmount") @@ -242,14 +242,14 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: enable_sftp = d.pop("enableSftp", UNSET) - service_connections = cast(list[str], d.pop("serviceConnections", UNSET)) + service_connections = cast(List[str], d.pop("serviceConnections", UNSET)) - def _parse_kms_arn(data: object) -> None | Unset | str: + def _parse_kms_arn(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) kms_arn = _parse_kms_arn(d.pop("kmsArn", UNSET)) @@ -257,16 +257,16 @@ def _parse_kms_arn(data: object) -> None | Unset | str: temporary_storage_lifetime_days = d.pop("temporaryStorageLifetimeDays", UNSET) - def _parse_vpc_id(data: object) -> None | Unset | str: + def _parse_vpc_id(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) vpc_id = _parse_vpc_id(d.pop("vpcId", UNSET)) - def _parse_batch_subnets(data: object) -> list[str] | None | Unset: + def _parse_batch_subnets(data: object) -> Union[List[str], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -274,16 +274,16 @@ def _parse_batch_subnets(data: object) -> list[str] | None | Unset: try: if not isinstance(data, list): raise TypeError() - batch_subnets_type_0 = cast(list[str], data) + batch_subnets_type_0 = cast(List[str], data) return batch_subnets_type_0 except: # noqa: E722 pass - return cast(list[str] | None | Unset, data) + return cast(Union[List[str], None, Unset], data) batch_subnets = _parse_batch_subnets(d.pop("batchSubnets", UNSET)) - def _parse_sagemaker_subnets(data: object) -> list[str] | None | Unset: + def _parse_sagemaker_subnets(data: object) -> Union[List[str], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -291,16 +291,16 @@ def _parse_sagemaker_subnets(data: object) -> list[str] | None | Unset: try: if not isinstance(data, list): raise TypeError() - sagemaker_subnets_type_0 = cast(list[str], data) + sagemaker_subnets_type_0 = cast(List[str], data) return sagemaker_subnets_type_0 except: # noqa: E722 pass - return cast(list[str] | None | Unset, data) + return cast(Union[List[str], None, Unset], data) sagemaker_subnets = _parse_sagemaker_subnets(d.pop("sagemakerSubnets", UNSET)) - def _parse_workspace_subnets(data: object) -> list[str] | None | Unset: + def _parse_workspace_subnets(data: object) -> Union[List[str], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -308,12 +308,12 @@ def _parse_workspace_subnets(data: object) -> list[str] | None | Unset: try: if not isinstance(data, list): raise TypeError() - workspace_subnets_type_0 = cast(list[str], data) + workspace_subnets_type_0 = cast(List[str], data) return workspace_subnets_type_0 except: # noqa: E722 pass - return cast(list[str] | None | Unset, data) + return cast(Union[List[str], None, Unset], data) workspace_subnets = _parse_workspace_subnets(d.pop("workspaceSubnets", UNSET)) @@ -325,12 +325,12 @@ def _parse_workspace_subnets(data: object) -> list[str] | None | Unset: enable_dragen = d.pop("enableDragen", UNSET) - def _parse_dragen_ami(data: object) -> None | Unset | str: + def _parse_dragen_ami(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) dragen_ami = _parse_dragen_ami(d.pop("dragenAmi", UNSET)) @@ -340,39 +340,39 @@ def _parse_dragen_ami(data: object) -> None | Unset | str: max_workspaces_per_user = d.pop("maxWorkspacesPerUser", UNSET) - def _parse_is_discoverable(data: object) -> None | Unset | bool: + def _parse_is_discoverable(data: object) -> Union[None, Unset, bool]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(Union[None, Unset, bool], data) is_discoverable = _parse_is_discoverable(d.pop("isDiscoverable", UNSET)) - def _parse_is_shareable(data: object) -> None | Unset | bool: + def _parse_is_shareable(data: object) -> Union[None, Unset, bool]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(Union[None, Unset, bool], data) is_shareable = _parse_is_shareable(d.pop("isShareable", UNSET)) - def _parse_has_pipelines_enabled(data: object) -> None | Unset | bool: + def _parse_has_pipelines_enabled(data: object) -> Union[None, Unset, bool]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(Union[None, Unset, bool], data) has_pipelines_enabled = _parse_has_pipelines_enabled(d.pop("hasPipelinesEnabled", UNSET)) - def _parse_has_workspaces_enabled(data: object) -> None | Unset | bool: + def _parse_has_workspaces_enabled(data: object) -> Union[None, Unset, bool]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | bool, data) + return cast(Union[None, Unset, bool], data) has_workspaces_enabled = _parse_has_workspaces_enabled(d.pop("hasWorkspacesEnabled", UNSET)) @@ -407,5 +407,5 @@ def _parse_has_workspaces_enabled(data: object) -> None | Unset | bool: return project_settings @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/project_user.py b/cirro_api_client/v1/models/project_user.py index 994394b..f1a8616 100644 --- a/cirro_api_client/v1/models/project_user.py +++ b/cirro_api_client/v1/models/project_user.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,9 +28,9 @@ class ProjectUser: email: str job_title: str role: ProjectRole - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name username = self.username @@ -45,7 +45,7 @@ def to_dict(self) -> dict[str, Any]: role = self.role.value - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -62,7 +62,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -92,5 +92,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return project_user @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/reference.py b/cirro_api_client/v1/models/reference.py index e797a30..5df9055 100644 --- a/cirro_api_client/v1/models/reference.py +++ b/cirro_api_client/v1/models/reference.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -29,12 +29,12 @@ class Reference: name: str description: str type: str - files: list["FileEntry"] + files: List["FileEntry"] created_by: str created_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -52,7 +52,7 @@ def to_dict(self) -> dict[str, Any]: created_at = self.created_at.isoformat() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -69,7 +69,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.file_entry import FileEntry d = src_dict.copy() @@ -106,5 +106,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return reference @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/reference_type.py b/cirro_api_client/v1/models/reference_type.py index 7e503b1..e8124ff 100644 --- a/cirro_api_client/v1/models/reference_type.py +++ b/cirro_api_client/v1/models/reference_type.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,10 +23,10 @@ class ReferenceType: name: str description: str directory: str - validation: list["ReferenceTypeValidationItem"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + validation: List["ReferenceTypeValidationItem"] + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name description = self.description @@ -38,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: validation_item = validation_item_data.to_dict() validation.append(validation_item) - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -52,7 +52,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.reference_type_validation_item import ReferenceTypeValidationItem d = src_dict.copy() @@ -80,5 +80,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return reference_type @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/reference_type_validation_item.py b/cirro_api_client/v1/models/reference_type_validation_item.py index 49a7ef0..680bd17 100644 --- a/cirro_api_client/v1/models/reference_type_validation_item.py +++ b/cirro_api_client/v1/models/reference_type_validation_item.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class ReferenceTypeValidationItem: """ """ - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() reference_type_validation_item = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return reference_type_validation_item @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/requirement_fulfillment_input.py b/cirro_api_client/v1/models/requirement_fulfillment_input.py index 40c46d7..f2fdd8d 100644 --- a/cirro_api_client/v1/models/requirement_fulfillment_input.py +++ b/cirro_api_client/v1/models/requirement_fulfillment_input.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,18 +18,18 @@ class RequirementFulfillmentInput: completed_on (Union[None, Unset, datetime.datetime]): If not provided, defaults to the current instant """ - file: None | Unset | str = UNSET - completed_on: None | Unset | datetime.datetime = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + file: Union[None, Unset, str] = UNSET + completed_on: Union[None, Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - file: None | Unset | str + def to_dict(self) -> Dict[str, Any]: + file: Union[None, Unset, str] if isinstance(self.file, Unset): file = UNSET else: file = self.file - completed_on: None | Unset | str + completed_on: Union[None, Unset, str] if isinstance(self.completed_on, Unset): completed_on = UNSET elif isinstance(self.completed_on, datetime.datetime): @@ -37,7 +37,7 @@ def to_dict(self) -> dict[str, Any]: else: completed_on = self.completed_on - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if file is not UNSET: @@ -48,19 +48,19 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() - def _parse_file(data: object) -> None | Unset | str: + def _parse_file(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) file = _parse_file(d.pop("file", UNSET)) - def _parse_completed_on(data: object) -> None | Unset | datetime.datetime: + def _parse_completed_on(data: object) -> Union[None, Unset, datetime.datetime]: if data is None: return data if isinstance(data, Unset): @@ -73,7 +73,7 @@ def _parse_completed_on(data: object) -> None | Unset | datetime.datetime: return completed_on_type_0 except: # noqa: E722 pass - return cast(None | Unset | datetime.datetime, data) + return cast(Union[None, Unset, datetime.datetime], data) completed_on = _parse_completed_on(d.pop("completedOn", UNSET)) @@ -86,5 +86,5 @@ def _parse_completed_on(data: object) -> None | Unset | datetime.datetime: return requirement_fulfillment_input @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/requirement_input.py b/cirro_api_client/v1/models/requirement_input.py index 2881926..ba13e0f 100644 --- a/cirro_api_client/v1/models/requirement_input.py +++ b/cirro_api_client/v1/models/requirement_input.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -41,18 +41,18 @@ class RequirementInput: description: str type: GovernanceType scope: GovernanceScope - contact_ids: list[str] + contact_ids: List[str] expiration: "GovernanceExpiry" - project_id: None | Unset | str = UNSET - acceptance: GovernanceScope | None | Unset = UNSET - enactment_date: None | Unset | datetime.datetime = UNSET - supplemental_docs: list["GovernanceFile"] | None | Unset = UNSET + project_id: Union[None, Unset, str] = UNSET + acceptance: Union[GovernanceScope, None, Unset] = UNSET + enactment_date: Union[None, Unset, datetime.datetime] = UNSET + supplemental_docs: Union[List["GovernanceFile"], None, Unset] = UNSET file: Union["GovernanceFile", None, Unset] = UNSET - authorship: GovernanceScope | None | Unset = UNSET - verification_method: GovernanceTrainingVerification | None | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + authorship: Union[GovernanceScope, None, Unset] = UNSET + verification_method: Union[GovernanceTrainingVerification, None, Unset] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: from ..models.governance_file import GovernanceFile name = self.name @@ -67,13 +67,13 @@ def to_dict(self) -> dict[str, Any]: expiration = self.expiration.to_dict() - project_id: None | Unset | str + project_id: Union[None, Unset, str] if isinstance(self.project_id, Unset): project_id = UNSET else: project_id = self.project_id - acceptance: None | Unset | str + acceptance: Union[None, Unset, str] if isinstance(self.acceptance, Unset): acceptance = UNSET elif isinstance(self.acceptance, GovernanceScope): @@ -81,7 +81,7 @@ def to_dict(self) -> dict[str, Any]: else: acceptance = self.acceptance - enactment_date: None | Unset | str + enactment_date: Union[None, Unset, str] if isinstance(self.enactment_date, Unset): enactment_date = UNSET elif isinstance(self.enactment_date, datetime.datetime): @@ -89,7 +89,7 @@ def to_dict(self) -> dict[str, Any]: else: enactment_date = self.enactment_date - supplemental_docs: list[dict[str, Any]] | None | Unset + supplemental_docs: Union[List[Dict[str, Any]], None, Unset] if isinstance(self.supplemental_docs, Unset): supplemental_docs = UNSET elif isinstance(self.supplemental_docs, list): @@ -101,7 +101,7 @@ def to_dict(self) -> dict[str, Any]: else: supplemental_docs = self.supplemental_docs - file: dict[str, Any] | None | Unset + file: Union[Dict[str, Any], None, Unset] if isinstance(self.file, Unset): file = UNSET elif isinstance(self.file, GovernanceFile): @@ -109,7 +109,7 @@ def to_dict(self) -> dict[str, Any]: else: file = self.file - authorship: None | Unset | str + authorship: Union[None, Unset, str] if isinstance(self.authorship, Unset): authorship = UNSET elif isinstance(self.authorship, GovernanceScope): @@ -117,7 +117,7 @@ def to_dict(self) -> dict[str, Any]: else: authorship = self.authorship - verification_method: None | Unset | str + verification_method: Union[None, Unset, str] if isinstance(self.verification_method, Unset): verification_method = UNSET elif isinstance(self.verification_method, GovernanceTrainingVerification): @@ -125,7 +125,7 @@ def to_dict(self) -> dict[str, Any]: else: verification_method = self.verification_method - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -155,7 +155,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.governance_expiry import GovernanceExpiry from ..models.governance_file import GovernanceFile @@ -168,20 +168,20 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: scope = GovernanceScope(d.pop("scope")) - contact_ids = cast(list[str], d.pop("contactIds")) + contact_ids = cast(List[str], d.pop("contactIds")) expiration = GovernanceExpiry.from_dict(d.pop("expiration")) - def _parse_project_id(data: object) -> None | Unset | str: + def _parse_project_id(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) project_id = _parse_project_id(d.pop("projectId", UNSET)) - def _parse_acceptance(data: object) -> GovernanceScope | None | Unset: + def _parse_acceptance(data: object) -> Union[GovernanceScope, None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -194,11 +194,11 @@ def _parse_acceptance(data: object) -> GovernanceScope | None | Unset: return acceptance_type_1 except: # noqa: E722 pass - return cast(GovernanceScope | None | Unset, data) + return cast(Union[GovernanceScope, None, Unset], data) acceptance = _parse_acceptance(d.pop("acceptance", UNSET)) - def _parse_enactment_date(data: object) -> None | Unset | datetime.datetime: + def _parse_enactment_date(data: object) -> Union[None, Unset, datetime.datetime]: if data is None: return data if isinstance(data, Unset): @@ -211,11 +211,11 @@ def _parse_enactment_date(data: object) -> None | Unset | datetime.datetime: return enactment_date_type_0 except: # noqa: E722 pass - return cast(None | Unset | datetime.datetime, data) + return cast(Union[None, Unset, datetime.datetime], data) enactment_date = _parse_enactment_date(d.pop("enactmentDate", UNSET)) - def _parse_supplemental_docs(data: object) -> list["GovernanceFile"] | None | Unset: + def _parse_supplemental_docs(data: object) -> Union[List["GovernanceFile"], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -233,7 +233,7 @@ def _parse_supplemental_docs(data: object) -> list["GovernanceFile"] | None | Un return supplemental_docs_type_0 except: # noqa: E722 pass - return cast(list["GovernanceFile"] | None | Unset, data) + return cast(Union[List["GovernanceFile"], None, Unset], data) supplemental_docs = _parse_supplemental_docs(d.pop("supplementalDocs", UNSET)) @@ -254,7 +254,7 @@ def _parse_file(data: object) -> Union["GovernanceFile", None, Unset]: file = _parse_file(d.pop("file", UNSET)) - def _parse_authorship(data: object) -> GovernanceScope | None | Unset: + def _parse_authorship(data: object) -> Union[GovernanceScope, None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -267,11 +267,11 @@ def _parse_authorship(data: object) -> GovernanceScope | None | Unset: return authorship_type_1 except: # noqa: E722 pass - return cast(GovernanceScope | None | Unset, data) + return cast(Union[GovernanceScope, None, Unset], data) authorship = _parse_authorship(d.pop("authorship", UNSET)) - def _parse_verification_method(data: object) -> GovernanceTrainingVerification | None | Unset: + def _parse_verification_method(data: object) -> Union[GovernanceTrainingVerification, None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -284,7 +284,7 @@ def _parse_verification_method(data: object) -> GovernanceTrainingVerification | return verification_method_type_1 except: # noqa: E722 pass - return cast(GovernanceTrainingVerification | None | Unset, data) + return cast(Union[GovernanceTrainingVerification, None, Unset], data) verification_method = _parse_verification_method(d.pop("verificationMethod", UNSET)) @@ -308,5 +308,5 @@ def _parse_verification_method(data: object) -> GovernanceTrainingVerification | return requirement_input @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/resources_info.py b/cirro_api_client/v1/models/resources_info.py index 025d969..1fad5c2 100644 --- a/cirro_api_client/v1/models/resources_info.py +++ b/cirro_api_client/v1/models/resources_info.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +22,9 @@ class ResourcesInfo: date: datetime.datetime repository: str source_version: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: commit = self.commit date = self.date.isoformat() @@ -33,7 +33,7 @@ def to_dict(self) -> dict[str, Any]: source_version = self.source_version - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -47,7 +47,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() commit = d.pop("commit") @@ -68,5 +68,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return resources_info @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/run_analysis_request.py b/cirro_api_client/v1/models/run_analysis_request.py index 7710457..3aec141 100644 --- a/cirro_api_client/v1/models/run_analysis_request.py +++ b/cirro_api_client/v1/models/run_analysis_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -36,17 +36,17 @@ class RunAnalysisRequest: name: str process_id: str - source_dataset_ids: list[str] + source_dataset_ids: List[str] params: "RunAnalysisRequestParams" - notification_emails: list[str] - description: None | Unset | str = UNSET - source_sample_ids: list[str] | None | Unset = UNSET + notification_emails: List[str] + description: Union[None, Unset, str] = UNSET + source_sample_ids: Union[List[str], None, Unset] = UNSET source_sample_files_map: Union["RunAnalysisRequestSourceSampleFilesMap", None, Unset] = UNSET - resume_dataset_id: None | Unset | str = UNSET - compute_environment_id: None | Unset | str = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + resume_dataset_id: Union[None, Unset, str] = UNSET + compute_environment_id: Union[None, Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: from ..models.run_analysis_request_source_sample_files_map import RunAnalysisRequestSourceSampleFilesMap name = self.name @@ -59,13 +59,13 @@ def to_dict(self) -> dict[str, Any]: notification_emails = self.notification_emails - description: None | Unset | str + description: Union[None, Unset, str] if isinstance(self.description, Unset): description = UNSET else: description = self.description - source_sample_ids: list[str] | None | Unset + source_sample_ids: Union[List[str], None, Unset] if isinstance(self.source_sample_ids, Unset): source_sample_ids = UNSET elif isinstance(self.source_sample_ids, list): @@ -74,7 +74,7 @@ def to_dict(self) -> dict[str, Any]: else: source_sample_ids = self.source_sample_ids - source_sample_files_map: dict[str, Any] | None | Unset + source_sample_files_map: Union[Dict[str, Any], None, Unset] if isinstance(self.source_sample_files_map, Unset): source_sample_files_map = UNSET elif isinstance(self.source_sample_files_map, RunAnalysisRequestSourceSampleFilesMap): @@ -82,19 +82,19 @@ def to_dict(self) -> dict[str, Any]: else: source_sample_files_map = self.source_sample_files_map - resume_dataset_id: None | Unset | str + resume_dataset_id: Union[None, Unset, str] if isinstance(self.resume_dataset_id, Unset): resume_dataset_id = UNSET else: resume_dataset_id = self.resume_dataset_id - compute_environment_id: None | Unset | str + compute_environment_id: Union[None, Unset, str] if isinstance(self.compute_environment_id, Unset): compute_environment_id = UNSET else: compute_environment_id = self.compute_environment_id - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -119,7 +119,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.run_analysis_request_params import RunAnalysisRequestParams from ..models.run_analysis_request_source_sample_files_map import RunAnalysisRequestSourceSampleFilesMap @@ -128,22 +128,22 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: process_id = d.pop("processId") - source_dataset_ids = cast(list[str], d.pop("sourceDatasetIds")) + source_dataset_ids = cast(List[str], d.pop("sourceDatasetIds")) params = RunAnalysisRequestParams.from_dict(d.pop("params")) - notification_emails = cast(list[str], d.pop("notificationEmails")) + notification_emails = cast(List[str], d.pop("notificationEmails")) - def _parse_description(data: object) -> None | Unset | str: + def _parse_description(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) description = _parse_description(d.pop("description", UNSET)) - def _parse_source_sample_ids(data: object) -> list[str] | None | Unset: + def _parse_source_sample_ids(data: object) -> Union[List[str], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -151,12 +151,12 @@ def _parse_source_sample_ids(data: object) -> list[str] | None | Unset: try: if not isinstance(data, list): raise TypeError() - source_sample_ids_type_0 = cast(list[str], data) + source_sample_ids_type_0 = cast(List[str], data) return source_sample_ids_type_0 except: # noqa: E722 pass - return cast(list[str] | None | Unset, data) + return cast(Union[List[str], None, Unset], data) source_sample_ids = _parse_source_sample_ids(d.pop("sourceSampleIds", UNSET)) @@ -179,21 +179,21 @@ def _parse_source_sample_files_map( source_sample_files_map = _parse_source_sample_files_map(d.pop("sourceSampleFilesMap", UNSET)) - def _parse_resume_dataset_id(data: object) -> None | Unset | str: + def _parse_resume_dataset_id(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) resume_dataset_id = _parse_resume_dataset_id(d.pop("resumeDatasetId", UNSET)) - def _parse_compute_environment_id(data: object) -> None | Unset | str: + def _parse_compute_environment_id(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) compute_environment_id = _parse_compute_environment_id(d.pop("computeEnvironmentId", UNSET)) @@ -214,5 +214,5 @@ def _parse_compute_environment_id(data: object) -> None | Unset | str: return run_analysis_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/run_analysis_request_params.py b/cirro_api_client/v1/models/run_analysis_request_params.py index 001cdec..2938ce1 100644 --- a/cirro_api_client/v1/models/run_analysis_request_params.py +++ b/cirro_api_client/v1/models/run_analysis_request_params.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class RunAnalysisRequestParams: """Parameters used in workflow (can be empty)""" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() run_analysis_request_params = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return run_analysis_request_params @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/run_analysis_request_source_sample_files_map.py b/cirro_api_client/v1/models/run_analysis_request_source_sample_files_map.py index e58e93d..544a69a 100644 --- a/cirro_api_client/v1/models/run_analysis_request_source_sample_files_map.py +++ b/cirro_api_client/v1/models/run_analysis_request_source_sample_files_map.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -13,10 +13,10 @@ class RunAnalysisRequestSourceSampleFilesMap: """ - additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, List[str]] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = prop @@ -25,13 +25,13 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() run_analysis_request_source_sample_files_map = cls() additional_properties = {} for prop_name, prop_dict in d.items(): - additional_property = cast(list[str], prop_dict) + additional_property = cast(List[str], prop_dict) additional_properties[prop_name] = additional_property @@ -39,5 +39,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return run_analysis_request_source_sample_files_map @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/sample.py b/cirro_api_client/v1/models/sample.py index a6366a2..572e3e8 100644 --- a/cirro_api_client/v1/models/sample.py +++ b/cirro_api_client/v1/models/sample.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -31,20 +31,20 @@ class Sample: id: str name: str metadata: Union["SampleMetadata", None, Unset] = UNSET - files: list["DataFile"] | None | Unset = UNSET - dataset_ids: list[str] | None | Unset = UNSET - created_at: None | Unset | datetime.datetime = UNSET - updated_at: None | Unset | datetime.datetime = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + files: Union[List["DataFile"], None, Unset] = UNSET + dataset_ids: Union[List[str], None, Unset] = UNSET + created_at: Union[None, Unset, datetime.datetime] = UNSET + updated_at: Union[None, Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: from ..models.sample_metadata import SampleMetadata id = self.id name = self.name - metadata: dict[str, Any] | None | Unset + metadata: Union[Dict[str, Any], None, Unset] if isinstance(self.metadata, Unset): metadata = UNSET elif isinstance(self.metadata, SampleMetadata): @@ -52,7 +52,7 @@ def to_dict(self) -> dict[str, Any]: else: metadata = self.metadata - files: list[dict[str, Any]] | None | Unset + files: Union[List[Dict[str, Any]], None, Unset] if isinstance(self.files, Unset): files = UNSET elif isinstance(self.files, list): @@ -64,7 +64,7 @@ def to_dict(self) -> dict[str, Any]: else: files = self.files - dataset_ids: list[str] | None | Unset + dataset_ids: Union[List[str], None, Unset] if isinstance(self.dataset_ids, Unset): dataset_ids = UNSET elif isinstance(self.dataset_ids, list): @@ -73,7 +73,7 @@ def to_dict(self) -> dict[str, Any]: else: dataset_ids = self.dataset_ids - created_at: None | Unset | str + created_at: Union[None, Unset, str] if isinstance(self.created_at, Unset): created_at = UNSET elif isinstance(self.created_at, datetime.datetime): @@ -81,7 +81,7 @@ def to_dict(self) -> dict[str, Any]: else: created_at = self.created_at - updated_at: None | Unset | str + updated_at: Union[None, Unset, str] if isinstance(self.updated_at, Unset): updated_at = UNSET elif isinstance(self.updated_at, datetime.datetime): @@ -89,7 +89,7 @@ def to_dict(self) -> dict[str, Any]: else: updated_at = self.updated_at - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -111,7 +111,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.data_file import DataFile from ..models.sample_metadata import SampleMetadata @@ -137,7 +137,7 @@ def _parse_metadata(data: object) -> Union["SampleMetadata", None, Unset]: metadata = _parse_metadata(d.pop("metadata", UNSET)) - def _parse_files(data: object) -> list["DataFile"] | None | Unset: + def _parse_files(data: object) -> Union[List["DataFile"], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -155,11 +155,11 @@ def _parse_files(data: object) -> list["DataFile"] | None | Unset: return files_type_0 except: # noqa: E722 pass - return cast(list["DataFile"] | None | Unset, data) + return cast(Union[List["DataFile"], None, Unset], data) files = _parse_files(d.pop("files", UNSET)) - def _parse_dataset_ids(data: object) -> list[str] | None | Unset: + def _parse_dataset_ids(data: object) -> Union[List[str], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -167,16 +167,16 @@ def _parse_dataset_ids(data: object) -> list[str] | None | Unset: try: if not isinstance(data, list): raise TypeError() - dataset_ids_type_0 = cast(list[str], data) + dataset_ids_type_0 = cast(List[str], data) return dataset_ids_type_0 except: # noqa: E722 pass - return cast(list[str] | None | Unset, data) + return cast(Union[List[str], None, Unset], data) dataset_ids = _parse_dataset_ids(d.pop("datasetIds", UNSET)) - def _parse_created_at(data: object) -> None | Unset | datetime.datetime: + def _parse_created_at(data: object) -> Union[None, Unset, datetime.datetime]: if data is None: return data if isinstance(data, Unset): @@ -189,11 +189,11 @@ def _parse_created_at(data: object) -> None | Unset | datetime.datetime: return created_at_type_0 except: # noqa: E722 pass - return cast(None | Unset | datetime.datetime, data) + return cast(Union[None, Unset, datetime.datetime], data) created_at = _parse_created_at(d.pop("createdAt", UNSET)) - def _parse_updated_at(data: object) -> None | Unset | datetime.datetime: + def _parse_updated_at(data: object) -> Union[None, Unset, datetime.datetime]: if data is None: return data if isinstance(data, Unset): @@ -206,7 +206,7 @@ def _parse_updated_at(data: object) -> None | Unset | datetime.datetime: return updated_at_type_0 except: # noqa: E722 pass - return cast(None | Unset | datetime.datetime, data) + return cast(Union[None, Unset, datetime.datetime], data) updated_at = _parse_updated_at(d.pop("updatedAt", UNSET)) @@ -224,5 +224,5 @@ def _parse_updated_at(data: object) -> None | Unset | datetime.datetime: return sample @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/sample_metadata.py b/cirro_api_client/v1/models/sample_metadata.py index 0431a2f..b7ba777 100644 --- a/cirro_api_client/v1/models/sample_metadata.py +++ b/cirro_api_client/v1/models/sample_metadata.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class SampleMetadata: """ """ - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() sample_metadata = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return sample_metadata @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/sample_request.py b/cirro_api_client/v1/models/sample_request.py index cb35b1e..14facc3 100644 --- a/cirro_api_client/v1/models/sample_request.py +++ b/cirro_api_client/v1/models/sample_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,14 +20,14 @@ class SampleRequest: name: str metadata: "SampleRequestMetadata" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name metadata = self.metadata.to_dict() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -39,7 +39,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.sample_request_metadata import SampleRequestMetadata d = src_dict.copy() @@ -56,5 +56,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return sample_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/sample_request_metadata.py b/cirro_api_client/v1/models/sample_request_metadata.py index acaf4c1..78038d8 100644 --- a/cirro_api_client/v1/models/sample_request_metadata.py +++ b/cirro_api_client/v1/models/sample_request_metadata.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,17 +10,17 @@ class SampleRequestMetadata: """ """ - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() sample_request_metadata = cls() @@ -28,5 +28,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return sample_request_metadata @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/sample_sheets.py b/cirro_api_client/v1/models/sample_sheets.py index e12420f..91dab4b 100644 --- a/cirro_api_client/v1/models/sample_sheets.py +++ b/cirro_api_client/v1/models/sample_sheets.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,16 +16,16 @@ class SampleSheets: files (Union[Unset, str]): Written to files.csv, available as ds.files in preprocess """ - samples: Unset | str = UNSET - files: Unset | str = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + samples: Union[Unset, str] = UNSET + files: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: samples = self.samples files = self.files - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if samples is not UNSET: @@ -36,7 +36,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() samples = d.pop("samples", UNSET) @@ -51,5 +51,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return sample_sheets @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/service_connection.py b/cirro_api_client/v1/models/service_connection.py index 81fe3dc..0ba6a00 100644 --- a/cirro_api_client/v1/models/service_connection.py +++ b/cirro_api_client/v1/models/service_connection.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class ServiceConnection: name: str description: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name description = self.description - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,7 +35,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -50,5 +50,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return service_connection @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/set_user_project_role_request.py b/cirro_api_client/v1/models/set_user_project_role_request.py index 542d1e3..cb80536 100644 --- a/cirro_api_client/v1/models/set_user_project_role_request.py +++ b/cirro_api_client/v1/models/set_user_project_role_request.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,17 +20,17 @@ class SetUserProjectRoleRequest: username: str role: ProjectRole - suppress_notification: Unset | bool = False - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + suppress_notification: Union[Unset, bool] = False + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: username = self.username role = self.role.value suppress_notification = self.suppress_notification - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -44,7 +44,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() username = d.pop("username") @@ -62,5 +62,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return set_user_project_role_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/sftp_credentials.py b/cirro_api_client/v1/models/sftp_credentials.py index b0bc4a3..7a85f72 100644 --- a/cirro_api_client/v1/models/sftp_credentials.py +++ b/cirro_api_client/v1/models/sftp_credentials.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +22,9 @@ class SftpCredentials: password: str project_id: str expires_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: username = self.username password = self.password @@ -33,7 +33,7 @@ def to_dict(self) -> dict[str, Any]: expires_at = self.expires_at.isoformat() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -47,7 +47,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() username = d.pop("username") @@ -68,5 +68,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return sftp_credentials @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/share.py b/cirro_api_client/v1/models/share.py index d5e756b..f3d21b0 100644 --- a/cirro_api_client/v1/models/share.py +++ b/cirro_api_client/v1/models/share.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -36,15 +36,15 @@ class Share: description: str originating_project_id: str share_type: ShareType - conditions: list["DatasetCondition"] - classification_ids: list[str] - keywords: list[str] + conditions: List["DatasetCondition"] + classification_ids: List[str] + keywords: List[str] created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -70,7 +70,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -91,7 +91,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.dataset_condition import DatasetCondition d = src_dict.copy() @@ -112,9 +112,9 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: conditions.append(conditions_item) - classification_ids = cast(list[str], d.pop("classificationIds")) + classification_ids = cast(List[str], d.pop("classificationIds")) - keywords = cast(list[str], d.pop("keywords")) + keywords = cast(List[str], d.pop("keywords")) created_by = d.pop("createdBy") @@ -140,5 +140,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return share @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/share_detail.py b/cirro_api_client/v1/models/share_detail.py index a2c469c..8d685ec 100644 --- a/cirro_api_client/v1/models/share_detail.py +++ b/cirro_api_client/v1/models/share_detail.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -39,17 +39,17 @@ class ShareDetail: description: str originating_project: "NamedItem" share_type: ShareType - shared_projects: list["NamedItem"] - conditions: list["DatasetCondition"] - keywords: list[str] - classification_ids: list[str] + shared_projects: List["NamedItem"] + conditions: List["DatasetCondition"] + keywords: List[str] + classification_ids: List[str] is_view_restricted: bool created_by: str created_at: datetime.datetime updated_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -82,7 +82,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at.isoformat() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -105,7 +105,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.dataset_condition import DatasetCondition from ..models.named_item import NamedItem @@ -134,9 +134,9 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: conditions.append(conditions_item) - keywords = cast(list[str], d.pop("keywords")) + keywords = cast(List[str], d.pop("keywords")) - classification_ids = cast(list[str], d.pop("classificationIds")) + classification_ids = cast(List[str], d.pop("classificationIds")) is_view_restricted = d.pop("isViewRestricted") @@ -166,5 +166,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return share_detail @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/share_input.py b/cirro_api_client/v1/models/share_input.py index 10ea079..99eaba1 100644 --- a/cirro_api_client/v1/models/share_input.py +++ b/cirro_api_client/v1/models/share_input.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,14 +28,14 @@ class ShareInput: name: str description: str - classification_ids: list[str] - conditions: list["DatasetCondition"] - keywords: Unset | list[str] = UNSET - shared_project_ids: Unset | list[str] = UNSET - is_view_restricted: Unset | bool = False - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: + classification_ids: List[str] + conditions: List["DatasetCondition"] + keywords: Union[Unset, List[str]] = UNSET + shared_project_ids: Union[Unset, List[str]] = UNSET + is_view_restricted: Union[Unset, bool] = False + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: name = self.name description = self.description @@ -47,17 +47,17 @@ def to_dict(self) -> dict[str, Any]: conditions_item = conditions_item_data.to_dict() conditions.append(conditions_item) - keywords: Unset | list[str] = UNSET + keywords: Union[Unset, List[str]] = UNSET if not isinstance(self.keywords, Unset): keywords = self.keywords - shared_project_ids: Unset | list[str] = UNSET + shared_project_ids: Union[Unset, List[str]] = UNSET if not isinstance(self.shared_project_ids, Unset): shared_project_ids = self.shared_project_ids is_view_restricted = self.is_view_restricted - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -77,7 +77,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.dataset_condition import DatasetCondition d = src_dict.copy() @@ -85,7 +85,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: description = d.pop("description") - classification_ids = cast(list[str], d.pop("classificationIds")) + classification_ids = cast(List[str], d.pop("classificationIds")) conditions = [] _conditions = d.pop("conditions") @@ -94,9 +94,9 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: conditions.append(conditions_item) - keywords = cast(list[str], d.pop("keywords", UNSET)) + keywords = cast(List[str], d.pop("keywords", UNSET)) - shared_project_ids = cast(list[str], d.pop("sharedProjectIds", UNSET)) + shared_project_ids = cast(List[str], d.pop("sharedProjectIds", UNSET)) is_view_restricted = d.pop("isViewRestricted", UNSET) @@ -114,5 +114,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return share_input @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/stop_execution_response.py b/cirro_api_client/v1/models/stop_execution_response.py index 0fbca94..b96a290 100644 --- a/cirro_api_client/v1/models/stop_execution_response.py +++ b/cirro_api_client/v1/models/stop_execution_response.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,20 +16,20 @@ class StopExecutionResponse: failed (Union[Unset, List[str]]): List of job IDs that were not successful in termination """ - success: Unset | list[str] = UNSET - failed: Unset | list[str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + success: Union[Unset, List[str]] = UNSET + failed: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - success: Unset | list[str] = UNSET + def to_dict(self) -> Dict[str, Any]: + success: Union[Unset, List[str]] = UNSET if not isinstance(self.success, Unset): success = self.success - failed: Unset | list[str] = UNSET + failed: Union[Unset, List[str]] = UNSET if not isinstance(self.failed, Unset): failed = self.failed - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if success is not UNSET: @@ -40,11 +40,11 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() - success = cast(list[str], d.pop("success", UNSET)) + success = cast(List[str], d.pop("success", UNSET)) - failed = cast(list[str], d.pop("failed", UNSET)) + failed = cast(List[str], d.pop("failed", UNSET)) stop_execution_response = cls( success=success, @@ -55,5 +55,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return stop_execution_response @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/system_info_response.py b/cirro_api_client/v1/models/system_info_response.py index 27d2cd8..6bd661c 100644 --- a/cirro_api_client/v1/models/system_info_response.py +++ b/cirro_api_client/v1/models/system_info_response.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -42,9 +42,9 @@ class SystemInfoResponse: resources_info: "ResourcesInfo" tenant_info: "TenantInfo" auth: "AuthInfo" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: resources_bucket = self.resources_bucket references_bucket = self.references_bucket @@ -69,7 +69,7 @@ def to_dict(self) -> dict[str, Any]: auth = self.auth.to_dict() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -91,7 +91,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.auth_info import AuthInfo from ..models.resources_info import ResourcesInfo from ..models.tenant_info import TenantInfo @@ -140,5 +140,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return system_info_response @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/table.py b/cirro_api_client/v1/models/table.py index c8ae28c..c83fedc 100644 --- a/cirro_api_client/v1/models/table.py +++ b/cirro_api_client/v1/models/table.py @@ -1,5 +1,4 @@ -import builtins -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,14 +25,14 @@ class Table: """ desc: str - name: Unset | str = UNSET - type: Unset | str = UNSET - rows: Unset | int = UNSET - path: Unset | str = UNSET - cols: list["ColumnDefinition"] | None | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: + name: Union[Unset, str] = UNSET + type: Union[Unset, str] = UNSET + rows: Union[Unset, int] = UNSET + path: Union[Unset, str] = UNSET + cols: Union[List["ColumnDefinition"], None, Unset] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: desc = self.desc name = self.name @@ -44,7 +43,7 @@ def to_dict(self) -> dict[str, Any]: path = self.path - cols: list[dict[str, Any]] | None | Unset + cols: Union[List[Dict[str, Any]], None, Unset] if isinstance(self.cols, Unset): cols = UNSET elif isinstance(self.cols, list): @@ -56,7 +55,7 @@ def to_dict(self) -> dict[str, Any]: else: cols = self.cols - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -77,7 +76,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: builtins.type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.column_definition import ColumnDefinition d = src_dict.copy() @@ -91,7 +90,7 @@ def from_dict(cls: builtins.type[T], src_dict: dict[str, Any]) -> T: path = d.pop("path", UNSET) - def _parse_cols(data: object) -> list["ColumnDefinition"] | None | Unset: + def _parse_cols(data: object) -> Union[List["ColumnDefinition"], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -109,7 +108,7 @@ def _parse_cols(data: object) -> list["ColumnDefinition"] | None | Unset: return cols_type_0 except: # noqa: E722 pass - return cast(list["ColumnDefinition"] | None | Unset, data) + return cast(Union[List["ColumnDefinition"], None, Unset], data) cols = _parse_cols(d.pop("cols", UNSET)) @@ -126,5 +125,5 @@ def _parse_cols(data: object) -> list["ColumnDefinition"] | None | Unset: return table @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/tag.py b/cirro_api_client/v1/models/tag.py index 05a5160..c5ccf01 100644 --- a/cirro_api_client/v1/models/tag.py +++ b/cirro_api_client/v1/models/tag.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,22 +18,22 @@ class Tag: """ value: str - editable: Unset | bool = True - key: None | Unset | str = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + editable: Union[Unset, bool] = True + key: Union[None, Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: value = self.value editable = self.editable - key: None | Unset | str + key: Union[None, Unset, str] if isinstance(self.key, Unset): key = UNSET else: key = self.key - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -48,18 +48,18 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() value = d.pop("value") editable = d.pop("editable", UNSET) - def _parse_key(data: object) -> None | Unset | str: + def _parse_key(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) key = _parse_key(d.pop("key", UNSET)) @@ -73,5 +73,5 @@ def _parse_key(data: object) -> None | Unset | str: return tag @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/task.py b/cirro_api_client/v1/models/task.py index e5bb3ee..4984050 100644 --- a/cirro_api_client/v1/models/task.py +++ b/cirro_api_client/v1/models/task.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -29,14 +29,14 @@ class Task: native_job_id: str status: str requested_at: datetime.datetime - started_at: Unset | datetime.datetime = UNSET - stopped_at: Unset | datetime.datetime = UNSET - container_image: Unset | str = UNSET - command_line: Unset | str = UNSET - log_location: Unset | str = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> dict[str, Any]: + started_at: Union[Unset, datetime.datetime] = UNSET + stopped_at: Union[Unset, datetime.datetime] = UNSET + container_image: Union[Unset, str] = UNSET + command_line: Union[Unset, str] = UNSET + log_location: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: name = self.name native_job_id = self.native_job_id @@ -45,11 +45,11 @@ def to_dict(self) -> dict[str, Any]: requested_at = self.requested_at.isoformat() - started_at: Unset | str = UNSET + started_at: Union[Unset, str] = UNSET if not isinstance(self.started_at, Unset): started_at = self.started_at.isoformat() - stopped_at: Unset | str = UNSET + stopped_at: Union[Unset, str] = UNSET if not isinstance(self.stopped_at, Unset): stopped_at = self.stopped_at.isoformat() @@ -59,7 +59,7 @@ def to_dict(self) -> dict[str, Any]: log_location = self.log_location - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -83,7 +83,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -94,14 +94,14 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: requested_at = isoparse(d.pop("requestedAt")) _started_at = d.pop("startedAt", UNSET) - started_at: Unset | datetime.datetime + started_at: Union[Unset, datetime.datetime] if isinstance(_started_at, Unset): started_at = UNSET else: started_at = isoparse(_started_at) _stopped_at = d.pop("stoppedAt", UNSET) - stopped_at: Unset | datetime.datetime + stopped_at: Union[Unset, datetime.datetime] if isinstance(_stopped_at, Unset): stopped_at = UNSET else: @@ -129,5 +129,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return task @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/task_cost.py b/cirro_api_client/v1/models/task_cost.py index 3980a27..d3d9653 100644 --- a/cirro_api_client/v1/models/task_cost.py +++ b/cirro_api_client/v1/models/task_cost.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,9 +20,9 @@ class TaskCost: task_id: str status: str cost: float - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name task_id = self.task_id @@ -31,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: cost = self.cost - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -45,7 +45,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -66,5 +66,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return task_cost @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/tenant_info.py b/cirro_api_client/v1/models/tenant_info.py index 6b5f92b..ff90ca6 100644 --- a/cirro_api_client/v1/models/tenant_info.py +++ b/cirro_api_client/v1/models/tenant_info.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -35,11 +35,11 @@ class TenantInfo: tenant_logo_url: str terms_of_service_url: str privacy_policy_url: str - login_providers: list["LoginProvider"] + login_providers: List["LoginProvider"] features: "FeatureFlags" - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -63,7 +63,7 @@ def to_dict(self) -> dict[str, Any]: features = self.features.to_dict() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -83,7 +83,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.feature_flags import FeatureFlags from ..models.login_provider import LoginProvider @@ -130,5 +130,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return tenant_info @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/update_dataset_request.py b/cirro_api_client/v1/models/update_dataset_request.py index 3cd2c9d..48a9c87 100644 --- a/cirro_api_client/v1/models/update_dataset_request.py +++ b/cirro_api_client/v1/models/update_dataset_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,10 +23,10 @@ class UpdateDatasetRequest: name: str description: str process_id: str - tags: list["Tag"] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + tags: List["Tag"] + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name description = self.description @@ -38,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: tags_item = tags_item_data.to_dict() tags.append(tags_item) - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -52,7 +52,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.tag import Tag d = src_dict.copy() @@ -80,5 +80,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return update_dataset_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/update_user_request.py b/cirro_api_client/v1/models/update_user_request.py index 33d5d62..cbfc203 100644 --- a/cirro_api_client/v1/models/update_user_request.py +++ b/cirro_api_client/v1/models/update_user_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,15 +28,15 @@ class UpdateUserRequest: name: str email: str - phone: Unset | str = UNSET - department: Unset | str = UNSET - job_title: Unset | str = UNSET - organization: Unset | str = UNSET + phone: Union[Unset, str] = UNSET + department: Union[Unset, str] = UNSET + job_title: Union[Unset, str] = UNSET + organization: Union[Unset, str] = UNSET settings: Union["UserSettings", None, Unset] = UNSET - groups: Unset | list[str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + groups: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: from ..models.user_settings import UserSettings name = self.name @@ -51,7 +51,7 @@ def to_dict(self) -> dict[str, Any]: organization = self.organization - settings: dict[str, Any] | None | Unset + settings: Union[Dict[str, Any], None, Unset] if isinstance(self.settings, Unset): settings = UNSET elif isinstance(self.settings, UserSettings): @@ -59,11 +59,11 @@ def to_dict(self) -> dict[str, Any]: else: settings = self.settings - groups: Unset | list[str] = UNSET + groups: Union[Unset, List[str]] = UNSET if not isinstance(self.groups, Unset): groups = self.groups - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -87,7 +87,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.user_settings import UserSettings d = src_dict.copy() @@ -120,7 +120,7 @@ def _parse_settings(data: object) -> Union["UserSettings", None, Unset]: settings = _parse_settings(d.pop("settings", UNSET)) - groups = cast(list[str], d.pop("groups", UNSET)) + groups = cast(List[str], d.pop("groups", UNSET)) update_user_request = cls( name=name, @@ -137,5 +137,5 @@ def _parse_settings(data: object) -> Union["UserSettings", None, Unset]: return update_user_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/upload_dataset_create_response.py b/cirro_api_client/v1/models/upload_dataset_create_response.py index 4283844..9da6238 100644 --- a/cirro_api_client/v1/models/upload_dataset_create_response.py +++ b/cirro_api_client/v1/models/upload_dataset_create_response.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,9 +20,9 @@ class UploadDatasetCreateResponse: message: str upload_path: str bucket: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id message = self.message @@ -31,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: bucket = self.bucket - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -45,7 +45,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -66,5 +66,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return upload_dataset_create_response @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/upload_dataset_request.py b/cirro_api_client/v1/models/upload_dataset_request.py index d567994..edce7fc 100644 --- a/cirro_api_client/v1/models/upload_dataset_request.py +++ b/cirro_api_client/v1/models/upload_dataset_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,12 +25,12 @@ class UploadDatasetRequest: name: str process_id: str - expected_files: list[str] - description: Unset | str = UNSET - tags: list["Tag"] | None | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + expected_files: List[str] + description: Union[Unset, str] = UNSET + tags: Union[List["Tag"], None, Unset] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name process_id = self.process_id @@ -39,7 +39,7 @@ def to_dict(self) -> dict[str, Any]: description = self.description - tags: list[dict[str, Any]] | None | Unset + tags: Union[List[Dict[str, Any]], None, Unset] if isinstance(self.tags, Unset): tags = UNSET elif isinstance(self.tags, list): @@ -51,7 +51,7 @@ def to_dict(self) -> dict[str, Any]: else: tags = self.tags - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -68,7 +68,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.tag import Tag d = src_dict.copy() @@ -76,11 +76,11 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: process_id = d.pop("processId") - expected_files = cast(list[str], d.pop("expectedFiles")) + expected_files = cast(List[str], d.pop("expectedFiles")) description = d.pop("description", UNSET) - def _parse_tags(data: object) -> list["Tag"] | None | Unset: + def _parse_tags(data: object) -> Union[List["Tag"], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -98,7 +98,7 @@ def _parse_tags(data: object) -> list["Tag"] | None | Unset: return tags_type_0 except: # noqa: E722 pass - return cast(list["Tag"] | None | Unset, data) + return cast(Union[List["Tag"], None, Unset], data) tags = _parse_tags(d.pop("tags", UNSET)) @@ -114,5 +114,5 @@ def _parse_tags(data: object) -> list["Tag"] | None | Unset: return upload_dataset_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/user.py b/cirro_api_client/v1/models/user.py index c8f2c11..4f02425 100644 --- a/cirro_api_client/v1/models/user.py +++ b/cirro_api_client/v1/models/user.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +22,9 @@ class User: organization: str department: str job_title: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name username = self.username @@ -35,7 +35,7 @@ def to_dict(self) -> dict[str, Any]: job_title = self.job_title - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -50,7 +50,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() name = d.pop("name") @@ -74,5 +74,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return user @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/user_detail.py b/cirro_api_client/v1/models/user_detail.py index f14a340..b78e335 100644 --- a/cirro_api_client/v1/models/user_detail.py +++ b/cirro_api_client/v1/models/user_detail.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -42,14 +42,14 @@ class UserDetail: job_title: str department: str invited_by: str - project_assignments: list["UserProjectAssignment"] - groups: list[str] + project_assignments: List["UserProjectAssignment"] + groups: List[str] settings: "UserSettings" - sign_up_time: None | Unset | datetime.datetime = UNSET - last_signed_in: None | Unset | datetime.datetime = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + sign_up_time: Union[None, Unset, datetime.datetime] = UNSET + last_signed_in: Union[None, Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: username = self.username name = self.name @@ -75,7 +75,7 @@ def to_dict(self) -> dict[str, Any]: settings = self.settings.to_dict() - sign_up_time: None | Unset | str + sign_up_time: Union[None, Unset, str] if isinstance(self.sign_up_time, Unset): sign_up_time = UNSET elif isinstance(self.sign_up_time, datetime.datetime): @@ -83,7 +83,7 @@ def to_dict(self) -> dict[str, Any]: else: sign_up_time = self.sign_up_time - last_signed_in: None | Unset | str + last_signed_in: Union[None, Unset, str] if isinstance(self.last_signed_in, Unset): last_signed_in = UNSET elif isinstance(self.last_signed_in, datetime.datetime): @@ -91,7 +91,7 @@ def to_dict(self) -> dict[str, Any]: else: last_signed_in = self.last_signed_in - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -116,7 +116,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.user_project_assignment import UserProjectAssignment from ..models.user_settings import UserSettings @@ -144,11 +144,11 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: project_assignments.append(project_assignments_item) - groups = cast(list[str], d.pop("groups")) + groups = cast(List[str], d.pop("groups")) settings = UserSettings.from_dict(d.pop("settings")) - def _parse_sign_up_time(data: object) -> None | Unset | datetime.datetime: + def _parse_sign_up_time(data: object) -> Union[None, Unset, datetime.datetime]: if data is None: return data if isinstance(data, Unset): @@ -161,11 +161,11 @@ def _parse_sign_up_time(data: object) -> None | Unset | datetime.datetime: return sign_up_time_type_0 except: # noqa: E722 pass - return cast(None | Unset | datetime.datetime, data) + return cast(Union[None, Unset, datetime.datetime], data) sign_up_time = _parse_sign_up_time(d.pop("signUpTime", UNSET)) - def _parse_last_signed_in(data: object) -> None | Unset | datetime.datetime: + def _parse_last_signed_in(data: object) -> Union[None, Unset, datetime.datetime]: if data is None: return data if isinstance(data, Unset): @@ -178,7 +178,7 @@ def _parse_last_signed_in(data: object) -> None | Unset | datetime.datetime: return last_signed_in_type_0 except: # noqa: E722 pass - return cast(None | Unset | datetime.datetime, data) + return cast(Union[None, Unset, datetime.datetime], data) last_signed_in = _parse_last_signed_in(d.pop("lastSignedIn", UNSET)) @@ -202,5 +202,5 @@ def _parse_last_signed_in(data: object) -> None | Unset | datetime.datetime: return user_detail @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/user_project_assignment.py b/cirro_api_client/v1/models/user_project_assignment.py index acfe33e..8b1f596 100644 --- a/cirro_api_client/v1/models/user_project_assignment.py +++ b/cirro_api_client/v1/models/user_project_assignment.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,17 +24,17 @@ class UserProjectAssignment: project_id: str role: ProjectRole created_by: str - created_at: None | Unset | datetime.datetime = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + created_at: Union[None, Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: project_id = self.project_id role = self.role.value created_by = self.created_by - created_at: None | Unset | str + created_at: Union[None, Unset, str] if isinstance(self.created_at, Unset): created_at = UNSET elif isinstance(self.created_at, datetime.datetime): @@ -42,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: else: created_at = self.created_at - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -57,7 +57,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() project_id = d.pop("projectId") @@ -65,7 +65,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: created_by = d.pop("createdBy") - def _parse_created_at(data: object) -> None | Unset | datetime.datetime: + def _parse_created_at(data: object) -> Union[None, Unset, datetime.datetime]: if data is None: return data if isinstance(data, Unset): @@ -78,7 +78,7 @@ def _parse_created_at(data: object) -> None | Unset | datetime.datetime: return created_at_type_0 except: # noqa: E722 pass - return cast(None | Unset | datetime.datetime, data) + return cast(Union[None, Unset, datetime.datetime], data) created_at = _parse_created_at(d.pop("createdAt", UNSET)) @@ -93,5 +93,5 @@ def _parse_created_at(data: object) -> None | Unset | datetime.datetime: return user_project_assignment @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/user_settings.py b/cirro_api_client/v1/models/user_settings.py index c470c1e..13a83aa 100644 --- a/cirro_api_client/v1/models/user_settings.py +++ b/cirro_api_client/v1/models/user_settings.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,12 +15,12 @@ class UserSettings: """ analysis_update_notifications_enabled: bool - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: analysis_update_notifications_enabled = self.analysis_update_notifications_enabled - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -31,7 +31,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() analysis_update_notifications_enabled = d.pop("analysisUpdateNotificationsEnabled") @@ -43,5 +43,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return user_settings @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/validate_file_name_patterns_request.py b/cirro_api_client/v1/models/validate_file_name_patterns_request.py index cfbfc51..32dfb97 100644 --- a/cirro_api_client/v1/models/validate_file_name_patterns_request.py +++ b/cirro_api_client/v1/models/validate_file_name_patterns_request.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,16 +14,16 @@ class ValidateFileNamePatternsRequest: file_name_patterns (List[str]): """ - file_names: list[str] - file_name_patterns: list[str] - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + file_names: List[str] + file_name_patterns: List[str] + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: file_names = self.file_names file_name_patterns = self.file_name_patterns - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,11 +35,11 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() - file_names = cast(list[str], d.pop("fileNames")) + file_names = cast(List[str], d.pop("fileNames")) - file_name_patterns = cast(list[str], d.pop("fileNamePatterns")) + file_name_patterns = cast(List[str], d.pop("fileNamePatterns")) validate_file_name_patterns_request = cls( file_names=file_names, @@ -50,5 +50,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return validate_file_name_patterns_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/validate_file_requirements_request.py b/cirro_api_client/v1/models/validate_file_requirements_request.py index e4fa27d..05957b8 100644 --- a/cirro_api_client/v1/models/validate_file_requirements_request.py +++ b/cirro_api_client/v1/models/validate_file_requirements_request.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar, cast +from typing import Any, Dict, List, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,16 +14,16 @@ class ValidateFileRequirementsRequest: sample_sheet (str): """ - file_names: list[str] + file_names: List[str] sample_sheet: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: file_names = self.file_names sample_sheet = self.sample_sheet - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,9 +35,9 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() - file_names = cast(list[str], d.pop("fileNames")) + file_names = cast(List[str], d.pop("fileNames")) sample_sheet = d.pop("sampleSheet") @@ -50,5 +50,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return validate_file_requirements_request @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/version_specification.py b/cirro_api_client/v1/models/version_specification.py index 2145682..e7ef984 100644 --- a/cirro_api_client/v1/models/version_specification.py +++ b/cirro_api_client/v1/models/version_specification.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,16 +18,16 @@ class VersionSpecification: version: str is_default: bool is_latest: bool - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: version = self.version is_default = self.is_default is_latest = self.is_latest - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -40,7 +40,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() version = d.pop("version") @@ -58,5 +58,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return version_specification @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/workspace.py b/cirro_api_client/v1/models/workspace.py index 7f7141a..c48b15e 100644 --- a/cirro_api_client/v1/models/workspace.py +++ b/cirro_api_client/v1/models/workspace.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -45,17 +45,17 @@ class Workspace: status: Status status_message: str environment_id: str - mounted_datasets: list["MountedDataset"] + mounted_datasets: List["MountedDataset"] compute_config: "WorkspaceComputeConfig" sharing_type: SharingType created_by: str created_at: datetime.datetime started_at: datetime.datetime updated_at: datetime.datetime - sessions: list["WorkspaceSession"] | None | Unset = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + sessions: Union[List["WorkspaceSession"], None, Unset] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -85,7 +85,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at.isoformat() - sessions: list[dict[str, Any]] | None | Unset + sessions: Union[List[Dict[str, Any]], None, Unset] if isinstance(self.sessions, Unset): sessions = UNSET elif isinstance(self.sessions, list): @@ -97,7 +97,7 @@ def to_dict(self) -> dict[str, Any]: else: sessions = self.sessions - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -122,7 +122,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.mounted_dataset import MountedDataset from ..models.workspace_compute_config import WorkspaceComputeConfig from ..models.workspace_session import WorkspaceSession @@ -159,7 +159,7 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: updated_at = isoparse(d.pop("updatedAt")) - def _parse_sessions(data: object) -> list["WorkspaceSession"] | None | Unset: + def _parse_sessions(data: object) -> Union[List["WorkspaceSession"], None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -177,7 +177,7 @@ def _parse_sessions(data: object) -> list["WorkspaceSession"] | None | Unset: return sessions_type_0 except: # noqa: E722 pass - return cast(list["WorkspaceSession"] | None | Unset, data) + return cast(Union[List["WorkspaceSession"], None, Unset], data) sessions = _parse_sessions(d.pop("sessions", UNSET)) @@ -202,5 +202,5 @@ def _parse_sessions(data: object) -> list["WorkspaceSession"] | None | Unset: return workspace @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/workspace_compute_config.py b/cirro_api_client/v1/models/workspace_compute_config.py index 0bdf2fb..2d25963 100644 --- a/cirro_api_client/v1/models/workspace_compute_config.py +++ b/cirro_api_client/v1/models/workspace_compute_config.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -31,14 +31,14 @@ class WorkspaceComputeConfig: """ container_image_uri: str - cpu: Unset | int = UNSET - memory_gi_b: Unset | int = UNSET - volume_size_gi_b: Unset | int = UNSET + cpu: Union[Unset, int] = UNSET + memory_gi_b: Union[Unset, int] = UNSET + volume_size_gi_b: Union[Unset, int] = UNSET environment_variables: Union["WorkspaceComputeConfigEnvironmentVariablesType0", None, Unset] = UNSET - local_port: Unset | int = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + local_port: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: from ..models.workspace_compute_config_environment_variables_type_0 import ( WorkspaceComputeConfigEnvironmentVariablesType0, ) @@ -51,7 +51,7 @@ def to_dict(self) -> dict[str, Any]: volume_size_gi_b = self.volume_size_gi_b - environment_variables: dict[str, Any] | None | Unset + environment_variables: Union[Dict[str, Any], None, Unset] if isinstance(self.environment_variables, Unset): environment_variables = UNSET elif isinstance(self.environment_variables, WorkspaceComputeConfigEnvironmentVariablesType0): @@ -61,7 +61,7 @@ def to_dict(self) -> dict[str, Any]: local_port = self.local_port - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -82,7 +82,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.workspace_compute_config_environment_variables_type_0 import ( WorkspaceComputeConfigEnvironmentVariablesType0, ) @@ -130,5 +130,5 @@ def _parse_environment_variables( return workspace_compute_config @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/workspace_compute_config_environment_variables_type_0.py b/cirro_api_client/v1/models/workspace_compute_config_environment_variables_type_0.py index 3b1718d..65fe963 100644 --- a/cirro_api_client/v1/models/workspace_compute_config_environment_variables_type_0.py +++ b/cirro_api_client/v1/models/workspace_compute_config_environment_variables_type_0.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,17 +15,17 @@ class WorkspaceComputeConfigEnvironmentVariablesType0: """ - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: - field_dict: dict[str, Any] = {} + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() workspace_compute_config_environment_variables_type_0 = cls() @@ -33,5 +33,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return workspace_compute_config_environment_variables_type_0 @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/workspace_connection_response.py b/cirro_api_client/v1/models/workspace_connection_response.py index ac8f795..e572b9a 100644 --- a/cirro_api_client/v1/models/workspace_connection_response.py +++ b/cirro_api_client/v1/models/workspace_connection_response.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,16 +20,16 @@ class WorkspaceConnectionResponse: connection_url: str expires_at: datetime.datetime message: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: connection_url = self.connection_url expires_at = self.expires_at.isoformat() message = self.message - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() connection_url = d.pop("connectionUrl") @@ -60,5 +60,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return workspace_connection_response @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/workspace_environment.py b/cirro_api_client/v1/models/workspace_environment.py index 13ae4a2..78a14ac 100644 --- a/cirro_api_client/v1/models/workspace_environment.py +++ b/cirro_api_client/v1/models/workspace_environment.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -30,11 +30,11 @@ class WorkspaceEnvironment: description: str category: str default_compute_config: "WorkspaceComputeConfig" - versions: list["VersionSpecification"] + versions: List["VersionSpecification"] owner: str - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id name = self.name @@ -52,7 +52,7 @@ def to_dict(self) -> dict[str, Any]: owner = self.owner - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -69,7 +69,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.version_specification import VersionSpecification from ..models.workspace_compute_config import WorkspaceComputeConfig @@ -107,5 +107,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return workspace_environment @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/workspace_input.py b/cirro_api_client/v1/models/workspace_input.py index 1de78b9..8c0ca09 100644 --- a/cirro_api_client/v1/models/workspace_input.py +++ b/cirro_api_client/v1/models/workspace_input.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,14 +28,14 @@ class WorkspaceInput: """ name: str - mounted_datasets: list["MountedDataset"] + mounted_datasets: List["MountedDataset"] compute_config: "WorkspaceComputeConfig" sharing_type: SharingType - description: Unset | str = UNSET - environment_id: None | Unset | str = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + description: Union[Unset, str] = UNSET + environment_id: Union[None, Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: name = self.name mounted_datasets = [] @@ -49,13 +49,13 @@ def to_dict(self) -> dict[str, Any]: description = self.description - environment_id: None | Unset | str + environment_id: Union[None, Unset, str] if isinstance(self.environment_id, Unset): environment_id = UNSET else: environment_id = self.environment_id - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -73,7 +73,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.mounted_dataset import MountedDataset from ..models.workspace_compute_config import WorkspaceComputeConfig @@ -93,12 +93,12 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: description = d.pop("description", UNSET) - def _parse_environment_id(data: object) -> None | Unset | str: + def _parse_environment_id(data: object) -> Union[None, Unset, str]: if data is None: return data if isinstance(data, Unset): return data - return cast(None | Unset | str, data) + return cast(Union[None, Unset, str], data) environment_id = _parse_environment_id(d.pop("environmentId", UNSET)) @@ -115,5 +115,5 @@ def _parse_environment_id(data: object) -> None | Unset | str: return workspace_input @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/models/workspace_session.py b/cirro_api_client/v1/models/workspace_session.py index 7d233d3..796b211 100644 --- a/cirro_api_client/v1/models/workspace_session.py +++ b/cirro_api_client/v1/models/workspace_session.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, TypeVar +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,16 +20,16 @@ class WorkspaceSession: id: str user: str created_at: datetime.datetime - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> dict[str, Any]: + def to_dict(self) -> Dict[str, Any]: id = self.id user = self.user created_at = self.created_at.isoformat() - field_dict: dict[str, Any] = {} + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -42,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: return field_dict @classmethod - def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") @@ -60,5 +60,5 @@ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: return workspace_session @property - def additional_keys(self) -> list[str]: + def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/cirro_api_client/v1/types.py b/cirro_api_client/v1/types.py index a8d5a42..27e9a71 100644 --- a/cirro_api_client/v1/types.py +++ b/cirro_api_client/v1/types.py @@ -2,7 +2,7 @@ from collections.abc import MutableMapping from http import HTTPStatus -from typing import BinaryIO, Generic, Literal, TypeVar +from typing import BinaryIO, Generic, Literal, Optional, Tuple, TypeVar from attrs import define @@ -14,7 +14,7 @@ def __bool__(self) -> Literal[False]: UNSET: Unset = Unset() -FileJsonType = tuple[str | None, BinaryIO, str | None] +FileJsonType = Tuple[Optional[str], BinaryIO, Optional[str]] @define @@ -22,8 +22,8 @@ class File: """Contains information for file uploads""" payload: BinaryIO - file_name: str | None = None - mime_type: str | None = None + file_name: Optional[str] = None + mime_type: Optional[str] = None def to_tuple(self) -> FileJsonType: """Return a tuple representation that httpx will accept for multipart/form-data""" @@ -40,7 +40,7 @@ class Response(Generic[T]): status_code: HTTPStatus content: bytes headers: MutableMapping[str, str] - parsed: T | None + parsed: Optional[T] __all__ = ["File", "Response", "FileJsonType", "Unset", "UNSET"] From 418c7f0608a6ae50db579913ba93f2112773dbd5 Mon Sep 17 00:00:00 2001 From: malnasleh Date: Sun, 16 Nov 2025 14:56:41 -0800 Subject: [PATCH 3/4] Incrementing api client version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a9eed48..377bd46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cirro_api_client" -version = "1.1.0" +version = "1.2.0" description = "A client library for accessing Cirro" authors = ["Cirro "] license = "MIT" From ad7169eb393053de48905f441eaaad4640a86b29 Mon Sep 17 00:00:00 2001 From: malnasleh Date: Sun, 16 Nov 2025 15:04:54 -0800 Subject: [PATCH 4/4] Override WorkspaceComputeConfigEnvironmentVariables class name. Revert comment removals --- cirro_api_client/v1/models/__init__.py | 4 +- cirro_api_client/v1/models/artifact_type.py | 13 +++++++ cirro_api_client/v1/models/share_type.py | 3 ++ .../v1/models/workspace_compute_config.py | 28 ++++++-------- ...ute_config_environment_variables_type_0.py | 37 ------------------- config.yml | 2 + 6 files changed, 31 insertions(+), 56 deletions(-) delete mode 100644 cirro_api_client/v1/models/workspace_compute_config_environment_variables_type_0.py diff --git a/cirro_api_client/v1/models/__init__.py b/cirro_api_client/v1/models/__init__.py index 5bdcb1d..732e284 100644 --- a/cirro_api_client/v1/models/__init__.py +++ b/cirro_api_client/v1/models/__init__.py @@ -186,7 +186,7 @@ from .version_specification import VersionSpecification from .workspace import Workspace from .workspace_compute_config import WorkspaceComputeConfig -from .workspace_compute_config_environment_variables_type_0 import WorkspaceComputeConfigEnvironmentVariablesType0 +from .workspace_compute_config_environment_variables import WorkspaceComputeConfigEnvironmentVariables from .workspace_connection_response import WorkspaceConnectionResponse from .workspace_environment import WorkspaceEnvironment from .workspace_input import WorkspaceInput @@ -379,7 +379,7 @@ "VersionSpecification", "Workspace", "WorkspaceComputeConfig", - "WorkspaceComputeConfigEnvironmentVariablesType0", + "WorkspaceComputeConfigEnvironmentVariables", "WorkspaceConnectionResponse", "WorkspaceEnvironment", "WorkspaceInput", diff --git a/cirro_api_client/v1/models/artifact_type.py b/cirro_api_client/v1/models/artifact_type.py index 6732628..7bc0eee 100644 --- a/cirro_api_client/v1/models/artifact_type.py +++ b/cirro_api_client/v1/models/artifact_type.py @@ -3,18 +3,31 @@ class ArtifactType(str, Enum): FILES = "FILES" + """ Files used in the workflow """ INGEST_MANIFEST = "INGEST_MANIFEST" + """ Files expected to upload """ METADATA = "METADATA" + """ Snapshot of metadata at the time of execution """ SAMPLE_SHEET = "SAMPLE_SHEET" + """ Samples used in the workflow """ WORKFLOW_COMPUTE_CONFIG = "WORKFLOW_COMPUTE_CONFIG" + """ Compute overrides used in the workflow """ WORKFLOW_DAG = "WORKFLOW_DAG" + """ Direct acyclic graph of workflow execution """ WORKFLOW_DEBUG_LOGS = "WORKFLOW_DEBUG_LOGS" + """ Debug logs from workflow engine """ WORKFLOW_LOGS = "WORKFLOW_LOGS" + """ Logs from workflow engine """ WORKFLOW_OPTIONS = "WORKFLOW_OPTIONS" + """ Options used in the workflow """ WORKFLOW_PARAMETERS = "WORKFLOW_PARAMETERS" + """ Parameters used in the workflow """ WORKFLOW_REPORT = "WORKFLOW_REPORT" + """ Execution report from workflow engine """ WORKFLOW_TIMELINE = "WORKFLOW_TIMELINE" + """ Timeline of workflow execution """ WORKFLOW_TRACE = "WORKFLOW_TRACE" + """ Trace of workflow execution """ UNKNOWN = "UNKNOWN" """ This is a fallback value for when the value is not known, do not use this value when making requests """ diff --git a/cirro_api_client/v1/models/share_type.py b/cirro_api_client/v1/models/share_type.py index 21ce157..576a15e 100644 --- a/cirro_api_client/v1/models/share_type.py +++ b/cirro_api_client/v1/models/share_type.py @@ -3,8 +3,11 @@ class ShareType(str, Enum): AVAILABLE = "AVAILABLE" + """ The share is available for subscription """ PUBLISHER = "PUBLISHER" + """ The project owns this share """ SUBSCRIBER = "SUBSCRIBER" + """ The project can view this share """ UNKNOWN = "UNKNOWN" """ This is a fallback value for when the value is not known, do not use this value when making requests """ diff --git a/cirro_api_client/v1/models/workspace_compute_config.py b/cirro_api_client/v1/models/workspace_compute_config.py index 2d25963..339618e 100644 --- a/cirro_api_client/v1/models/workspace_compute_config.py +++ b/cirro_api_client/v1/models/workspace_compute_config.py @@ -6,9 +6,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.workspace_compute_config_environment_variables_type_0 import ( - WorkspaceComputeConfigEnvironmentVariablesType0, - ) + from ..models.workspace_compute_config_environment_variables import WorkspaceComputeConfigEnvironmentVariables T = TypeVar("T", bound="WorkspaceComputeConfig") @@ -24,9 +22,9 @@ class WorkspaceComputeConfig: memory_gi_b (Union[Unset, int]): Memory allocated to the workspace container in GiB. Example: 8. volume_size_gi_b (Union[Unset, int]): Persistent storage volume size allocated to the workspace in GiB. Example: 50. - environment_variables (Union['WorkspaceComputeConfigEnvironmentVariablesType0', None, Unset]): Map of - environment variables injected into the container at runtime. Keys must be non-blank. Example: {'ENV_MODE': - 'production', 'LOG_LEVEL': 'debug'}. + environment_variables (Union['WorkspaceComputeConfigEnvironmentVariables', None, Unset]): Map of environment + variables injected into the container at runtime. Keys must be non-blank. Example: {'ENV_MODE': 'production', + 'LOG_LEVEL': 'debug'}. local_port (Union[Unset, int]): User-facing web server port (http). Example: 8080. """ @@ -34,14 +32,12 @@ class WorkspaceComputeConfig: cpu: Union[Unset, int] = UNSET memory_gi_b: Union[Unset, int] = UNSET volume_size_gi_b: Union[Unset, int] = UNSET - environment_variables: Union["WorkspaceComputeConfigEnvironmentVariablesType0", None, Unset] = UNSET + environment_variables: Union["WorkspaceComputeConfigEnvironmentVariables", None, Unset] = UNSET local_port: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - from ..models.workspace_compute_config_environment_variables_type_0 import ( - WorkspaceComputeConfigEnvironmentVariablesType0, - ) + from ..models.workspace_compute_config_environment_variables import WorkspaceComputeConfigEnvironmentVariables container_image_uri = self.container_image_uri @@ -54,7 +50,7 @@ def to_dict(self) -> Dict[str, Any]: environment_variables: Union[Dict[str, Any], None, Unset] if isinstance(self.environment_variables, Unset): environment_variables = UNSET - elif isinstance(self.environment_variables, WorkspaceComputeConfigEnvironmentVariablesType0): + elif isinstance(self.environment_variables, WorkspaceComputeConfigEnvironmentVariables): environment_variables = self.environment_variables.to_dict() else: environment_variables = self.environment_variables @@ -83,9 +79,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.workspace_compute_config_environment_variables_type_0 import ( - WorkspaceComputeConfigEnvironmentVariablesType0, - ) + from ..models.workspace_compute_config_environment_variables import WorkspaceComputeConfigEnvironmentVariables d = src_dict.copy() container_image_uri = d.pop("containerImageUri") @@ -98,7 +92,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def _parse_environment_variables( data: object, - ) -> Union["WorkspaceComputeConfigEnvironmentVariablesType0", None, Unset]: + ) -> Union["WorkspaceComputeConfigEnvironmentVariables", None, Unset]: if data is None: return data if isinstance(data, Unset): @@ -106,12 +100,12 @@ def _parse_environment_variables( try: if not isinstance(data, dict): raise TypeError() - environment_variables_type_0 = WorkspaceComputeConfigEnvironmentVariablesType0.from_dict(data) + environment_variables_type_0 = WorkspaceComputeConfigEnvironmentVariables.from_dict(data) return environment_variables_type_0 except: # noqa: E722 pass - return cast(Union["WorkspaceComputeConfigEnvironmentVariablesType0", None, Unset], data) + return cast(Union["WorkspaceComputeConfigEnvironmentVariables", None, Unset], data) environment_variables = _parse_environment_variables(d.pop("environmentVariables", UNSET)) diff --git a/cirro_api_client/v1/models/workspace_compute_config_environment_variables_type_0.py b/cirro_api_client/v1/models/workspace_compute_config_environment_variables_type_0.py deleted file mode 100644 index 65fe963..0000000 --- a/cirro_api_client/v1/models/workspace_compute_config_environment_variables_type_0.py +++ /dev/null @@ -1,37 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="WorkspaceComputeConfigEnvironmentVariablesType0") - - -@_attrs_define -class WorkspaceComputeConfigEnvironmentVariablesType0: - """Map of environment variables injected into the container at runtime. Keys must be non-blank. - - Example: - {'ENV_MODE': 'production', 'LOG_LEVEL': 'debug'} - - """ - - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - workspace_compute_config_environment_variables_type_0 = cls() - - workspace_compute_config_environment_variables_type_0.additional_properties = d - return workspace_compute_config_environment_variables_type_0 - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) diff --git a/config.yml b/config.yml index 36827d2..66dd098 100644 --- a/config.yml +++ b/config.yml @@ -27,3 +27,5 @@ class_overrides: class_name: GovernanceRequirementProjectFileMap RunAnalysisRequestSourceSampleFilesMapType0: class_name: RunAnalysisRequestSourceSampleFilesMap + WorkspaceComputeConfigEnvironmentVariablesType0: + class_name: WorkspaceComputeConfigEnvironmentVariables