From 502c7a7fc0add4f8aa1da4a5c992d6b5589764ae Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 Nov 2023 18:26:03 +0000 Subject: [PATCH] I have generated the latest API! --- kittycad.py.patch.json | 428 +- kittycad/api/ai/__init__.py | 2 +- kittycad/api/ai/create_text_to_cad.py | 130 +- .../ai/create_text_to_cad_model_feedback.py | 117 +- kittycad/api/ai/get_ai_prompt.py | 115 + .../api/ai/get_text_to_cad_model_for_user.py | 115 + kittycad/api/ai/list_ai_prompts.py | 159 + .../ai/list_text_to_cad_models_for_user.py | 167 +- kittycad/api/api_calls/__init__.py | 2 +- kittycad/api/api_calls/get_api_call.py | 96 +- .../api/api_calls/get_api_call_for_user.py | 88 +- .../api/api_calls/get_api_call_metrics.py | 92 +- kittycad/api/api_calls/get_async_operation.py | 298 +- kittycad/api/api_calls/list_api_calls.py | 155 +- .../api/api_calls/list_api_calls_for_user.py | 201 +- .../api/api_calls/list_async_operations.py | 192 +- kittycad/api/api_calls/user_list_api_calls.py | 161 +- kittycad/api/api_tokens/__init__.py | 2 +- .../api_tokens/create_api_token_for_user.py | 54 +- .../api_tokens/delete_api_token_for_user.py | 90 +- .../api/api_tokens/get_api_token_for_user.py | 86 +- .../api_tokens/list_api_tokens_for_user.py | 161 +- kittycad/api/apps/__init__.py | 2 +- kittycad/api/apps/apps_github_callback.py | 58 +- kittycad/api/apps/apps_github_consent.py | 62 +- kittycad/api/apps/apps_github_webhook.py | 82 +- kittycad/api/beta/__init__.py | 2 +- kittycad/api/constant/__init__.py | 2 +- kittycad/api/executor/__init__.py | 2 +- kittycad/api/executor/create_executor_term.py | 25 +- .../api/executor/create_file_execution.py | 153 +- kittycad/api/file/__init__.py | 2 +- .../api/file/create_file_center_of_mass.py | 170 +- kittycad/api/file/create_file_conversion.py | 164 +- kittycad/api/file/create_file_density.py | 234 +- kittycad/api/file/create_file_mass.py | 234 +- kittycad/api/file/create_file_surface_area.py | 170 +- kittycad/api/file/create_file_volume.py | 168 +- kittycad/api/hidden/__init__.py | 2 +- kittycad/api/hidden/auth_email.py | 90 +- kittycad/api/hidden/auth_email_callback.py | 155 +- kittycad/api/hidden/logout.py | 52 +- kittycad/api/meta/__init__.py | 2 +- kittycad/api/meta/get_ai_plugin_manifest.py | 60 +- kittycad/api/meta/get_metadata.py | 58 +- kittycad/api/meta/get_openai_schema.py | 54 +- kittycad/api/meta/get_schema.py | 58 +- ...internal_get_api_token_for_discord_user.py | 117 + kittycad/api/meta/ping.py | 58 +- kittycad/api/modeling/__init__.py | 2 +- kittycad/api/modeling/modeling_commands_ws.py | 148 +- kittycad/api/oauth2/__init__.py | 2 +- kittycad/api/payments/__init__.py | 2 +- .../create_payment_information_for_user.py | 90 +- .../create_payment_intent_for_user.py | 56 +- .../delete_payment_information_for_user.py | 58 +- .../delete_payment_method_for_user.py | 84 +- .../payments/get_payment_balance_for_user.py | 56 +- .../get_payment_information_for_user.py | 60 +- .../api/payments/list_invoices_for_user.py | 59 +- .../payments/list_payment_methods_for_user.py | 59 +- .../update_payment_information_for_user.py | 90 +- ...idate_customer_tax_information_for_user.py | 52 +- kittycad/api/unit/__init__.py | 2 +- .../api/unit/get_angle_unit_conversion.py | 153 +- kittycad/api/unit/get_area_unit_conversion.py | 153 +- .../api/unit/get_current_unit_conversion.py | 153 +- .../api/unit/get_energy_unit_conversion.py | 153 +- .../api/unit/get_force_unit_conversion.py | 153 +- .../api/unit/get_frequency_unit_conversion.py | 153 +- .../api/unit/get_length_unit_conversion.py | 153 +- kittycad/api/unit/get_mass_unit_conversion.py | 153 +- .../api/unit/get_power_unit_conversion.py | 153 +- .../api/unit/get_pressure_unit_conversion.py | 153 +- .../unit/get_temperature_unit_conversion.py | 153 +- .../api/unit/get_torque_unit_conversion.py | 153 +- .../api/unit/get_volume_unit_conversion.py | 153 +- kittycad/api/users/__init__.py | 2 +- kittycad/api/users/delete_user_self.py | 58 +- kittycad/api/users/get_session_for_user.py | 86 +- kittycad/api/users/get_user.py | 94 +- kittycad/api/users/get_user_extended.py | 96 +- .../api/users/get_user_front_hash_self.py | 54 +- .../api/users/get_user_onboarding_self.py | 54 +- kittycad/api/users/get_user_self.py | 58 +- kittycad/api/users/get_user_self_extended.py | 60 +- kittycad/api/users/list_users.py | 155 +- kittycad/api/users/list_users_extended.py | 155 +- kittycad/api/users/update_user_self.py | 84 +- kittycad/examples_test.py | 206 + kittycad/models/__init__.py | 5 + kittycad/models/account_provider.py | 19 +- kittycad/models/ai_feedback.py | 17 +- kittycad/models/ai_plugin_api.py | 129 +- kittycad/models/ai_plugin_api_type.py | 11 +- kittycad/models/ai_plugin_auth.py | 127 +- kittycad/models/ai_plugin_auth_type.py | 23 +- kittycad/models/ai_plugin_http_auth_type.py | 17 +- kittycad/models/ai_plugin_manifest.py | 244 +- kittycad/models/ai_prompt.py | 209 + kittycad/models/ai_prompt_results_page.py | 70 + kittycad/models/ai_prompt_type.py | 11 + kittycad/models/angle.py | 89 +- kittycad/models/annotation_line_end.py | 11 +- .../models/annotation_line_end_options.py | 129 +- kittycad/models/annotation_options.py | 195 +- .../models/annotation_text_alignment_x.py | 13 +- .../models/annotation_text_alignment_y.py | 13 +- kittycad/models/annotation_text_options.py | 157 +- kittycad/models/annotation_type.py | 17 +- kittycad/models/api_call_query_group.py | 77 +- kittycad/models/api_call_query_group_by.py | 31 +- kittycad/models/api_call_status.py | 27 +- kittycad/models/api_call_with_price.py | 482 +- .../api_call_with_price_results_page.py | 90 +- kittycad/models/api_error.py | 89 +- kittycad/models/api_token.py | 213 +- kittycad/models/api_token_results_page.py | 90 +- kittycad/models/app_client_info.py | 65 +- kittycad/models/async_api_call.py | 336 +- kittycad/models/async_api_call_output.py | 2715 +++---- .../models/async_api_call_results_page.py | 90 +- kittycad/models/async_api_call_type.py | 35 +- kittycad/models/axis.py | 20 +- kittycad/models/axis_direction_pair.py | 129 +- kittycad/models/billing_info.py | 131 +- kittycad/models/cache_metadata.py | 67 +- .../models/camera_drag_interaction_type.py | 21 +- kittycad/models/card_details.py | 201 +- kittycad/models/center_of_mass.py | 129 +- kittycad/models/client_metrics.py | 191 +- kittycad/models/cluster.py | 165 +- kittycad/models/code_language.py | 21 +- kittycad/models/code_output.py | 102 +- kittycad/models/color.py | 101 +- kittycad/models/connection.py | 777 +- kittycad/models/country_code.py | 5 +- kittycad/models/coupon.py | 101 +- kittycad/models/created_at_sort_mode.py | 17 +- kittycad/models/currency.py | 5 +- kittycad/models/curve_get_control_points.py | 78 +- kittycad/models/curve_get_end_points.py | 129 +- kittycad/models/curve_get_type.py | 77 +- kittycad/models/curve_type.py | 13 +- kittycad/models/customer.py | 257 +- kittycad/models/customer_balance.py | 236 +- kittycad/models/density.py | 89 +- .../device_access_token_request_form.py | 131 +- kittycad/models/device_auth_request_form.py | 65 +- kittycad/models/device_auth_verify_params.py | 65 +- kittycad/models/direction.py | 17 +- kittycad/models/discount.py | 77 +- kittycad/models/email_authentication_form.py | 77 +- kittycad/models/entity_get_all_child_uuids.py | 69 +- kittycad/models/entity_get_child_uuid.py | 65 +- kittycad/models/entity_get_num_children.py | 65 +- kittycad/models/entity_get_parent_id.py | 65 +- kittycad/models/entity_type.py | 25 +- kittycad/models/environment.py | 21 +- kittycad/models/error.py | 89 +- kittycad/models/error_code.py | 43 +- kittycad/models/export.py | 78 +- kittycad/models/export_file.py | 91 +- kittycad/models/extended_user.py | 354 +- kittycad/models/extended_user_results_page.py | 90 +- .../models/failure_web_socket_response.py | 102 +- kittycad/models/fbx_storage.py | 17 +- kittycad/models/file_center_of_mass.py | 350 +- kittycad/models/file_conversion.py | 414 +- kittycad/models/file_density.py | 378 +- kittycad/models/file_export_format.py | 41 +- kittycad/models/file_import_format.py | 35 +- kittycad/models/file_mass.py | 378 +- kittycad/models/file_surface_area.py | 338 +- kittycad/models/file_system_metadata.py | 67 +- kittycad/models/file_volume.py | 338 +- kittycad/models/gateway.py | 147 +- kittycad/models/get_entity_type.py | 77 +- kittycad/models/get_sketch_mode_plane.py | 155 +- kittycad/models/gltf_presentation.py | 17 +- kittycad/models/gltf_storage.py | 25 +- kittycad/models/highlight_set_entity.py | 77 +- kittycad/models/ice_server.py | 93 +- kittycad/models/image_format.py | 17 +- kittycad/models/import_file.py | 81 +- kittycad/models/import_files.py | 65 +- kittycad/models/input_format.py | 616 +- kittycad/models/invoice.py | 481 +- kittycad/models/invoice_line_item.py | 174 +- kittycad/models/invoice_status.py | 31 +- kittycad/models/jetstream.py | 155 +- kittycad/models/jetstream_api_stats.py | 89 +- kittycad/models/jetstream_config.py | 101 +- kittycad/models/jetstream_stats.py | 187 +- kittycad/models/leaf_node.py | 101 +- kittycad/models/mass.py | 89 +- kittycad/models/meta_cluster_info.py | 89 +- kittycad/models/metadata.py | 199 +- kittycad/models/method.py | 52 +- kittycad/models/modeling_cmd.py | 6903 +++++++++-------- kittycad/models/modeling_cmd_id.py | 5 +- kittycad/models/modeling_cmd_req.py | 129 +- kittycad/models/mouse_click.py | 85 +- kittycad/models/new_address.py | 193 +- kittycad/models/o_auth2_client_info.py | 89 +- kittycad/models/o_auth2_grant_type.py | 13 +- kittycad/models/ok_modeling_cmd_response.py | 2738 +++---- .../models/ok_web_socket_response_data.py | 455 +- kittycad/models/onboarding.py | 93 +- kittycad/models/output_file.py | 77 +- kittycad/models/output_format.py | 749 +- kittycad/models/path_command.py | 19 +- .../path_get_curve_uuids_for_vertices.py | 69 +- kittycad/models/path_get_info.py | 78 +- kittycad/models/path_get_vertex_uuids.py | 69 +- kittycad/models/path_segment.py | 756 +- kittycad/models/path_segment_info.py | 143 +- kittycad/models/payment_intent.py | 65 +- kittycad/models/payment_method.py | 213 +- kittycad/models/payment_method_card_checks.py | 89 +- kittycad/models/payment_method_type.py | 11 +- .../models/plane_intersect_and_project.py | 77 +- kittycad/models/ply_storage.py | 21 +- kittycad/models/point2d.py | 77 +- kittycad/models/point3d.py | 89 +- kittycad/models/pong.py | 65 +- kittycad/models/raw_file.py | 81 +- kittycad/models/rtc_ice_candidate_init.py | 101 +- kittycad/models/rtc_sdp_type.py | 27 +- kittycad/models/rtc_session_description.py | 89 +- kittycad/models/scene_selection_type.py | 21 +- kittycad/models/scene_tool_type.py | 23 +- kittycad/models/select_get.py | 69 +- kittycad/models/select_with_point.py | 65 +- kittycad/models/selection.py | 287 + kittycad/models/session.py | 227 +- kittycad/models/solid3d_get_all_edge_faces.py | 69 +- .../models/solid3d_get_all_opposite_edges.py | 69 +- .../models/solid3d_get_next_adjacent_edge.py | 65 +- kittycad/models/solid3d_get_opposite_edge.py | 65 +- .../models/solid3d_get_prev_adjacent_edge.py | 65 +- kittycad/models/stl_storage.py | 17 +- .../models/success_web_socket_response.py | 131 +- kittycad/models/surface_area.py | 89 +- kittycad/models/system.py | 108 +- kittycad/models/take_snapshot.py | 79 +- kittycad/models/text_to_cad.py | 390 +- kittycad/models/text_to_cad_create_body.py | 65 +- kittycad/models/text_to_cad_results_page.py | 90 +- kittycad/models/unit_angle.py | 17 +- kittycad/models/unit_angle_conversion.py | 352 +- kittycad/models/unit_area.py | 39 +- kittycad/models/unit_area_conversion.py | 352 +- kittycad/models/unit_current.py | 23 +- kittycad/models/unit_current_conversion.py | 352 +- kittycad/models/unit_density.py | 17 +- kittycad/models/unit_energy.py | 31 +- kittycad/models/unit_energy_conversion.py | 352 +- kittycad/models/unit_force.py | 35 +- kittycad/models/unit_force_conversion.py | 352 +- kittycad/models/unit_frequency.py | 39 +- kittycad/models/unit_frequency_conversion.py | 352 +- kittycad/models/unit_length.py | 31 +- kittycad/models/unit_length_conversion.py | 352 +- kittycad/models/unit_mass.py | 21 +- kittycad/models/unit_mass_conversion.py | 352 +- kittycad/models/unit_power.py | 35 +- kittycad/models/unit_power_conversion.py | 352 +- kittycad/models/unit_pressure.py | 35 +- kittycad/models/unit_pressure_conversion.py | 352 +- kittycad/models/unit_temperature.py | 23 +- .../models/unit_temperature_conversion.py | 352 +- kittycad/models/unit_torque.py | 17 +- kittycad/models/unit_torque_conversion.py | 352 +- kittycad/models/unit_volume.py | 43 +- kittycad/models/unit_volume_conversion.py | 352 +- kittycad/models/update_user.py | 161 +- kittycad/models/user.py | 307 +- kittycad/models/user_results_page.py | 90 +- kittycad/models/uuid.py | 5 +- kittycad/models/uuid_binary.py | 3 + kittycad/models/verification_token.py | 199 +- kittycad/models/volume.py | 89 +- kittycad/models/web_socket_request.py | 531 +- 284 files changed, 22227 insertions(+), 24891 deletions(-) create mode 100644 kittycad/api/ai/get_ai_prompt.py create mode 100644 kittycad/api/ai/get_text_to_cad_model_for_user.py create mode 100644 kittycad/api/ai/list_ai_prompts.py create mode 100644 kittycad/api/meta/internal_get_api_token_for_discord_user.py create mode 100644 kittycad/models/ai_prompt.py create mode 100644 kittycad/models/ai_prompt_results_page.py create mode 100644 kittycad/models/ai_prompt_type.py create mode 100644 kittycad/models/selection.py create mode 100644 kittycad/models/uuid_binary.py diff --git a/kittycad.py.patch.json b/kittycad.py.patch.json index 20c07369f..f1858556b 100644 --- a/kittycad.py.patch.json +++ b/kittycad.py.patch.json @@ -9,138 +9,138 @@ }, { "op": "add", - "path": "/paths/~1api-calls~1{id}/get/x-python", + "path": "/paths/~1.well-known~1ai-plugin.json/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_ai_plugin_manifest\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPluginManifest, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_plugin_manifest():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AiPluginManifest, Error]\n ] = get_ai_plugin_manifest.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPluginManifest = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ai_plugin_manifest.html" } }, { "op": "add", - "path": "/paths/~1user~1api-tokens/get/x-python", + "path": "/paths/~1ws~1executor~1term/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import list_api_tokens_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiTokenResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_tokens_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiTokenResultsPage, Error]\n ] = list_api_tokens_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiTokenResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.list_api_tokens_for_user.html" + "example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = create_executor_term.sync(\n client=client,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html" } }, { "op": "add", - "path": "/paths/~1user~1api-tokens/post/x-python", + "path": "/paths/~1user~1payment/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import create_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_create_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = create_api_token_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.create_api_token_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = get_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_information_for_user.html" } }, { "op": "add", - "path": "/paths/~1.well-known~1ai-plugin.json/get/x-python", + "path": "/paths/~1user~1payment/put/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_ai_plugin_manifest\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPluginManifest, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_plugin_manifest():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AiPluginManifest, Error]\n ] = get_ai_plugin_manifest.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPluginManifest = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ai_plugin_manifest.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html" } }, { "op": "add", - "path": "/paths/~1user~1api-calls~1{id}/get/x-python", + "path": "/paths/~1user~1payment/delete/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_information_for_user.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1user~1payment/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitCurrentConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_create_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = create_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_information_for_user.html" } }, { "op": "add", - "path": "/paths/~1api-call-metrics/get/x-python", + "path": "/paths/~1apps~1github~1webhook/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_webhook\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_webhook():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_webhook.sync(\n client=client,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html" } }, { "op": "add", - "path": "/paths/~1user~1front-hash/get/x-python", + "path": "/paths/~1file~1mass/post/x-python", "value": { - "example": "from kittycad.api.users import get_user_front_hash_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_user_front_hash_self():\n # Create our client.\n client = ClientFromEnv()\n\n get_user_front_hash_self.sync(\n client=client,\n )\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_front_hash_self.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html" } }, { "op": "add", - "path": "/paths/~1user~1onboarding/get/x-python", + "path": "/paths/~1api-call-metrics/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1ws~1modeling~1commands/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMassConversion, Error]\n ] = get_mass_unit_conversion.sync(\n client=client,\n input_unit=UnitMass.G,\n output_unit=UnitMass.G,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMassConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_mass_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, WebSocketResponse\nfrom kittycad.models.rtc_sdp_type import RtcSdpType\nfrom kittycad.models.rtc_session_description import RtcSessionDescription\nfrom kittycad.models.web_socket_request import sdp_offer\nfrom kittycad.types import Response\n\n\ndef example_modeling_commands_ws():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = modeling_commands_ws.sync(\n client=client,\n fps=10,\n unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n webrtc=False,\n body=sdp_offer(\n offer=RtcSessionDescription(\n sdp=\"\",\n type=RtcSdpType.UNSPECIFIED,\n ),\n ),\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html" } }, { "op": "add", - "path": "/paths/~1user~1text-to-cad~1{id}/post/x-python", + "path": "/paths/~1users-extended/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad_model_feedback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.ai_feedback import AiFeedback\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad_model_feedback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = create_text_to_cad_model_feedback.sync(\n client=client,\n id=\"\",\n feedback=AiFeedback.THUMBS_UP,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_cad_model_feedback.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import list_users_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ExtendedUserResultsPage, Error]\n ] = list_users_extended.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUserResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users_extended.html" } }, { "op": "add", - "path": "/paths/~1user~1payment~1invoices/get/x-python", + "path": "/paths/~1auth~1email~1callback/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[Invoice] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_invoices_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"\",\n token=\"\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html" } }, { "op": "add", - "path": "/paths/~1user/get/x-python", + "path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitCurrentConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html" } }, { "op": "add", - "path": "/paths/~1user/put/x-python", + "path": "/paths/~1ai-prompts/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"\",\n discord=\"\",\n first_name=\"\",\n github=\"\",\n last_name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_ai_prompts\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPromptResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_ai_prompts():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AiPromptResultsPage, Error]] = list_ai_prompts.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPromptResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_ai_prompts.html" } }, { "op": "add", - "path": "/paths/~1user/delete/x-python", + "path": "/paths/~1user~1front-hash/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html" + "example": "from kittycad.api.users import get_user_front_hash_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_user_front_hash_self():\n # Create our client.\n client = ClientFromEnv()\n\n get_user_front_hash_self.sync(\n client=client,\n )\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_front_hash_self.html" } }, { "op": "add", - "path": "/paths/~1user~1extended/get/x-python", + "path": "/paths/~1user~1session~1{token}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_self_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_self_extended.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html" } }, { "op": "add", - "path": "/paths/~1logout/post/x-python", + "path": "/paths/~1user~1payment~1invoices/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.logout.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[Invoice] = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_invoices_for_user.html" } }, { @@ -153,298 +153,306 @@ }, { "op": "add", - "path": "/paths/~1ping/get/x-python", + "path": "/paths/~1ai~1text-to-cad~1{output_format}/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import ping\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Pong\nfrom kittycad.types import Response\n\n\ndef example_ping():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Pong, Error]] = ping.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Pong = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.ping.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCad\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.text_to_cad_create_body import TextToCadCreateBody\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[TextToCad, Error]] = create_text_to_cad.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n body=TextToCadCreateBody(\n prompt=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCad = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_cad.html" } }, { "op": "add", - "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python", + "path": "/paths/~1async~1operations~1{id}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileConversion\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileConversion, Error]] = create_file_conversion.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n TextToCad,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n TextToCad,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n TextToCad,\n ] = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1apps~1github~1consent/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature import UnitTemperature\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_consent\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AppClientInfo, Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_consent():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AppClientInfo, Error]] = apps_github_consent.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AppClientInfo = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_consent.html" } }, { "op": "add", - "path": "/paths/~1ai~1text-to-cad~1{output_format}/post/x-python", + "path": "/paths/~1logout/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCad\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.text_to_cad_create_body import TextToCadCreateBody\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[TextToCad, Error]] = create_text_to_cad.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n body=TextToCadCreateBody(\n prompt=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCad = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_cad.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.logout.html" } }, { "op": "add", - "path": "/paths/~1apps~1github~1callback/get/x-python", + "path": "/paths/~1async~1operations/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_callback.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_callback.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html" } }, { "op": "add", - "path": "/paths/~1user~1payment/get/x-python", + "path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = get_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_information_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMassConversion, Error]\n ] = get_mass_unit_conversion.sync(\n client=client,\n input_unit=UnitMass.G,\n output_unit=UnitMass.G,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMassConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_mass_unit_conversion.html" } }, { "op": "add", - "path": "/paths/~1user~1payment/put/x-python", + "path": "/paths/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPowerConversion\nfrom kittycad.models.unit_power import UnitPower\nfrom kittycad.types import Response\n\n\ndef example_get_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPowerConversion, Error]\n ] = get_power_unit_conversion.sync(\n client=client,\n input_unit=UnitPower.BTU_PER_MINUTE,\n output_unit=UnitPower.BTU_PER_MINUTE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPowerConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_power_unit_conversion.html" } }, { "op": "add", - "path": "/paths/~1user~1payment/post/x-python", + "path": "/paths/~1user~1payment~1balance/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_create_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = create_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_information_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html" } }, { "op": "add", - "path": "/paths/~1user~1payment/delete/x-python", + "path": "/paths/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_information_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n input_unit=UnitLength.CM,\n output_unit=UnitLength.CM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1_meta~1info/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy import UnitEnergy\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html" } }, { "op": "add", - "path": "/paths/~1user~1payment~1methods/get/x-python", + "path": "/paths/~1user~1api-calls~1{id}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html" } }, { "op": "add", - "path": "/paths/~1async~1operations/get/x-python", + "path": "/paths/~1users~1{id}~1api-calls/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html" } }, { "op": "add", - "path": "/paths/~1file~1volume/post/x-python", + "path": "/paths/~1api-calls/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n output_unit=UnitVolume.CM3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1openai~1openapi.json/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_pressure_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPressureConversion\nfrom kittycad.models.unit_pressure import UnitPressure\nfrom kittycad.types import Response\n\n\ndef example_get_pressure_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPressureConversion, Error]\n ] = get_pressure_unit_conversion.sync(\n client=client,\n input_unit=UnitPressure.ATMOSPHERES,\n output_unit=UnitPressure.ATMOSPHERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPressureConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html" + "example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1volume~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1file~1density/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVolumeConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_density\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileDensity\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_density():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileDensity, Error]] = create_file_density.sync(\n client=client,\n material_mass=3.14,\n material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileDensity = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.html" } }, { "op": "add", - "path": "/paths/~1auth~1email~1callback/get/x-python", + "path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"\",\n token=\"\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy import UnitEnergy\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html" } }, { "op": "add", - "path": "/paths/~1users~1{id}~1api-calls/get/x-python", + "path": "/paths/~1user~1text-to-cad~1{id}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import get_text_to_cad_model_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCad\nfrom kittycad.types import Response\n\n\ndef example_get_text_to_cad_model_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[TextToCad, Error]\n ] = get_text_to_cad_model_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCad = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.get_text_to_cad_model_for_user.html" } }, { "op": "add", - "path": "/paths/~1apps~1github~1consent/get/x-python", + "path": "/paths/~1user~1text-to-cad~1{id}/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_consent\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AppClientInfo, Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_consent():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AppClientInfo, Error]] = apps_github_consent.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AppClientInfo = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_consent.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad_model_feedback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.ai_feedback import AiFeedback\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad_model_feedback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = create_text_to_cad_model_feedback.sync(\n client=client,\n id=\"\",\n feedback=AiFeedback.THUMBS_UP,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_cad_model_feedback.html" } }, { "op": "add", - "path": "/paths/~1openai~1openapi.json/get/x-python", + "path": "/paths/~1user~1api-tokens/get/x-python", "value": { - "example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import list_api_tokens_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiTokenResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_tokens_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiTokenResultsPage, Error]\n ] = list_api_tokens_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiTokenResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.list_api_tokens_for_user.html" } }, { "op": "add", - "path": "/paths/~1user~1api-calls/get/x-python", + "path": "/paths/~1user~1api-tokens/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import user_list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_user_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = user_list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.user_list_api_calls.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import create_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_create_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = create_api_token_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.create_api_token_for_user.html" } }, { "op": "add", - "path": "/paths/~1file~1density/post/x-python", + "path": "/paths/~1internal~1discord~1api-token~1{discord_id}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_density\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileDensity\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_density():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileDensity, Error]] = create_file_density.sync(\n client=client,\n material_mass=3.14,\n material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileDensity = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import internal_get_api_token_for_discord_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_internal_get_api_token_for_discord_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiToken, Error]\n ] = internal_get_api_token_for_discord_user.sync(\n client=client,\n discord_id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.internal_get_api_token_for_discord_user.html" } }, { "op": "add", - "path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python", + "path": "/paths/~1ping/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import ping\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Pong\nfrom kittycad.types import Response\n\n\ndef example_ping():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Pong, Error]] = ping.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Pong = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.ping.html" } }, { "op": "add", - "path": "/paths/~1file~1execute~1{lang}/post/x-python", + "path": "/paths/~1users-extended~1{id}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CodeOutput = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_file_execution.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html" } }, { "op": "add", - "path": "/paths/~1apps~1github~1webhook/post/x-python", + "path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_webhook\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_webhook():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_webhook.sync(\n client=client,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html" } }, { "op": "add", - "path": "/paths/~1/get/x-python", + "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python", "value": { - "example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileConversion\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileConversion, Error]] = create_file_conversion.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_conversion.html" } }, { "op": "add", - "path": "/paths/~1users-extended/get/x-python", + "path": "/paths/~1user/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import list_users_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ExtendedUserResultsPage, Error]\n ] = list_users_extended.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUserResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users_extended.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html" } }, { "op": "add", - "path": "/paths/~1_meta~1info/get/x-python", + "path": "/paths/~1user/put/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"\",\n discord=\"\",\n first_name=\"\",\n github=\"\",\n last_name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html" } }, { "op": "add", - "path": "/paths/~1user~1session~1{token}/get/x-python", + "path": "/paths/~1user/delete/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngleConversion\nfrom kittycad.models.unit_angle import UnitAngle\nfrom kittycad.types import Response\n\n\ndef example_get_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngleConversion, Error]\n ] = get_angle_unit_conversion.sync(\n client=client,\n input_unit=UnitAngle.DEGREES,\n output_unit=UnitAngle.DEGREES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAngleConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angle_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force import UnitForce\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1user~1text-to-cad/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force import UnitForce\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_text_to_cad_models_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCadResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_text_to_cad_models_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[TextToCadResultsPage, Error]\n ] = list_text_to_cad_models_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCadResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_text_to_cad_models_for_user.html" } }, { "op": "add", - "path": "/paths/~1api-calls/get/x-python", + "path": "/paths/~1user~1extended/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_self_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_self_extended.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPowerConversion\nfrom kittycad.models.unit_power import UnitPower\nfrom kittycad.types import Response\n\n\ndef example_get_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPowerConversion, Error]\n ] = get_power_unit_conversion.sync(\n client=client,\n input_unit=UnitPower.BTU_PER_MINUTE,\n output_unit=UnitPower.BTU_PER_MINUTE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPowerConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_power_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html" } }, { "op": "add", - "path": "/paths/~1user~1payment~1balance/get/x-python", + "path": "/paths/~1user~1onboarding/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html" } }, { "op": "add", - "path": "/paths/~1user~1api-tokens~1{token}/get/x-python", + "path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import get_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = get_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.get_api_token_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTorqueConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_unit_conversion.html" } }, { "op": "add", - "path": "/paths/~1user~1api-tokens~1{token}/delete/x-python", + "path": "/paths/~1ai-prompts~1{id}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import delete_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.delete_api_token_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import get_ai_prompt\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPrompt, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_prompt():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AiPrompt, Error]] = get_ai_prompt.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPrompt = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.get_ai_prompt.html" } }, { "op": "add", - "path": "/paths/~1users-extended~1{id}/get/x-python", + "path": "/paths/~1api-calls~1{id}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html" } }, { "op": "add", - "path": "/paths/~1file~1center-of-mass/post/x-python", + "path": "/paths/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngleConversion\nfrom kittycad.models.unit_angle import UnitAngle\nfrom kittycad.types import Response\n\n\ndef example_get_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngleConversion, Error]\n ] = get_angle_unit_conversion.sync(\n client=client,\n input_unit=UnitAngle.DEGREES,\n output_unit=UnitAngle.DEGREES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAngleConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angle_unit_conversion.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment~1methods/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html" } }, { @@ -457,98 +465,106 @@ }, { "op": "add", - "path": "/paths/~1async~1operations~1{id}/get/x-python", + "path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n TextToCad,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n TextToCad,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n TextToCad,\n ] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature import UnitTemperature\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1file~1volume/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTorqueConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n output_unit=UnitVolume.CM3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html" } }, { "op": "add", - "path": "/paths/~1user~1text-to-cad/get/x-python", + "path": "/paths/~1file~1center-of-mass/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_text_to_cad_models_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCadResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_text_to_cad_models_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[TextToCadResultsPage, Error]\n ] = list_text_to_cad_models_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCadResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_text_to_cad_models_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n input_unit=UnitLength.CM,\n output_unit=UnitLength.CM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html" } }, { "op": "add", - "path": "/paths/~1file~1mass/post/x-python", + "path": "/paths/~1unit~1conversion~1volume~1{input_unit}~1{output_unit}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVolumeConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1user~1api-calls/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import user_list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_user_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = user_list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.user_list_api_calls.html" } }, { "op": "add", - "path": "/paths/~1ws~1executor~1term/get/x-python", + "path": "/paths/~1users~1{id}/get/x-python", "value": { - "example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = create_executor_term.sync(\n client=client,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.html" } }, { "op": "add", - "path": "/paths/~1user~1payment~1tax/get/x-python", + "path": "/paths/~1/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.validate_customer_tax_information_for_user.html" + "example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html" } }, { "op": "add", - "path": "/paths/~1users/get/x-python", + "path": "/paths/~1apps~1github~1callback/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import list_users\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserResultsPage, Error]] = list_users.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_callback.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_callback.html" } }, { "op": "add", - "path": "/paths/~1ws~1modeling~1commands/get/x-python", + "path": "/paths/~1file~1execute~1{lang}/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, WebSocketResponse\nfrom kittycad.models.rtc_sdp_type import RtcSdpType\nfrom kittycad.models.rtc_session_description import RtcSessionDescription\nfrom kittycad.models.web_socket_request import sdp_offer\nfrom kittycad.types import Response\n\n\ndef example_modeling_commands_ws():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = modeling_commands_ws.sync(\n client=client,\n fps=10,\n unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n webrtc=False,\n body=sdp_offer(\n offer=RtcSessionDescription(\n sdp=\"\",\n type=RtcSdpType.UNSPECIFIED,\n ),\n ),\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CodeOutput = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_file_execution.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_pressure_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPressureConversion\nfrom kittycad.models.unit_pressure import UnitPressure\nfrom kittycad.types import Response\n\n\ndef example_get_pressure_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPressureConversion, Error]\n ] = get_pressure_unit_conversion.sync(\n client=client,\n input_unit=UnitPressure.ATMOSPHERES,\n output_unit=UnitPressure.ATMOSPHERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPressureConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html" } }, { "op": "add", - "path": "/paths/~1users~1{id}/get/x-python", + "path": "/paths/~1user~1api-tokens~1{token}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import get_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = get_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.get_api_token_for_user.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1api-tokens~1{token}/delete/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import delete_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.delete_api_token_for_user.html" } }, { @@ -558,5 +574,21 @@ "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_intent_for_user.html" } + }, + { + "op": "add", + "path": "/paths/~1users/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import list_users\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserResultsPage, Error]] = list_users.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment~1tax/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.validate_customer_tax_information_for_user.html" + } } ] \ No newline at end of file diff --git a/kittycad/api/ai/__init__.py b/kittycad/api/ai/__init__.py index 86338106a..2a8f49108 100644 --- a/kittycad/api/ai/__init__.py +++ b/kittycad/api/ai/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the ai API paths: AI uses machine learning to generate 3D meshes. """ # noqa: E501 +""" Contains methods for accessing the ai API paths: AI uses machine learning to generate 3D meshes. """ # noqa: E501 diff --git a/kittycad/api/ai/create_text_to_cad.py b/kittycad/api/ai/create_text_to_cad.py index 2ff7fbd79..8ba659da4 100644 --- a/kittycad/api/ai/create_text_to_cad.py +++ b/kittycad/api/ai/create_text_to_cad.py @@ -11,30 +11,15 @@ def _get_kwargs( - - output_format: FileExportFormat, - - - body: TextToCadCreateBody, - - *, client: Client, - - - - - ) -> Dict[str, Any]: - url = "{}/ai/text-to-cad/{output_format}".format(client.base_url, output_format=output_format,) # noqa: E501 - - - - - - + url = "{}/ai/text-to-cad/{output_format}".format( + client.base_url, + output_format=output_format, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -48,23 +33,22 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[TextToCad, Error]] : - if response.status_code == 201: - response_201 = TextToCad.from_dict(response.json()) - return response_201 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[TextToCad, Error]]: + if response.status_code == 201: + response_201 = TextToCad.from_dict(response.json()) + return response_201 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[TextToCad, Error]]]: +) -> Response[Optional[Union[TextToCad, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -74,29 +58,14 @@ def _build_response( def sync_detailed( - - output_format: FileExportFormat, - - - body: TextToCadCreateBody, - - *, client: Client, - - - - - -) -> Response[Optional[Union[TextToCad, Error]]]: +) -> Response[Optional[Union[TextToCad, Error]]]: kwargs = _get_kwargs( - output_format=output_format, - body=body, - client=client, ) @@ -109,60 +78,33 @@ def sync_detailed( def sync( - - output_format: FileExportFormat, - - - body: TextToCadCreateBody, - - *, client: Client, - - - - - -) -> Optional[Union[TextToCad, Error]] : - """This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. -This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501 +) -> Optional[Union[TextToCad, Error]]: + """Because our source of truth for the resulting model is a STEP file, you will always have STEP file contents when you list your generated models. Any other formats you request here will also be returned when you list your generated models. + This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. + One thing to note, if you hit the cache, this endpoint will return right away. So you only have to wait if the status is not `Completed` or `Failed`. + This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better. + """ # noqa: E501 return sync_detailed( - output_format=output_format, - body=body, - client=client, ).parsed async def asyncio_detailed( - - output_format: FileExportFormat, - - - body: TextToCadCreateBody, - - *, client: Client, - - - - - -) -> Response[Optional[Union[TextToCad, Error]]]: +) -> Response[Optional[Union[TextToCad, Error]]]: kwargs = _get_kwargs( - output_format=output_format, - body=body, - client=client, ) @@ -173,33 +115,21 @@ async def asyncio_detailed( async def asyncio( - - output_format: FileExportFormat, - - - body: TextToCadCreateBody, - - *, client: Client, - - - - - -) -> Optional[Union[TextToCad, Error]] : - """This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. -This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501 +) -> Optional[Union[TextToCad, Error]]: + """Because our source of truth for the resulting model is a STEP file, you will always have STEP file contents when you list your generated models. Any other formats you request here will also be returned when you list your generated models. + This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. + One thing to note, if you hit the cache, this endpoint will return right away. So you only have to wait if the status is not `Completed` or `Failed`. + This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better. + """ # noqa: E501 return ( await asyncio_detailed( - output_format=output_format, - body=body, - client=client, ) ).parsed diff --git a/kittycad/api/ai/create_text_to_cad_model_feedback.py b/kittycad/api/ai/create_text_to_cad_model_feedback.py index 5d8a7521a..062052fac 100644 --- a/kittycad/api/ai/create_text_to_cad_model_feedback.py +++ b/kittycad/api/ai/create_text_to_cad_model_feedback.py @@ -9,36 +9,21 @@ def _get_kwargs( - - id: str, - - - feedback: AiFeedback, - - *, client: Client, - - - - - ) -> Dict[str, Any]: - url = "{}/user/text-to-cad/{id}".format(client.base_url, id=id,) # noqa: E501 - - - - + url = "{}/user/text-to-cad/{id}".format( + client.base_url, + id=id, + ) # noqa: E501 + if feedback is not None: if "?" in url: url = url + "&feedback=" + str(feedback) else: url = url + "?feedback=" + str(feedback) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -48,25 +33,21 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Error] : - return None - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Error]: + return None + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) -def _build_response( - *, response: httpx.Response -) -> Response[Optional[Error]]: +def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -76,29 +57,14 @@ def _build_response( def sync_detailed( - - id: str, - - - feedback: AiFeedback, - - *, client: Client, - - - - - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - id=id, - feedback=feedback, - client=client, ) @@ -111,59 +77,29 @@ def sync_detailed( def sync( - - id: str, - - - feedback: AiFeedback, - - *, client: Client, - - - - - -) -> Optional[Error] : +) -> Optional[Error]: """This endpoint requires authentication by any KittyCAD user. The user must be the owner of the text-to-CAD model, in order to give feedback.""" # noqa: E501 return sync_detailed( - id=id, - feedback=feedback, - client=client, ).parsed async def asyncio_detailed( - - id: str, - - - feedback: AiFeedback, - - *, client: Client, - - - - - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - id=id, - feedback=feedback, - client=client, ) @@ -174,32 +110,17 @@ async def asyncio_detailed( async def asyncio( - - id: str, - - - feedback: AiFeedback, - - *, client: Client, - - - - - -) -> Optional[Error] : +) -> Optional[Error]: """This endpoint requires authentication by any KittyCAD user. The user must be the owner of the text-to-CAD model, in order to give feedback.""" # noqa: E501 return ( await asyncio_detailed( - id=id, - feedback=feedback, - client=client, ) ).parsed diff --git a/kittycad/api/ai/get_ai_prompt.py b/kittycad/api/ai/get_ai_prompt.py new file mode 100644 index 000000000..5e2d6458d --- /dev/null +++ b/kittycad/api/ai/get_ai_prompt.py @@ -0,0 +1,115 @@ +from typing import Any, Dict, Optional, Union + +import httpx + +from ...client import Client +from ...models.ai_prompt import AiPrompt +from ...models.error import Error +from ...types import Response + + +def _get_kwargs( + id: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/ai-prompts/{id}".format( + client.base_url, + id=id, + ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[Union[AiPrompt, Error]]: + if response.status_code == 200: + response_200 = AiPrompt.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) + + +def _build_response( + *, response: httpx.Response +) -> Response[Optional[Union[AiPrompt, Error]]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + id: str, + *, + client: Client, +) -> Response[Optional[Union[AiPrompt, Error]]]: + kwargs = _get_kwargs( + id=id, + client=client, + ) + + response = httpx.get( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + id: str, + *, + client: Client, +) -> Optional[Union[AiPrompt, Error]]: + """This endpoint requires authentication by a KittyCAD employee.""" # noqa: E501 + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: Client, +) -> Response[Optional[Union[AiPrompt, Error]]]: + kwargs = _get_kwargs( + id=id, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.get(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + id: str, + *, + client: Client, +) -> Optional[Union[AiPrompt, Error]]: + """This endpoint requires authentication by a KittyCAD employee.""" # noqa: E501 + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/kittycad/api/ai/get_text_to_cad_model_for_user.py b/kittycad/api/ai/get_text_to_cad_model_for_user.py new file mode 100644 index 000000000..699931098 --- /dev/null +++ b/kittycad/api/ai/get_text_to_cad_model_for_user.py @@ -0,0 +1,115 @@ +from typing import Any, Dict, Optional, Union + +import httpx + +from ...client import Client +from ...models.error import Error +from ...models.text_to_cad import TextToCad +from ...types import Response + + +def _get_kwargs( + id: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/user/text-to-cad/{id}".format( + client.base_url, + id=id, + ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[Union[TextToCad, Error]]: + if response.status_code == 200: + response_200 = TextToCad.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) + + +def _build_response( + *, response: httpx.Response +) -> Response[Optional[Union[TextToCad, Error]]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + id: str, + *, + client: Client, +) -> Response[Optional[Union[TextToCad, Error]]]: + kwargs = _get_kwargs( + id=id, + client=client, + ) + + response = httpx.get( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + id: str, + *, + client: Client, +) -> Optional[Union[TextToCad, Error]]: + """This endpoint requires authentication by any KittyCAD user. The user must be the owner of the text-to-CAD model.""" # noqa: E501 + + return sync_detailed( + id=id, + client=client, + ).parsed + + +async def asyncio_detailed( + id: str, + *, + client: Client, +) -> Response[Optional[Union[TextToCad, Error]]]: + kwargs = _get_kwargs( + id=id, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.get(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + id: str, + *, + client: Client, +) -> Optional[Union[TextToCad, Error]]: + """This endpoint requires authentication by any KittyCAD user. The user must be the owner of the text-to-CAD model.""" # noqa: E501 + + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/kittycad/api/ai/list_ai_prompts.py b/kittycad/api/ai/list_ai_prompts.py new file mode 100644 index 000000000..90c8383c4 --- /dev/null +++ b/kittycad/api/ai/list_ai_prompts.py @@ -0,0 +1,159 @@ +from typing import Any, Dict, Optional, Union + +import httpx + +from ...client import Client +from ...models.ai_prompt_results_page import AiPromptResultsPage +from ...models.created_at_sort_mode import CreatedAtSortMode +from ...models.error import Error +from ...types import Response + + +def _get_kwargs( + sort_by: CreatedAtSortMode, + *, + client: Client, + limit: Optional[int] = None, + page_token: Optional[str] = None, +) -> Dict[str, Any]: + url = "{}/ai-prompts".format( + client.base_url, + ) # noqa: E501 + + if limit is not None: + if "?" in url: + url = url + "&limit=" + str(limit) + else: + url = url + "?limit=" + str(limit) + + if page_token is not None: + if "?" in url: + url = url + "&page_token=" + str(page_token) + else: + url = url + "?page_token=" + str(page_token) + + if sort_by is not None: + if "?" in url: + url = url + "&sort_by=" + str(sort_by) + else: + url = url + "?sort_by=" + str(sort_by) + + headers: Dict[str, Any] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[AiPromptResultsPage, Error]]: + if response.status_code == 200: + response_200 = AiPromptResultsPage.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) + + +def _build_response( + *, response: httpx.Response +) -> Response[Optional[Union[AiPromptResultsPage, Error]]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + sort_by: CreatedAtSortMode, + *, + client: Client, + limit: Optional[int] = None, + page_token: Optional[str] = None, +) -> Response[Optional[Union[AiPromptResultsPage, Error]]]: + kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, + ) + + response = httpx.get( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + sort_by: CreatedAtSortMode, + *, + client: Client, + limit: Optional[int] = None, + page_token: Optional[str] = None, +) -> Optional[Union[AiPromptResultsPage, Error]]: + """For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested. + This endpoint requires authentication by a KittyCAD employee. + The AI prompts are returned in order of creation, with the most recently created AI prompts first. + """ # noqa: E501 + + return sync_detailed( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, + ).parsed + + +async def asyncio_detailed( + sort_by: CreatedAtSortMode, + *, + client: Client, + limit: Optional[int] = None, + page_token: Optional[str] = None, +) -> Response[Optional[Union[AiPromptResultsPage, Error]]]: + kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.get(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + sort_by: CreatedAtSortMode, + *, + client: Client, + limit: Optional[int] = None, + page_token: Optional[str] = None, +) -> Optional[Union[AiPromptResultsPage, Error]]: + """For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested. + This endpoint requires authentication by a KittyCAD employee. + The AI prompts are returned in order of creation, with the most recently created AI prompts first. + """ # noqa: E501 + + return ( + await asyncio_detailed( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, + ) + ).parsed diff --git a/kittycad/api/ai/list_text_to_cad_models_for_user.py b/kittycad/api/ai/list_text_to_cad_models_for_user.py index f7b7c79c9..0d615a2e9 100644 --- a/kittycad/api/ai/list_text_to_cad_models_for_user.py +++ b/kittycad/api/ai/list_text_to_cad_models_for_user.py @@ -10,56 +10,33 @@ def _get_kwargs( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - ) -> Dict[str, Any]: - url = "{}/user/text-to-cad".format(client.base_url, ) # noqa: E501 - - + url = "{}/user/text-to-cad".format( + client.base_url, + ) # noqa: E501 + if limit is not None: if "?" in url: url = url + "&limit=" + str(limit) else: url = url + "?limit=" + str(limit) - - - + if page_token is not None: if "?" in url: url = url + "&page_token=" + str(page_token) else: url = url + "?page_token=" + str(page_token) - - - + if sort_by is not None: if "?" in url: url = url + "&sort_by=" + str(sort_by) else: url = url + "?sort_by=" + str(sort_by) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -69,27 +46,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[TextToCadResultsPage, Error]] : - if response.status_code == 200: - response_200 = TextToCadResultsPage.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[TextToCadResultsPage, Error]]: + if response.status_code == 200: + response_200 = TextToCadResultsPage.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[TextToCadResultsPage, Error]]]: +) -> Response[Optional[Union[TextToCadResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -99,37 +76,16 @@ def _build_response( def sync_detailed( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Response[Optional[Union[TextToCadResultsPage, Error]]]: +) -> Response[Optional[Union[TextToCadResultsPage, Error]]]: kwargs = _get_kwargs( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) @@ -142,76 +98,36 @@ def sync_detailed( def sync( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Optional[Union[TextToCadResultsPage, Error]] : - """This endpoint requires authentication by any KittyCAD user. It returns the text-to-CAD models for the authenticated user. -The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.""" # noqa: E501 +) -> Optional[Union[TextToCadResultsPage, Error]]: + """This will always return the STEP file contents as well as the format the user originally requested. + This endpoint requires authentication by any KittyCAD user. It returns the text-to-CAD models for the authenticated user. + The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first. + """ # noqa: E501 return sync_detailed( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ).parsed async def asyncio_detailed( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Response[Optional[Union[TextToCadResultsPage, Error]]]: +) -> Response[Optional[Union[TextToCadResultsPage, Error]]]: kwargs = _get_kwargs( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) @@ -222,41 +138,22 @@ async def asyncio_detailed( async def asyncio( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Optional[Union[TextToCadResultsPage, Error]] : - """This endpoint requires authentication by any KittyCAD user. It returns the text-to-CAD models for the authenticated user. -The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.""" # noqa: E501 +) -> Optional[Union[TextToCadResultsPage, Error]]: + """This will always return the STEP file contents as well as the format the user originally requested. + This endpoint requires authentication by any KittyCAD user. It returns the text-to-CAD models for the authenticated user. + The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first. + """ # noqa: E501 return ( await asyncio_detailed( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) ).parsed diff --git a/kittycad/api/api_calls/__init__.py b/kittycad/api/api_calls/__init__.py index b916f7ddb..917672e26 100644 --- a/kittycad/api/api_calls/__init__.py +++ b/kittycad/api/api_calls/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the api_calls API paths: API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing. """ # noqa: E501 +""" Contains methods for accessing the api_calls API paths: API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing. """ # noqa: E501 diff --git a/kittycad/api/api_calls/get_api_call.py b/kittycad/api/api_calls/get_api_call.py index c59f76a00..b140be1d4 100644 --- a/kittycad/api/api_calls/get_api_call.py +++ b/kittycad/api/api_calls/get_api_call.py @@ -9,22 +9,14 @@ def _get_kwargs( - - id: str, - - *, client: Client, - - - ) -> Dict[str, Any]: - url = "{}/api-calls/{id}".format(client.base_url, id=id,) # noqa: E501 - - - - + url = "{}/api-calls/{id}".format( + client.base_url, + id=id, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -34,27 +26,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPrice, Error]] : - if response.status_code == 200: - response_200 = ApiCallWithPrice.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[ApiCallWithPrice, Error]]: + if response.status_code == 200: + response_200 = ApiCallWithPrice.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: +) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -64,21 +56,12 @@ def _build_response( def sync_detailed( - - id: str, - - *, client: Client, - - - -) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: +) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: kwargs = _get_kwargs( - id=id, - client=client, ) @@ -91,45 +74,27 @@ def sync_detailed( def sync( - - id: str, - - *, client: Client, - - - -) -> Optional[Union[ApiCallWithPrice, Error]] : +) -> Optional[Union[ApiCallWithPrice, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user. -If the user is not authenticated to view the specified API call, then it is not returned. -Only KittyCAD employees can view API calls for other users.""" # noqa: E501 + If the user is not authenticated to view the specified API call, then it is not returned. + Only KittyCAD employees can view API calls for other users.""" # noqa: E501 return sync_detailed( - id=id, - client=client, ).parsed async def asyncio_detailed( - - id: str, - - *, client: Client, - - - -) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: +) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: kwargs = _get_kwargs( - id=id, - client=client, ) @@ -140,26 +105,17 @@ async def asyncio_detailed( async def asyncio( - - id: str, - - *, client: Client, - - - -) -> Optional[Union[ApiCallWithPrice, Error]] : +) -> Optional[Union[ApiCallWithPrice, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user. -If the user is not authenticated to view the specified API call, then it is not returned. -Only KittyCAD employees can view API calls for other users.""" # noqa: E501 + If the user is not authenticated to view the specified API call, then it is not returned. + Only KittyCAD employees can view API calls for other users.""" # noqa: E501 return ( await asyncio_detailed( - id=id, - client=client, ) ).parsed diff --git a/kittycad/api/api_calls/get_api_call_for_user.py b/kittycad/api/api_calls/get_api_call_for_user.py index db4e7bb3e..b0ff01b9f 100644 --- a/kittycad/api/api_calls/get_api_call_for_user.py +++ b/kittycad/api/api_calls/get_api_call_for_user.py @@ -9,22 +9,14 @@ def _get_kwargs( - - id: str, - - *, client: Client, - - - ) -> Dict[str, Any]: - url = "{}/user/api-calls/{id}".format(client.base_url, id=id,) # noqa: E501 - - - - + url = "{}/user/api-calls/{id}".format( + client.base_url, + id=id, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -34,27 +26,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPrice, Error]] : - if response.status_code == 200: - response_200 = ApiCallWithPrice.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[ApiCallWithPrice, Error]]: + if response.status_code == 200: + response_200 = ApiCallWithPrice.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: +) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -64,21 +56,12 @@ def _build_response( def sync_detailed( - - id: str, - - *, client: Client, - - - -) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: +) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: kwargs = _get_kwargs( - id=id, - client=client, ) @@ -91,43 +74,25 @@ def sync_detailed( def sync( - - id: str, - - *, client: Client, - - - -) -> Optional[Union[ApiCallWithPrice, Error]] : +) -> Optional[Union[ApiCallWithPrice, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.""" # noqa: E501 return sync_detailed( - id=id, - client=client, ).parsed async def asyncio_detailed( - - id: str, - - *, client: Client, - - - -) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: +) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: kwargs = _get_kwargs( - id=id, - client=client, ) @@ -138,24 +103,15 @@ async def asyncio_detailed( async def asyncio( - - id: str, - - *, client: Client, - - - -) -> Optional[Union[ApiCallWithPrice, Error]] : +) -> Optional[Union[ApiCallWithPrice, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.""" # noqa: E501 return ( await asyncio_detailed( - id=id, - client=client, ) ).parsed diff --git a/kittycad/api/api_calls/get_api_call_metrics.py b/kittycad/api/api_calls/get_api_call_metrics.py index 46f48c00d..86f4892d0 100644 --- a/kittycad/api/api_calls/get_api_call_metrics.py +++ b/kittycad/api/api_calls/get_api_call_metrics.py @@ -10,28 +10,19 @@ def _get_kwargs( - - group_by: ApiCallQueryGroupBy, - - *, client: Client, - - - ) -> Dict[str, Any]: - url = "{}/api-call-metrics".format(client.base_url, ) # noqa: E501 - - + url = "{}/api-call-metrics".format( + client.base_url, + ) # noqa: E501 + if group_by is not None: if "?" in url: url = url + "&group_by=" + str(group_by) else: url = url + "?group_by=" + str(group_by) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -41,30 +32,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[List[ApiCallQueryGroup], Error]] : - if response.status_code == 200: - response_200 = [ - ApiCallQueryGroup.from_dict(item) - for item in response.json() - ] - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[List[ApiCallQueryGroup], Error]]: + if response.status_code == 200: + response_200 = [ApiCallQueryGroup.from_dict(item) for item in response.json()] + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]: +) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -74,21 +62,12 @@ def _build_response( def sync_detailed( - - group_by: ApiCallQueryGroupBy, - - *, client: Client, - - - -) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]: +) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]: kwargs = _get_kwargs( - group_by=group_by, - client=client, ) @@ -101,43 +80,25 @@ def sync_detailed( def sync( - - group_by: ApiCallQueryGroupBy, - - *, client: Client, - - - -) -> Optional[Union[List[ApiCallQueryGroup], Error]] : +) -> Optional[Union[List[ApiCallQueryGroup], Error]]: """This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.""" # noqa: E501 return sync_detailed( - group_by=group_by, - client=client, ).parsed async def asyncio_detailed( - - group_by: ApiCallQueryGroupBy, - - *, client: Client, - - - -) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]: +) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]: kwargs = _get_kwargs( - group_by=group_by, - client=client, ) @@ -148,24 +109,15 @@ async def asyncio_detailed( async def asyncio( - - group_by: ApiCallQueryGroupBy, - - *, client: Client, - - - -) -> Optional[Union[List[ApiCallQueryGroup], Error]] : +) -> Optional[Union[List[ApiCallQueryGroup], Error]]: """This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.""" # noqa: E501 return ( await asyncio_detailed( - group_by=group_by, - client=client, ) ).parsed diff --git a/kittycad/api/api_calls/get_async_operation.py b/kittycad/api/api_calls/get_async_operation.py index af89690dc..f44e60eb8 100644 --- a/kittycad/api/api_calls/get_async_operation.py +++ b/kittycad/api/api_calls/get_async_operation.py @@ -15,22 +15,14 @@ def _get_kwargs( - - id: str, - - *, client: Client, - - - ) -> Dict[str, Any]: - url = "{}/async/operations/{id}".format(client.base_url, id=id,) # noqa: E501 - - - - + url = "{}/async/operations/{id}".format( + client.base_url, + id=id, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -40,89 +32,113 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]] : - if response.status_code == 200: - data = response.json() - try: - if not isinstance(data, dict): - raise TypeError() - option_file_conversion = FileConversion.from_dict(data) - return option_file_conversion - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_file_center_of_mass = FileCenterOfMass.from_dict(data) - return option_file_center_of_mass - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_file_mass = FileMass.from_dict(data) - return option_file_mass - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_file_volume = FileVolume.from_dict(data) - return option_file_volume - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_file_density = FileDensity.from_dict(data) - return option_file_density - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_file_surface_area = FileSurfaceArea.from_dict(data) - return option_file_surface_area - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_text_to_cad = TextToCad.from_dict(data) - return option_text_to_cad - except ValueError: - raise - except TypeError: - raise - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[ + Union[ + FileConversion, + FileCenterOfMass, + FileMass, + FileVolume, + FileDensity, + FileSurfaceArea, + TextToCad, + Error, + ] +]: + if response.status_code == 200: + data = response.json() + try: + if not isinstance(data, dict): + raise TypeError() + option_file_conversion = FileConversion.from_dict(data) + return option_file_conversion + except ValueError: + pass + except TypeError: + pass + try: + if not isinstance(data, dict): + raise TypeError() + option_file_center_of_mass = FileCenterOfMass.from_dict(data) + return option_file_center_of_mass + except ValueError: + pass + except TypeError: + pass + try: + if not isinstance(data, dict): + raise TypeError() + option_file_mass = FileMass.from_dict(data) + return option_file_mass + except ValueError: + pass + except TypeError: + pass + try: + if not isinstance(data, dict): + raise TypeError() + option_file_volume = FileVolume.from_dict(data) + return option_file_volume + except ValueError: + pass + except TypeError: + pass + try: + if not isinstance(data, dict): + raise TypeError() + option_file_density = FileDensity.from_dict(data) + return option_file_density + except ValueError: + pass + except TypeError: + pass + try: + if not isinstance(data, dict): + raise TypeError() + option_file_surface_area = FileSurfaceArea.from_dict(data) + return option_file_surface_area + except ValueError: + pass + except TypeError: + pass + try: + if not isinstance(data, dict): + raise TypeError() + option_text_to_cad = TextToCad.from_dict(data) + return option_text_to_cad + except ValueError: + raise + except TypeError: + raise + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]]]: +) -> Response[ + Optional[ + Union[ + FileConversion, + FileCenterOfMass, + FileMass, + FileVolume, + FileDensity, + FileSurfaceArea, + TextToCad, + Error, + ] + ] +]: return Response( status_code=response.status_code, content=response.content, @@ -132,21 +148,25 @@ def _build_response( def sync_detailed( - - id: str, - - *, client: Client, - - - -) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]]]: +) -> Response[ + Optional[ + Union[ + FileConversion, + FileCenterOfMass, + FileMass, + FileVolume, + FileDensity, + FileSurfaceArea, + TextToCad, + Error, + ] + ] +]: kwargs = _get_kwargs( - id=id, - client=client, ) @@ -159,46 +179,53 @@ def sync_detailed( def sync( - - id: str, - - *, client: Client, - - - -) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]] : +) -> Optional[ + Union[ + FileConversion, + FileCenterOfMass, + FileMass, + FileVolume, + FileDensity, + FileSurfaceArea, + TextToCad, + Error, + ] +]: """Get the status and output of an async operation. -This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user. -If the user is not authenticated to view the specified async operation, then it is not returned. -Only KittyCAD employees with the proper access can view async operations for other users.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user. + If the user is not authenticated to view the specified async operation, then it is not returned. + Only KittyCAD employees with the proper access can view async operations for other users. + """ # noqa: E501 return sync_detailed( - id=id, - client=client, ).parsed async def asyncio_detailed( - - id: str, - - *, client: Client, - - - -) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]]]: +) -> Response[ + Optional[ + Union[ + FileConversion, + FileCenterOfMass, + FileMass, + FileVolume, + FileDensity, + FileSurfaceArea, + TextToCad, + Error, + ] + ] +]: kwargs = _get_kwargs( - id=id, - client=client, ) @@ -209,27 +236,30 @@ async def asyncio_detailed( async def asyncio( - - id: str, - - *, client: Client, - - - -) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]] : +) -> Optional[ + Union[ + FileConversion, + FileCenterOfMass, + FileMass, + FileVolume, + FileDensity, + FileSurfaceArea, + TextToCad, + Error, + ] +]: """Get the status and output of an async operation. -This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user. -If the user is not authenticated to view the specified async operation, then it is not returned. -Only KittyCAD employees with the proper access can view async operations for other users.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user. + If the user is not authenticated to view the specified async operation, then it is not returned. + Only KittyCAD employees with the proper access can view async operations for other users. + """ # noqa: E501 return ( await asyncio_detailed( - id=id, - client=client, ) ).parsed diff --git a/kittycad/api/api_calls/list_api_calls.py b/kittycad/api/api_calls/list_api_calls.py index c0f8e6309..45071e281 100644 --- a/kittycad/api/api_calls/list_api_calls.py +++ b/kittycad/api/api_calls/list_api_calls.py @@ -10,56 +10,33 @@ def _get_kwargs( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - ) -> Dict[str, Any]: - url = "{}/api-calls".format(client.base_url, ) # noqa: E501 - - + url = "{}/api-calls".format( + client.base_url, + ) # noqa: E501 + if limit is not None: if "?" in url: url = url + "&limit=" + str(limit) else: url = url + "?limit=" + str(limit) - - - + if page_token is not None: if "?" in url: url = url + "&page_token=" + str(page_token) else: url = url + "?page_token=" + str(page_token) - - - + if sort_by is not None: if "?" in url: url = url + "&sort_by=" + str(sort_by) else: url = url + "?sort_by=" + str(sort_by) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -69,27 +46,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : - if response.status_code == 200: - response_200 = ApiCallWithPriceResultsPage.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: + if response.status_code == 200: + response_200 = ApiCallWithPriceResultsPage.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -99,37 +76,16 @@ def _build_response( def sync_detailed( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: kwargs = _get_kwargs( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) @@ -142,75 +98,33 @@ def sync_detailed( def sync( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : +) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: """This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501 return sync_detailed( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ).parsed async def asyncio_detailed( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: kwargs = _get_kwargs( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) @@ -221,40 +135,19 @@ async def asyncio_detailed( async def asyncio( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : +) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: """This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501 return ( await asyncio_detailed( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) ).parsed diff --git a/kittycad/api/api_calls/list_api_calls_for_user.py b/kittycad/api/api_calls/list_api_calls_for_user.py index 988b77d1b..beb575684 100644 --- a/kittycad/api/api_calls/list_api_calls_for_user.py +++ b/kittycad/api/api_calls/list_api_calls_for_user.py @@ -10,64 +10,35 @@ def _get_kwargs( - - id: str, - - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - ) -> Dict[str, Any]: - url = "{}/users/{id}/api-calls".format(client.base_url, id=id,) # noqa: E501 - - - - + url = "{}/users/{id}/api-calls".format( + client.base_url, + id=id, + ) # noqa: E501 + if limit is not None: if "?" in url: url = url + "&limit=" + str(limit) else: url = url + "?limit=" + str(limit) - - - + if page_token is not None: if "?" in url: url = url + "&page_token=" + str(page_token) else: url = url + "?page_token=" + str(page_token) - - - + if sort_by is not None: if "?" in url: url = url + "&sort_by=" + str(sort_by) else: url = url + "?sort_by=" + str(sort_by) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -77,27 +48,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : - if response.status_code == 200: - response_200 = ApiCallWithPriceResultsPage.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: + if response.status_code == 200: + response_200 = ApiCallWithPriceResultsPage.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -107,45 +78,18 @@ def _build_response( def sync_detailed( - - id: str, - - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: kwargs = _get_kwargs( - id=id, - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) @@ -158,94 +102,41 @@ def sync_detailed( def sync( - - id: str, - - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : +) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if "me" is passed as the user id. -Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user. -If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id. -The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501 + Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user. + If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id. + The API calls are returned in order of creation, with the most recently created API calls first. + """ # noqa: E501 return sync_detailed( - id=id, - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ).parsed async def asyncio_detailed( - - id: str, - - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: kwargs = _get_kwargs( - id=id, - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) @@ -256,51 +147,25 @@ async def asyncio_detailed( async def asyncio( - - id: str, - - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : +) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if "me" is passed as the user id. -Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user. -If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id. -The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501 + Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user. + If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id. + The API calls are returned in order of creation, with the most recently created API calls first. + """ # noqa: E501 return ( await asyncio_detailed( - id=id, - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) ).parsed diff --git a/kittycad/api/api_calls/list_async_operations.py b/kittycad/api/api_calls/list_async_operations.py index 3634262cc..fd1a2664b 100644 --- a/kittycad/api/api_calls/list_async_operations.py +++ b/kittycad/api/api_calls/list_async_operations.py @@ -11,70 +11,40 @@ def _get_kwargs( - - - - - - sort_by: CreatedAtSortMode, - - - status: ApiCallStatus, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - - - ) -> Dict[str, Any]: - url = "{}/async/operations".format(client.base_url, ) # noqa: E501 - - + url = "{}/async/operations".format( + client.base_url, + ) # noqa: E501 + if limit is not None: if "?" in url: url = url + "&limit=" + str(limit) else: url = url + "?limit=" + str(limit) - - - + if page_token is not None: if "?" in url: url = url + "&page_token=" + str(page_token) else: url = url + "?page_token=" + str(page_token) - - - + if sort_by is not None: if "?" in url: url = url + "&sort_by=" + str(sort_by) else: url = url + "?sort_by=" + str(sort_by) - - - + if status is not None: if "?" in url: url = url + "&status=" + str(status) else: url = url + "?status=" + str(status) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -84,27 +54,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[AsyncApiCallResultsPage, Error]] : - if response.status_code == 200: - response_200 = AsyncApiCallResultsPage.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[AsyncApiCallResultsPage, Error]]: + if response.status_code == 200: + response_200 = AsyncApiCallResultsPage.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]: +) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -114,45 +84,18 @@ def _build_response( def sync_detailed( - - - - - - sort_by: CreatedAtSortMode, - - - status: ApiCallStatus, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - - - -) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]: +) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]: kwargs = _get_kwargs( - limit=limit, - page_token=page_token, - sort_by=sort_by, - status=status, - client=client, ) @@ -165,92 +108,38 @@ def sync_detailed( def sync( - - - - - - sort_by: CreatedAtSortMode, - - - status: ApiCallStatus, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - - - -) -> Optional[Union[AsyncApiCallResultsPage, Error]] : +) -> Optional[Union[AsyncApiCallResultsPage, Error]]: """For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint. -This endpoint requires authentication by a KittyCAD employee.""" # noqa: E501 + This endpoint requires authentication by a KittyCAD employee.""" # noqa: E501 return sync_detailed( - limit=limit, - page_token=page_token, - sort_by=sort_by, - status=status, - client=client, ).parsed async def asyncio_detailed( - - - - - - sort_by: CreatedAtSortMode, - - - status: ApiCallStatus, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - - - -) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]: +) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]: kwargs = _get_kwargs( - limit=limit, - page_token=page_token, - sort_by=sort_by, - status=status, - client=client, ) @@ -261,49 +150,22 @@ async def asyncio_detailed( async def asyncio( - - - - - - sort_by: CreatedAtSortMode, - - - status: ApiCallStatus, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - - - -) -> Optional[Union[AsyncApiCallResultsPage, Error]] : +) -> Optional[Union[AsyncApiCallResultsPage, Error]]: """For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint. -This endpoint requires authentication by a KittyCAD employee.""" # noqa: E501 + This endpoint requires authentication by a KittyCAD employee.""" # noqa: E501 return ( await asyncio_detailed( - limit=limit, - page_token=page_token, - sort_by=sort_by, - status=status, - client=client, ) ).parsed diff --git a/kittycad/api/api_calls/user_list_api_calls.py b/kittycad/api/api_calls/user_list_api_calls.py index 8b354713f..a6a1cec93 100644 --- a/kittycad/api/api_calls/user_list_api_calls.py +++ b/kittycad/api/api_calls/user_list_api_calls.py @@ -10,56 +10,33 @@ def _get_kwargs( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - ) -> Dict[str, Any]: - url = "{}/user/api-calls".format(client.base_url, ) # noqa: E501 - - + url = "{}/user/api-calls".format( + client.base_url, + ) # noqa: E501 + if limit is not None: if "?" in url: url = url + "&limit=" + str(limit) else: url = url + "?limit=" + str(limit) - - - + if page_token is not None: if "?" in url: url = url + "&page_token=" + str(page_token) else: url = url + "?page_token=" + str(page_token) - - - + if sort_by is not None: if "?" in url: url = url + "&sort_by=" + str(sort_by) else: url = url + "?sort_by=" + str(sort_by) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -69,27 +46,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : - if response.status_code == 200: - response_200 = ApiCallWithPriceResultsPage.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: + if response.status_code == 200: + response_200 = ApiCallWithPriceResultsPage.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -99,37 +76,16 @@ def _build_response( def sync_detailed( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: kwargs = _get_kwargs( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) @@ -142,76 +98,35 @@ def sync_detailed( def sync( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : +) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user. -The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501 + The API calls are returned in order of creation, with the most recently created API calls first. + """ # noqa: E501 return sync_detailed( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ).parsed async def asyncio_detailed( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: kwargs = _get_kwargs( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) @@ -222,41 +137,21 @@ async def asyncio_detailed( async def asyncio( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : +) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user. -The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501 + The API calls are returned in order of creation, with the most recently created API calls first. + """ # noqa: E501 return ( await asyncio_detailed( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) ).parsed diff --git a/kittycad/api/api_tokens/__init__.py b/kittycad/api/api_tokens/__init__.py index 10ba948ac..5b70d3261 100644 --- a/kittycad/api/api_tokens/__init__.py +++ b/kittycad/api/api_tokens/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the api_tokens API paths: API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI. """ # noqa: E501 +""" Contains methods for accessing the api_tokens API paths: API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI. """ # noqa: E501 diff --git a/kittycad/api/api_tokens/create_api_token_for_user.py b/kittycad/api/api_tokens/create_api_token_for_user.py index f8db0c24a..6b7c3d972 100644 --- a/kittycad/api/api_tokens/create_api_token_for_user.py +++ b/kittycad/api/api_tokens/create_api_token_for_user.py @@ -9,14 +9,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/user/api-tokens".format(client.base_url, ) # noqa: E501 - - + url = "{}/user/api-tokens".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,27 +24,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]] : - if response.status_code == 201: - response_201 = ApiToken.from_dict(response.json()) - return response_201 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]]: + if response.status_code == 201: + response_201 = ApiToken.from_dict(response.json()) + return response_201 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[ApiToken, Error]]]: +) -> Response[Optional[Union[ApiToken, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -56,13 +52,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[ApiToken, Error]]]: +) -> Response[Optional[Union[ApiToken, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -75,27 +68,21 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[ApiToken, Error]] : +) -> Optional[Union[ApiToken, Error]]: """This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.""" # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[ApiToken, Error]]]: +) -> Response[Optional[Union[ApiToken, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -106,16 +93,13 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[ApiToken, Error]] : +) -> Optional[Union[ApiToken, Error]]: """This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/api_tokens/delete_api_token_for_user.py b/kittycad/api/api_tokens/delete_api_token_for_user.py index 9db28e831..c3dd8345f 100644 --- a/kittycad/api/api_tokens/delete_api_token_for_user.py +++ b/kittycad/api/api_tokens/delete_api_token_for_user.py @@ -8,22 +8,14 @@ def _get_kwargs( - - token: str, - - *, client: Client, - - - ) -> Dict[str, Any]: - url = "{}/user/api-tokens/{token}".format(client.base_url, token=token,) # noqa: E501 - - - - + url = "{}/user/api-tokens/{token}".format( + client.base_url, + token=token, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -33,25 +25,21 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Error] : - return None - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Error]: + return None + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) -def _build_response( - *, response: httpx.Response -) -> Response[Optional[Error]]: +def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -61,21 +49,12 @@ def _build_response( def sync_detailed( - - token: str, - - *, client: Client, - - - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - token=token, - client=client, ) @@ -88,44 +67,27 @@ def sync_detailed( def sync( - - token: str, - - *, client: Client, - - - -) -> Optional[Error] : +) -> Optional[Error]: """This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user. -This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.""" # noqa: E501 + This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes. + """ # noqa: E501 return sync_detailed( - token=token, - client=client, ).parsed async def asyncio_detailed( - - token: str, - - *, client: Client, - - - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - token=token, - client=client, ) @@ -136,25 +98,17 @@ async def asyncio_detailed( async def asyncio( - - token: str, - - *, client: Client, - - - -) -> Optional[Error] : +) -> Optional[Error]: """This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user. -This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.""" # noqa: E501 + This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes. + """ # noqa: E501 return ( await asyncio_detailed( - token=token, - client=client, ) ).parsed diff --git a/kittycad/api/api_tokens/get_api_token_for_user.py b/kittycad/api/api_tokens/get_api_token_for_user.py index aff1b45be..b26130194 100644 --- a/kittycad/api/api_tokens/get_api_token_for_user.py +++ b/kittycad/api/api_tokens/get_api_token_for_user.py @@ -9,22 +9,14 @@ def _get_kwargs( - - token: str, - - *, client: Client, - - - ) -> Dict[str, Any]: - url = "{}/user/api-tokens/{token}".format(client.base_url, token=token,) # noqa: E501 - - - - + url = "{}/user/api-tokens/{token}".format( + client.base_url, + token=token, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -34,27 +26,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]] : - if response.status_code == 200: - response_200 = ApiToken.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]]: + if response.status_code == 200: + response_200 = ApiToken.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[ApiToken, Error]]]: +) -> Response[Optional[Union[ApiToken, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -64,21 +54,12 @@ def _build_response( def sync_detailed( - - token: str, - - *, client: Client, - - - -) -> Response[Optional[Union[ApiToken, Error]]]: +) -> Response[Optional[Union[ApiToken, Error]]]: kwargs = _get_kwargs( - token=token, - client=client, ) @@ -91,43 +72,25 @@ def sync_detailed( def sync( - - token: str, - - *, client: Client, - - - -) -> Optional[Union[ApiToken, Error]] : +) -> Optional[Union[ApiToken, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501 return sync_detailed( - token=token, - client=client, ).parsed async def asyncio_detailed( - - token: str, - - *, client: Client, - - - -) -> Response[Optional[Union[ApiToken, Error]]]: +) -> Response[Optional[Union[ApiToken, Error]]]: kwargs = _get_kwargs( - token=token, - client=client, ) @@ -138,24 +101,15 @@ async def asyncio_detailed( async def asyncio( - - token: str, - - *, client: Client, - - - -) -> Optional[Union[ApiToken, Error]] : +) -> Optional[Union[ApiToken, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501 return ( await asyncio_detailed( - token=token, - client=client, ) ).parsed diff --git a/kittycad/api/api_tokens/list_api_tokens_for_user.py b/kittycad/api/api_tokens/list_api_tokens_for_user.py index ebe552995..2f355fe2c 100644 --- a/kittycad/api/api_tokens/list_api_tokens_for_user.py +++ b/kittycad/api/api_tokens/list_api_tokens_for_user.py @@ -10,56 +10,33 @@ def _get_kwargs( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - ) -> Dict[str, Any]: - url = "{}/user/api-tokens".format(client.base_url, ) # noqa: E501 - - + url = "{}/user/api-tokens".format( + client.base_url, + ) # noqa: E501 + if limit is not None: if "?" in url: url = url + "&limit=" + str(limit) else: url = url + "?limit=" + str(limit) - - - + if page_token is not None: if "?" in url: url = url + "&page_token=" + str(page_token) else: url = url + "?page_token=" + str(page_token) - - - + if sort_by is not None: if "?" in url: url = url + "&sort_by=" + str(sort_by) else: url = url + "?sort_by=" + str(sort_by) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -69,27 +46,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiTokenResultsPage, Error]] : - if response.status_code == 200: - response_200 = ApiTokenResultsPage.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[ApiTokenResultsPage, Error]]: + if response.status_code == 200: + response_200 = ApiTokenResultsPage.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]: +) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -99,37 +76,16 @@ def _build_response( def sync_detailed( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]: +) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]: kwargs = _get_kwargs( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) @@ -142,76 +98,35 @@ def sync_detailed( def sync( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Optional[Union[ApiTokenResultsPage, Error]] : +) -> Optional[Union[ApiTokenResultsPage, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user. -The API tokens are returned in order of creation, with the most recently created API tokens first.""" # noqa: E501 + The API tokens are returned in order of creation, with the most recently created API tokens first. + """ # noqa: E501 return sync_detailed( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ).parsed async def asyncio_detailed( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]: +) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]: kwargs = _get_kwargs( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) @@ -222,41 +137,21 @@ async def asyncio_detailed( async def asyncio( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Optional[Union[ApiTokenResultsPage, Error]] : +) -> Optional[Union[ApiTokenResultsPage, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user. -The API tokens are returned in order of creation, with the most recently created API tokens first.""" # noqa: E501 + The API tokens are returned in order of creation, with the most recently created API tokens first. + """ # noqa: E501 return ( await asyncio_detailed( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) ).parsed diff --git a/kittycad/api/apps/__init__.py b/kittycad/api/apps/__init__.py index 173bace31..caf3ca3da 100644 --- a/kittycad/api/apps/__init__.py +++ b/kittycad/api/apps/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the apps API paths: Endpoints for third party app grant flows. """ # noqa: E501 +""" Contains methods for accessing the apps API paths: Endpoints for third party app grant flows. """ # noqa: E501 diff --git a/kittycad/api/apps/apps_github_callback.py b/kittycad/api/apps/apps_github_callback.py index fa4d274c4..90953b092 100644 --- a/kittycad/api/apps/apps_github_callback.py +++ b/kittycad/api/apps/apps_github_callback.py @@ -8,14 +8,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/apps/github/callback".format(client.base_url, ) # noqa: E501 - - + url = "{}/apps/github/callback".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -25,25 +23,21 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Error] : - return None - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Error]: + return None + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) -def _build_response( - *, response: httpx.Response -) -> Response[Optional[Error]]: +def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -53,13 +47,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - client=client, ) @@ -72,28 +63,23 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Error] : +) -> Optional[Error]: """This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. -The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501 + The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. + """ # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - client=client, ) @@ -104,17 +90,15 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Error] : +) -> Optional[Error]: """This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. -The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501 + The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. + """ # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/apps/apps_github_consent.py b/kittycad/api/apps/apps_github_consent.py index 292eb72fe..e2ccfa94f 100644 --- a/kittycad/api/apps/apps_github_consent.py +++ b/kittycad/api/apps/apps_github_consent.py @@ -9,14 +9,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/apps/github/consent".format(client.base_url, ) # noqa: E501 - - + url = "{}/apps/github/consent".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,27 +24,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[AppClientInfo, Error]] : - if response.status_code == 200: - response_200 = AppClientInfo.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[AppClientInfo, Error]]: + if response.status_code == 200: + response_200 = AppClientInfo.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[AppClientInfo, Error]]]: +) -> Response[Optional[Union[AppClientInfo, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -56,13 +54,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[AppClientInfo, Error]]]: +) -> Response[Optional[Union[AppClientInfo, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -75,28 +70,23 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[AppClientInfo, Error]] : +) -> Optional[Union[AppClientInfo, Error]]: """This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. -The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501 + The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. + """ # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[AppClientInfo, Error]]]: +) -> Response[Optional[Union[AppClientInfo, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -107,17 +97,15 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[AppClientInfo, Error]] : +) -> Optional[Union[AppClientInfo, Error]]: """This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. -The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501 + The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. + """ # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/apps/apps_github_webhook.py b/kittycad/api/apps/apps_github_webhook.py index a8094e5ce..0713325b7 100644 --- a/kittycad/api/apps/apps_github_webhook.py +++ b/kittycad/api/apps/apps_github_webhook.py @@ -8,22 +8,13 @@ def _get_kwargs( - - body: bytes, - - *, client: Client, - - - ) -> Dict[str, Any]: - url = "{}/apps/github/webhook".format(client.base_url, ) # noqa: E501 - - - - + url = "{}/apps/github/webhook".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -37,21 +28,18 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Error] : - return None - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Error]: + return None + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) -def _build_response( - *, response: httpx.Response -) -> Response[Optional[Error]]: +def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -61,21 +49,12 @@ def _build_response( def sync_detailed( - - body: bytes, - - *, client: Client, - - - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - body=body, - client=client, ) @@ -88,43 +67,25 @@ def sync_detailed( def sync( - - body: bytes, - - *, client: Client, - - - -) -> Optional[Error] : +) -> Optional[Error]: """These come from the GitHub app.""" # noqa: E501 return sync_detailed( - body=body, - client=client, ).parsed async def asyncio_detailed( - - body: bytes, - - *, client: Client, - - - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - body=body, - client=client, ) @@ -135,24 +96,15 @@ async def asyncio_detailed( async def asyncio( - - body: bytes, - - *, client: Client, - - - -) -> Optional[Error] : +) -> Optional[Error]: """These come from the GitHub app.""" # noqa: E501 return ( await asyncio_detailed( - body=body, - client=client, ) ).parsed diff --git a/kittycad/api/beta/__init__.py b/kittycad/api/beta/__init__.py index 76183d8b7..ddd904abc 100644 --- a/kittycad/api/beta/__init__.py +++ b/kittycad/api/beta/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the beta API paths: Beta API endpoints. We will not charge for these endpoints while they are in beta. """ # noqa: E501 +""" Contains methods for accessing the beta API paths: Beta API endpoints. We will not charge for these endpoints while they are in beta. """ # noqa: E501 diff --git a/kittycad/api/constant/__init__.py b/kittycad/api/constant/__init__.py index ccb736c1a..0c15e8842 100644 --- a/kittycad/api/constant/__init__.py +++ b/kittycad/api/constant/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the constant API paths: Constants. These are helpful as helpers. """ # noqa: E501 +""" Contains methods for accessing the constant API paths: Constants. These are helpful as helpers. """ # noqa: E501 diff --git a/kittycad/api/executor/__init__.py b/kittycad/api/executor/__init__.py index 8f1321ce8..34d5e2dab 100644 --- a/kittycad/api/executor/__init__.py +++ b/kittycad/api/executor/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the executor API paths: Endpoints that allow for code execution or creation of code execution environments. """ # noqa: E501 +""" Contains methods for accessing the executor API paths: Endpoints that allow for code execution or creation of code execution environments. """ # noqa: E501 diff --git a/kittycad/api/executor/create_executor_term.py b/kittycad/api/executor/create_executor_term.py index 0705ac11b..32912f893 100644 --- a/kittycad/api/executor/create_executor_term.py +++ b/kittycad/api/executor/create_executor_term.py @@ -8,14 +8,10 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/ws/executor/term".format(client.base_url) # noqa: E501 - - + url = "{}/ws/executor/term".format(client.base_url) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -25,45 +21,42 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } def sync( - *, client: Client, - ) -> ClientConnection: """Attach to a docker container to create an interactive terminal.""" # noqa: E501 kwargs = _get_kwargs( - client=client, ) - with ws_connect(kwargs["url"].replace("https://", "wss://"), additional_headers=kwargs["headers"]) as websocket: - return websocket # type: ignore + with ws_connect( + kwargs["url"].replace("https://", "wss://"), + additional_headers=kwargs["headers"], + ) as websocket: + return websocket # type: ignore # Return an error if we got here. return Error(message="An error occurred while connecting to the websocket.") - async def asyncio( - *, client: Client, - ) -> WebSocketClientProtocol: """Attach to a docker container to create an interactive terminal.""" # noqa: E501 kwargs = _get_kwargs( - client=client, ) - async with ws_connect_async(kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"]) as websocket: + async with ws_connect_async( + kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"] + ) as websocket: return websocket # Return an error if we got here. diff --git a/kittycad/api/executor/create_file_execution.py b/kittycad/api/executor/create_file_execution.py index 84c0105f3..d7b017b8b 100644 --- a/kittycad/api/executor/create_file_execution.py +++ b/kittycad/api/executor/create_file_execution.py @@ -10,44 +10,22 @@ def _get_kwargs( - - lang: CodeLanguage, - - - - - body: bytes, - - *, client: Client, - - - - output: Optional[str] = None, - - - - ) -> Dict[str, Any]: - url = "{}/file/execute/{lang}".format(client.base_url, lang=lang,) # noqa: E501 - - - - + url = "{}/file/execute/{lang}".format( + client.base_url, + lang=lang, + ) # noqa: E501 + if output is not None: if "?" in url: url = url + "&output=" + str(output) else: url = url + "?output=" + str(output) - - - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -61,23 +39,22 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[CodeOutput, Error]] : - if response.status_code == 200: - response_200 = CodeOutput.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[CodeOutput, Error]]: + if response.status_code == 200: + response_200 = CodeOutput.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[CodeOutput, Error]]]: +) -> Response[Optional[Union[CodeOutput, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -87,37 +64,16 @@ def _build_response( def sync_detailed( - - lang: CodeLanguage, - - - - - body: bytes, - - *, client: Client, - - - - output: Optional[str] = None, - - - - -) -> Response[Optional[Union[CodeOutput, Error]]]: +) -> Response[Optional[Union[CodeOutput, Error]]]: kwargs = _get_kwargs( - lang=lang, - output=output, - body=body, - client=client, ) @@ -130,75 +86,31 @@ def sync_detailed( def sync( - - lang: CodeLanguage, - - - - - body: bytes, - - *, client: Client, - - - - output: Optional[str] = None, - - - - -) -> Optional[Union[CodeOutput, Error]] : - - +) -> Optional[Union[CodeOutput, Error]]: return sync_detailed( - lang=lang, - output=output, - body=body, - client=client, ).parsed async def asyncio_detailed( - - lang: CodeLanguage, - - - - - body: bytes, - - *, client: Client, - - - - output: Optional[str] = None, - - - - -) -> Response[Optional[Union[CodeOutput, Error]]]: +) -> Response[Optional[Union[CodeOutput, Error]]]: kwargs = _get_kwargs( - lang=lang, - output=output, - body=body, - client=client, ) @@ -209,40 +121,17 @@ async def asyncio_detailed( async def asyncio( - - lang: CodeLanguage, - - - - - body: bytes, - - *, client: Client, - - - - output: Optional[str] = None, - - - - -) -> Optional[Union[CodeOutput, Error]] : - - +) -> Optional[Union[CodeOutput, Error]]: return ( await asyncio_detailed( - lang=lang, - output=output, - body=body, - client=client, ) ).parsed diff --git a/kittycad/api/file/__init__.py b/kittycad/api/file/__init__.py index 84d2cc11f..794df28a7 100644 --- a/kittycad/api/file/__init__.py +++ b/kittycad/api/file/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the file API paths: CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models. """ # noqa: E501 +""" Contains methods for accessing the file API paths: CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models. """ # noqa: E501 diff --git a/kittycad/api/file/create_file_center_of_mass.py b/kittycad/api/file/create_file_center_of_mass.py index 3402ff256..4787ac691 100644 --- a/kittycad/api/file/create_file_center_of_mass.py +++ b/kittycad/api/file/create_file_center_of_mass.py @@ -11,50 +11,27 @@ def _get_kwargs( - - output_unit: UnitLength, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/file/center-of-mass".format(client.base_url, ) # noqa: E501 - - + url = "{}/file/center-of-mass".format( + client.base_url, + ) # noqa: E501 + if output_unit is not None: if "?" in url: url = url + "&output_unit=" + str(output_unit) else: url = url + "?output_unit=" + str(output_unit) - - - + if src_format is not None: if "?" in url: url = url + "&src_format=" + str(src_format) else: url = url + "?src_format=" + str(src_format) - - - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -68,23 +45,24 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[FileCenterOfMass, Error]] : - if response.status_code == 201: - response_201 = FileCenterOfMass.from_dict(response.json()) - return response_201 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[FileCenterOfMass, Error]]: + if response.status_code == 201: + response_201 = FileCenterOfMass.from_dict(response.json()) + return response_201 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[FileCenterOfMass, Error]]]: +) -> Response[Optional[Union[FileCenterOfMass, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -94,37 +72,16 @@ def _build_response( def sync_detailed( - - output_unit: UnitLength, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[FileCenterOfMass, Error]]]: +) -> Response[Optional[Union[FileCenterOfMass, Error]]]: kwargs = _get_kwargs( - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ) @@ -137,79 +94,38 @@ def sync_detailed( def sync( - - output_unit: UnitLength, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Optional[Union[FileCenterOfMass, Error]] : +) -> Optional[Union[FileCenterOfMass, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. -This endpoint returns the cartesian co-ordinate in world space measure units. -In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. -Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. -If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 + This endpoint returns the cartesian co-ordinate in world space measure units. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. + """ # noqa: E501 return sync_detailed( - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ).parsed async def asyncio_detailed( - - output_unit: UnitLength, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[FileCenterOfMass, Error]]]: +) -> Response[Optional[Union[FileCenterOfMass, Error]]]: kwargs = _get_kwargs( - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ) @@ -220,44 +136,24 @@ async def asyncio_detailed( async def asyncio( - - output_unit: UnitLength, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Optional[Union[FileCenterOfMass, Error]] : +) -> Optional[Union[FileCenterOfMass, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. -This endpoint returns the cartesian co-ordinate in world space measure units. -In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. -Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. -If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 + This endpoint returns the cartesian co-ordinate in world space measure units. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. + """ # noqa: E501 return ( await asyncio_detailed( - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ) ).parsed diff --git a/kittycad/api/file/create_file_conversion.py b/kittycad/api/file/create_file_conversion.py index 63ab1220c..ceb49f472 100644 --- a/kittycad/api/file/create_file_conversion.py +++ b/kittycad/api/file/create_file_conversion.py @@ -11,38 +11,17 @@ def _get_kwargs( - - output_format: FileExportFormat, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/file/conversion/{src_format}/{output_format}".format(client.base_url, output_format=output_format,src_format=src_format,) # noqa: E501 - - - - - - - - + url = "{}/file/conversion/{src_format}/{output_format}".format( + client.base_url, + output_format=output_format, + src_format=src_format, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -56,23 +35,24 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversion, Error]] : - if response.status_code == 201: - response_201 = FileConversion.from_dict(response.json()) - return response_201 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[FileConversion, Error]]: + if response.status_code == 201: + response_201 = FileConversion.from_dict(response.json()) + return response_201 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[FileConversion, Error]]]: +) -> Response[Optional[Union[FileConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -82,37 +62,16 @@ def _build_response( def sync_detailed( - - output_format: FileExportFormat, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[FileConversion, Error]]]: +) -> Response[Optional[Union[FileConversion, Error]]]: kwargs = _get_kwargs( - output_format=output_format, - src_format=src_format, - body=body, - client=client, ) @@ -125,78 +84,37 @@ def sync_detailed( def sync( - - output_format: FileExportFormat, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Optional[Union[FileConversion, Error]] : +) -> Optional[Union[FileConversion, Error]]: """If you wish to specify the conversion options, use the `/file/conversion` endpoint instead. -Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously. -If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string. -If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 + Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously. + If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string. + If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. + """ # noqa: E501 return sync_detailed( - output_format=output_format, - src_format=src_format, - body=body, - client=client, ).parsed async def asyncio_detailed( - - output_format: FileExportFormat, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[FileConversion, Error]]]: +) -> Response[Optional[Union[FileConversion, Error]]]: kwargs = _get_kwargs( - output_format=output_format, - src_format=src_format, - body=body, - client=client, ) @@ -207,43 +125,23 @@ async def asyncio_detailed( async def asyncio( - - output_format: FileExportFormat, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Optional[Union[FileConversion, Error]] : +) -> Optional[Union[FileConversion, Error]]: """If you wish to specify the conversion options, use the `/file/conversion` endpoint instead. -Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously. -If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string. -If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 + Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously. + If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string. + If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. + """ # noqa: E501 return ( await asyncio_detailed( - output_format=output_format, - src_format=src_format, - body=body, - client=client, ) ).parsed diff --git a/kittycad/api/file/create_file_density.py b/kittycad/api/file/create_file_density.py index 901ea0412..79e00a28a 100644 --- a/kittycad/api/file/create_file_density.py +++ b/kittycad/api/file/create_file_density.py @@ -12,78 +12,41 @@ def _get_kwargs( - - material_mass: float, - - - material_mass_unit: UnitMass, - - - output_unit: UnitDensity, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - - - - - ) -> Dict[str, Any]: - url = "{}/file/density".format(client.base_url, ) # noqa: E501 - - + url = "{}/file/density".format( + client.base_url, + ) # noqa: E501 + if material_mass is not None: if "?" in url: url = url + "&material_mass=" + str(material_mass) else: url = url + "?material_mass=" + str(material_mass) - - - + if material_mass_unit is not None: if "?" in url: url = url + "&material_mass_unit=" + str(material_mass_unit) else: url = url + "?material_mass_unit=" + str(material_mass_unit) - - - + if output_unit is not None: if "?" in url: url = url + "&output_unit=" + str(output_unit) else: url = url + "?output_unit=" + str(output_unit) - - - + if src_format is not None: if "?" in url: url = url + "&src_format=" + str(src_format) else: url = url + "?src_format=" + str(src_format) - - - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -97,23 +60,22 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[FileDensity, Error]] : - if response.status_code == 201: - response_201 = FileDensity.from_dict(response.json()) - return response_201 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[FileDensity, Error]]: + if response.status_code == 201: + response_201 = FileDensity.from_dict(response.json()) + return response_201 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[FileDensity, Error]]]: +) -> Response[Optional[Union[FileDensity, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -123,53 +85,20 @@ def _build_response( def sync_detailed( - - material_mass: float, - - - material_mass_unit: UnitMass, - - - output_unit: UnitDensity, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - - - - - -) -> Response[Optional[Union[FileDensity, Error]]]: +) -> Response[Optional[Union[FileDensity, Error]]]: kwargs = _get_kwargs( - material_mass=material_mass, - material_mass_unit=material_mass_unit, - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ) @@ -182,111 +111,46 @@ def sync_detailed( def sync( - - material_mass: float, - - - material_mass_unit: UnitMass, - - - output_unit: UnitDensity, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - - - - - -) -> Optional[Union[FileDensity, Error]] : +) -> Optional[Union[FileDensity, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. -This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. -In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. -Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. -If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 + This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. + """ # noqa: E501 return sync_detailed( - material_mass=material_mass, - material_mass_unit=material_mass_unit, - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ).parsed async def asyncio_detailed( - - material_mass: float, - - - material_mass_unit: UnitMass, - - - output_unit: UnitDensity, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - - - - - -) -> Response[Optional[Union[FileDensity, Error]]]: +) -> Response[Optional[Union[FileDensity, Error]]]: kwargs = _get_kwargs( - material_mass=material_mass, - material_mass_unit=material_mass_unit, - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ) @@ -297,60 +161,28 @@ async def asyncio_detailed( async def asyncio( - - material_mass: float, - - - material_mass_unit: UnitMass, - - - output_unit: UnitDensity, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - - - - - -) -> Optional[Union[FileDensity, Error]] : +) -> Optional[Union[FileDensity, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. -This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. -In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. -Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. -If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 + This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. + """ # noqa: E501 return ( await asyncio_detailed( - material_mass=material_mass, - material_mass_unit=material_mass_unit, - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ) ).parsed diff --git a/kittycad/api/file/create_file_mass.py b/kittycad/api/file/create_file_mass.py index 45479d4df..d251c676f 100644 --- a/kittycad/api/file/create_file_mass.py +++ b/kittycad/api/file/create_file_mass.py @@ -12,78 +12,41 @@ def _get_kwargs( - - material_density: float, - - - material_density_unit: UnitDensity, - - - output_unit: UnitMass, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - - - - - ) -> Dict[str, Any]: - url = "{}/file/mass".format(client.base_url, ) # noqa: E501 - - + url = "{}/file/mass".format( + client.base_url, + ) # noqa: E501 + if material_density is not None: if "?" in url: url = url + "&material_density=" + str(material_density) else: url = url + "?material_density=" + str(material_density) - - - + if material_density_unit is not None: if "?" in url: url = url + "&material_density_unit=" + str(material_density_unit) else: url = url + "?material_density_unit=" + str(material_density_unit) - - - + if output_unit is not None: if "?" in url: url = url + "&output_unit=" + str(output_unit) else: url = url + "?output_unit=" + str(output_unit) - - - + if src_format is not None: if "?" in url: url = url + "&src_format=" + str(src_format) else: url = url + "?src_format=" + str(src_format) - - - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -97,23 +60,22 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[FileMass, Error]] : - if response.status_code == 201: - response_201 = FileMass.from_dict(response.json()) - return response_201 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[FileMass, Error]]: + if response.status_code == 201: + response_201 = FileMass.from_dict(response.json()) + return response_201 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[FileMass, Error]]]: +) -> Response[Optional[Union[FileMass, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -123,53 +85,20 @@ def _build_response( def sync_detailed( - - material_density: float, - - - material_density_unit: UnitDensity, - - - output_unit: UnitMass, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - - - - - -) -> Response[Optional[Union[FileMass, Error]]]: +) -> Response[Optional[Union[FileMass, Error]]]: kwargs = _get_kwargs( - material_density=material_density, - material_density_unit=material_density_unit, - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ) @@ -182,111 +111,46 @@ def sync_detailed( def sync( - - material_density: float, - - - material_density_unit: UnitDensity, - - - output_unit: UnitMass, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - - - - - -) -> Optional[Union[FileMass, Error]] : +) -> Optional[Union[FileMass, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. -This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. -In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. -Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. -If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 + This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. + """ # noqa: E501 return sync_detailed( - material_density=material_density, - material_density_unit=material_density_unit, - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ).parsed async def asyncio_detailed( - - material_density: float, - - - material_density_unit: UnitDensity, - - - output_unit: UnitMass, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - - - - - -) -> Response[Optional[Union[FileMass, Error]]]: +) -> Response[Optional[Union[FileMass, Error]]]: kwargs = _get_kwargs( - material_density=material_density, - material_density_unit=material_density_unit, - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ) @@ -297,60 +161,28 @@ async def asyncio_detailed( async def asyncio( - - material_density: float, - - - material_density_unit: UnitDensity, - - - output_unit: UnitMass, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - - - - - -) -> Optional[Union[FileMass, Error]] : +) -> Optional[Union[FileMass, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. -This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. -In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. -Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. -If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 + This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. + """ # noqa: E501 return ( await asyncio_detailed( - material_density=material_density, - material_density_unit=material_density_unit, - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ) ).parsed diff --git a/kittycad/api/file/create_file_surface_area.py b/kittycad/api/file/create_file_surface_area.py index 1b0285b6c..2399901b8 100644 --- a/kittycad/api/file/create_file_surface_area.py +++ b/kittycad/api/file/create_file_surface_area.py @@ -11,50 +11,27 @@ def _get_kwargs( - - output_unit: UnitArea, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/file/surface-area".format(client.base_url, ) # noqa: E501 - - + url = "{}/file/surface-area".format( + client.base_url, + ) # noqa: E501 + if output_unit is not None: if "?" in url: url = url + "&output_unit=" + str(output_unit) else: url = url + "?output_unit=" + str(output_unit) - - - + if src_format is not None: if "?" in url: url = url + "&src_format=" + str(src_format) else: url = url + "?src_format=" + str(src_format) - - - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -68,23 +45,24 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[FileSurfaceArea, Error]] : - if response.status_code == 201: - response_201 = FileSurfaceArea.from_dict(response.json()) - return response_201 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[FileSurfaceArea, Error]]: + if response.status_code == 201: + response_201 = FileSurfaceArea.from_dict(response.json()) + return response_201 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[FileSurfaceArea, Error]]]: +) -> Response[Optional[Union[FileSurfaceArea, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -94,37 +72,16 @@ def _build_response( def sync_detailed( - - output_unit: UnitArea, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[FileSurfaceArea, Error]]]: +) -> Response[Optional[Union[FileSurfaceArea, Error]]]: kwargs = _get_kwargs( - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ) @@ -137,79 +94,38 @@ def sync_detailed( def sync( - - output_unit: UnitArea, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Optional[Union[FileSurfaceArea, Error]] : +) -> Optional[Union[FileSurfaceArea, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. -This endpoint returns the square measure units. -In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. -Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. -If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 + This endpoint returns the square measure units. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. + """ # noqa: E501 return sync_detailed( - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ).parsed async def asyncio_detailed( - - output_unit: UnitArea, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[FileSurfaceArea, Error]]]: +) -> Response[Optional[Union[FileSurfaceArea, Error]]]: kwargs = _get_kwargs( - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ) @@ -220,44 +136,24 @@ async def asyncio_detailed( async def asyncio( - - output_unit: UnitArea, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Optional[Union[FileSurfaceArea, Error]] : +) -> Optional[Union[FileSurfaceArea, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. -This endpoint returns the square measure units. -In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. -Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. -If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 + This endpoint returns the square measure units. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. + """ # noqa: E501 return ( await asyncio_detailed( - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ) ).parsed diff --git a/kittycad/api/file/create_file_volume.py b/kittycad/api/file/create_file_volume.py index d559f3faf..040c2f234 100644 --- a/kittycad/api/file/create_file_volume.py +++ b/kittycad/api/file/create_file_volume.py @@ -11,50 +11,27 @@ def _get_kwargs( - - output_unit: UnitVolume, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/file/volume".format(client.base_url, ) # noqa: E501 - - + url = "{}/file/volume".format( + client.base_url, + ) # noqa: E501 + if output_unit is not None: if "?" in url: url = url + "&output_unit=" + str(output_unit) else: url = url + "?output_unit=" + str(output_unit) - - - + if src_format is not None: if "?" in url: url = url + "&src_format=" + str(src_format) else: url = url + "?src_format=" + str(src_format) - - - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -68,23 +45,22 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[FileVolume, Error]] : - if response.status_code == 201: - response_201 = FileVolume.from_dict(response.json()) - return response_201 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[FileVolume, Error]]: + if response.status_code == 201: + response_201 = FileVolume.from_dict(response.json()) + return response_201 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[FileVolume, Error]]]: +) -> Response[Optional[Union[FileVolume, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -94,37 +70,16 @@ def _build_response( def sync_detailed( - - output_unit: UnitVolume, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[FileVolume, Error]]]: +) -> Response[Optional[Union[FileVolume, Error]]]: kwargs = _get_kwargs( - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ) @@ -137,79 +92,38 @@ def sync_detailed( def sync( - - output_unit: UnitVolume, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Optional[Union[FileVolume, Error]] : +) -> Optional[Union[FileVolume, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. -This endpoint returns the cubic measure units. -In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. -Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. -If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 + This endpoint returns the cubic measure units. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. + """ # noqa: E501 return sync_detailed( - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ).parsed async def asyncio_detailed( - - output_unit: UnitVolume, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[FileVolume, Error]]]: +) -> Response[Optional[Union[FileVolume, Error]]]: kwargs = _get_kwargs( - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ) @@ -220,44 +134,24 @@ async def asyncio_detailed( async def asyncio( - - output_unit: UnitVolume, - - - src_format: FileImportFormat, - - - body: bytes, - - *, client: Client, - - - - - - - -) -> Optional[Union[FileVolume, Error]] : +) -> Optional[Union[FileVolume, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. -This endpoint returns the cubic measure units. -In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. -Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. -If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 + This endpoint returns the cubic measure units. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. + """ # noqa: E501 return ( await asyncio_detailed( - output_unit=output_unit, - src_format=src_format, - body=body, - client=client, ) ).parsed diff --git a/kittycad/api/hidden/__init__.py b/kittycad/api/hidden/__init__.py index 7f6e82030..99e49766f 100644 --- a/kittycad/api/hidden/__init__.py +++ b/kittycad/api/hidden/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the hidden API paths: Hidden API endpoints that should not show up in the docs. """ # noqa: E501 +""" Contains methods for accessing the hidden API paths: Hidden API endpoints that should not show up in the docs. """ # noqa: E501 diff --git a/kittycad/api/hidden/auth_email.py b/kittycad/api/hidden/auth_email.py index d520b8e71..4487132a8 100644 --- a/kittycad/api/hidden/auth_email.py +++ b/kittycad/api/hidden/auth_email.py @@ -10,22 +10,13 @@ def _get_kwargs( - - body: EmailAuthenticationForm, - - *, client: Client, - - - ) -> Dict[str, Any]: - url = "{}/auth/email".format(client.base_url, ) # noqa: E501 - - - - + url = "{}/auth/email".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -39,23 +30,24 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[VerificationToken, Error]] : - if response.status_code == 201: - response_201 = VerificationToken.from_dict(response.json()) - return response_201 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[VerificationToken, Error]]: + if response.status_code == 201: + response_201 = VerificationToken.from_dict(response.json()) + return response_201 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[VerificationToken, Error]]]: +) -> Response[Optional[Union[VerificationToken, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -65,21 +57,12 @@ def _build_response( def sync_detailed( - - body: EmailAuthenticationForm, - - *, client: Client, - - - -) -> Response[Optional[Union[VerificationToken, Error]]]: +) -> Response[Optional[Union[VerificationToken, Error]]]: kwargs = _get_kwargs( - body=body, - client=client, ) @@ -92,43 +75,23 @@ def sync_detailed( def sync( - - body: EmailAuthenticationForm, - - *, client: Client, - - - -) -> Optional[Union[VerificationToken, Error]] : - - +) -> Optional[Union[VerificationToken, Error]]: return sync_detailed( - body=body, - client=client, ).parsed async def asyncio_detailed( - - body: EmailAuthenticationForm, - - *, client: Client, - - - -) -> Response[Optional[Union[VerificationToken, Error]]]: +) -> Response[Optional[Union[VerificationToken, Error]]]: kwargs = _get_kwargs( - body=body, - client=client, ) @@ -139,24 +102,13 @@ async def asyncio_detailed( async def asyncio( - - body: EmailAuthenticationForm, - - *, client: Client, - - - -) -> Optional[Union[VerificationToken, Error]] : - - +) -> Optional[Union[VerificationToken, Error]]: return ( await asyncio_detailed( - body=body, - client=client, ) ).parsed diff --git a/kittycad/api/hidden/auth_email_callback.py b/kittycad/api/hidden/auth_email_callback.py index 499bd0592..0a60803b6 100644 --- a/kittycad/api/hidden/auth_email_callback.py +++ b/kittycad/api/hidden/auth_email_callback.py @@ -8,56 +8,33 @@ def _get_kwargs( - - - - email: str, - - - token: str, - - *, client: Client, - - callback_url: Optional[str] = None, - - - - - - ) -> Dict[str, Any]: - url = "{}/auth/email/callback".format(client.base_url, ) # noqa: E501 - - + url = "{}/auth/email/callback".format( + client.base_url, + ) # noqa: E501 + if callback_url is not None: if "?" in url: url = url + "&callback_url=" + str(callback_url) else: url = url + "?callback_url=" + str(callback_url) - - - + if email is not None: if "?" in url: url = url + "&email=" + str(email) else: url = url + "?email=" + str(email) - - - + if token is not None: if "?" in url: url = url + "&token=" + str(token) else: url = url + "?token=" + str(token) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -67,25 +44,21 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Error] : - return None - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) +def _parse_response(*, response: httpx.Response) -> Optional[Error]: + return None + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) - -def _build_response( - *, response: httpx.Response -) -> Response[Optional[Error]]: +def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -95,37 +68,16 @@ def _build_response( def sync_detailed( - - - - email: str, - - - token: str, - - *, client: Client, - - callback_url: Optional[str] = None, - - - - - - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - callback_url=callback_url, - email=email, - token=token, - client=client, ) @@ -138,75 +90,31 @@ def sync_detailed( def sync( - - - - email: str, - - - token: str, - - *, client: Client, - - callback_url: Optional[str] = None, - - - - - - -) -> Optional[Error] : - - +) -> Optional[Error]: return sync_detailed( - callback_url=callback_url, - email=email, - token=token, - client=client, ).parsed async def asyncio_detailed( - - - - email: str, - - - token: str, - - *, client: Client, - - callback_url: Optional[str] = None, - - - - - - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - callback_url=callback_url, - email=email, - token=token, - client=client, ) @@ -217,40 +125,17 @@ async def asyncio_detailed( async def asyncio( - - - - email: str, - - - token: str, - - *, client: Client, - - callback_url: Optional[str] = None, - - - - - - -) -> Optional[Error] : - - +) -> Optional[Error]: return ( await asyncio_detailed( - callback_url=callback_url, - email=email, - token=token, - client=client, ) ).parsed diff --git a/kittycad/api/hidden/logout.py b/kittycad/api/hidden/logout.py index d1bac2f40..b8e3bbae9 100644 --- a/kittycad/api/hidden/logout.py +++ b/kittycad/api/hidden/logout.py @@ -8,14 +8,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/logout".format(client.base_url, ) # noqa: E501 - - + url = "{}/logout".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -25,25 +23,21 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Error] : - return None - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Error]: + return None + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) -def _build_response( - *, response: httpx.Response -) -> Response[Optional[Error]]: +def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -53,13 +47,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - client=client, ) @@ -72,27 +63,21 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Error] : +) -> Optional[Error]: """This is used in logout scenarios.""" # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - client=client, ) @@ -103,16 +88,13 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Error] : +) -> Optional[Error]: """This is used in logout scenarios.""" # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/meta/__init__.py b/kittycad/api/meta/__init__.py index 3787b335e..5e7351a95 100644 --- a/kittycad/api/meta/__init__.py +++ b/kittycad/api/meta/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the meta API paths: Meta information about the API. """ # noqa: E501 +""" Contains methods for accessing the meta API paths: Meta information about the API. """ # noqa: E501 diff --git a/kittycad/api/meta/get_ai_plugin_manifest.py b/kittycad/api/meta/get_ai_plugin_manifest.py index 57b3e685c..a7f6cf90b 100644 --- a/kittycad/api/meta/get_ai_plugin_manifest.py +++ b/kittycad/api/meta/get_ai_plugin_manifest.py @@ -9,14 +9,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/.well-known/ai-plugin.json".format(client.base_url, ) # noqa: E501 - - + url = "{}/.well-known/ai-plugin.json".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,27 +24,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[AiPluginManifest, Error]] : - if response.status_code == 200: - response_200 = AiPluginManifest.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[AiPluginManifest, Error]]: + if response.status_code == 200: + response_200 = AiPluginManifest.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[AiPluginManifest, Error]]]: +) -> Response[Optional[Union[AiPluginManifest, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -56,13 +54,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[AiPluginManifest, Error]]]: +) -> Response[Optional[Union[AiPluginManifest, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -75,27 +70,19 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[AiPluginManifest, Error]] : - - +) -> Optional[Union[AiPluginManifest, Error]]: return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[AiPluginManifest, Error]]]: +) -> Response[Optional[Union[AiPluginManifest, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -106,16 +93,11 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[AiPluginManifest, Error]] : - - +) -> Optional[Union[AiPluginManifest, Error]]: return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/meta/get_metadata.py b/kittycad/api/meta/get_metadata.py index 7e50c6405..8add017f6 100644 --- a/kittycad/api/meta/get_metadata.py +++ b/kittycad/api/meta/get_metadata.py @@ -9,14 +9,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/_meta/info".format(client.base_url, ) # noqa: E501 - - + url = "{}/_meta/info".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,27 +24,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Metadata, Error]] : - if response.status_code == 200: - response_200 = Metadata.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[Metadata, Error]]: + if response.status_code == 200: + response_200 = Metadata.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[Metadata, Error]]]: +) -> Response[Optional[Union[Metadata, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -56,13 +52,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[Metadata, Error]]]: +) -> Response[Optional[Union[Metadata, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -75,28 +68,22 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[Metadata, Error]] : +) -> Optional[Union[Metadata, Error]]: """This includes information on any of our other distributed systems it is connected to. -You must be a KittyCAD employee to perform this request.""" # noqa: E501 + You must be a KittyCAD employee to perform this request.""" # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[Metadata, Error]]]: +) -> Response[Optional[Union[Metadata, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -107,17 +94,14 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[Metadata, Error]] : +) -> Optional[Union[Metadata, Error]]: """This includes information on any of our other distributed systems it is connected to. -You must be a KittyCAD employee to perform this request.""" # noqa: E501 + You must be a KittyCAD employee to perform this request.""" # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/meta/get_openai_schema.py b/kittycad/api/meta/get_openai_schema.py index e0251d180..72a38e14c 100644 --- a/kittycad/api/meta/get_openai_schema.py +++ b/kittycad/api/meta/get_openai_schema.py @@ -8,14 +8,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/openai/openapi.json".format(client.base_url, ) # noqa: E501 - - + url = "{}/openai/openapi.json".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -25,27 +23,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]] : - if response.status_code == 200: - response_200 = response.json() - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]]: + if response.status_code == 200: + response_200 = response.json() + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[dict, Error]]]: +) -> Response[Optional[Union[dict, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -55,13 +51,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[dict, Error]]]: +) -> Response[Optional[Union[dict, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -74,27 +67,21 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[dict, Error]] : +) -> Optional[Union[dict, Error]]: """This is the same as the OpenAPI schema, BUT it has some modifications to make it compatible with OpenAI. For example, descriptions must be < 300 chars.""" # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[dict, Error]]]: +) -> Response[Optional[Union[dict, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -105,16 +92,13 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[dict, Error]] : +) -> Optional[Union[dict, Error]]: """This is the same as the OpenAPI schema, BUT it has some modifications to make it compatible with OpenAI. For example, descriptions must be < 300 chars.""" # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/meta/get_schema.py b/kittycad/api/meta/get_schema.py index a67137de9..7b9788435 100644 --- a/kittycad/api/meta/get_schema.py +++ b/kittycad/api/meta/get_schema.py @@ -8,14 +8,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/".format(client.base_url, ) # noqa: E501 - - + url = "{}/".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -25,27 +23,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]] : - if response.status_code == 200: - response_200 = response.json() - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]]: + if response.status_code == 200: + response_200 = response.json() + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[dict, Error]]]: +) -> Response[Optional[Union[dict, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -55,13 +51,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[dict, Error]]]: +) -> Response[Optional[Union[dict, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -74,27 +67,19 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[dict, Error]] : - - +) -> Optional[Union[dict, Error]]: return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[dict, Error]]]: +) -> Response[Optional[Union[dict, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -105,16 +90,11 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[dict, Error]] : - - +) -> Optional[Union[dict, Error]]: return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/meta/internal_get_api_token_for_discord_user.py b/kittycad/api/meta/internal_get_api_token_for_discord_user.py new file mode 100644 index 000000000..a7c8921f1 --- /dev/null +++ b/kittycad/api/meta/internal_get_api_token_for_discord_user.py @@ -0,0 +1,117 @@ +from typing import Any, Dict, Optional, Union + +import httpx + +from ...client import Client +from ...models.api_token import ApiToken +from ...models.error import Error +from ...types import Response + + +def _get_kwargs( + discord_id: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/internal/discord/api-token/{discord_id}".format( + client.base_url, + discord_id=discord_id, + ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]]: + if response.status_code == 200: + response_200 = ApiToken.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) + + +def _build_response( + *, response: httpx.Response +) -> Response[Optional[Union[ApiToken, Error]]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + discord_id: str, + *, + client: Client, +) -> Response[Optional[Union[ApiToken, Error]]]: + kwargs = _get_kwargs( + discord_id=discord_id, + client=client, + ) + + response = httpx.get( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + discord_id: str, + *, + client: Client, +) -> Optional[Union[ApiToken, Error]]: + """This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their KittyCAD Account via oauth2 for this to work. + You must be a KittyCAD employee to use this endpoint.""" # noqa: E501 + + return sync_detailed( + discord_id=discord_id, + client=client, + ).parsed + + +async def asyncio_detailed( + discord_id: str, + *, + client: Client, +) -> Response[Optional[Union[ApiToken, Error]]]: + kwargs = _get_kwargs( + discord_id=discord_id, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.get(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + discord_id: str, + *, + client: Client, +) -> Optional[Union[ApiToken, Error]]: + """This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their KittyCAD Account via oauth2 for this to work. + You must be a KittyCAD employee to use this endpoint.""" # noqa: E501 + + return ( + await asyncio_detailed( + discord_id=discord_id, + client=client, + ) + ).parsed diff --git a/kittycad/api/meta/ping.py b/kittycad/api/meta/ping.py index 4bb39726e..81c5a4d62 100644 --- a/kittycad/api/meta/ping.py +++ b/kittycad/api/meta/ping.py @@ -9,14 +9,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/ping".format(client.base_url, ) # noqa: E501 - - + url = "{}/ping".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,27 +24,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Pong, Error]] : - if response.status_code == 200: - response_200 = Pong.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[Pong, Error]]: + if response.status_code == 200: + response_200 = Pong.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[Pong, Error]]]: +) -> Response[Optional[Union[Pong, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -56,13 +52,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[Pong, Error]]]: +) -> Response[Optional[Union[Pong, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -75,27 +68,19 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[Pong, Error]] : - - +) -> Optional[Union[Pong, Error]]: return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[Pong, Error]]]: +) -> Response[Optional[Union[Pong, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -106,16 +91,11 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[Pong, Error]] : - - +) -> Optional[Union[Pong, Error]]: return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/modeling/__init__.py b/kittycad/api/modeling/__init__.py index f71ff6fd0..b4772b30f 100644 --- a/kittycad/api/modeling/__init__.py +++ b/kittycad/api/modeling/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the modeling API paths: Modeling API for updating your 3D files using the KittyCAD engine. """ # noqa: E501 +""" Contains methods for accessing the modeling API paths: Modeling API for updating your 3D files using the KittyCAD engine. """ # noqa: E501 diff --git a/kittycad/api/modeling/modeling_commands_ws.py b/kittycad/api/modeling/modeling_commands_ws.py index b422b011a..9f23e1b4e 100644 --- a/kittycad/api/modeling/modeling_commands_ws.py +++ b/kittycad/api/modeling/modeling_commands_ws.py @@ -9,92 +9,46 @@ def _get_kwargs( - - fps: int, - - - unlocked_framerate: bool, - - - video_res_height: int, - - - video_res_width: int, - - - webrtc: bool, - - - body: WebSocketRequest, - - *, client: Client, - - - - - - - - - - - - - ) -> Dict[str, Any]: - url = "{}/ws/modeling/commands".format(client.base_url) # noqa: E501 - - + url = "{}/ws/modeling/commands".format(client.base_url) # noqa: E501 + if fps is not None: if "?" in url: url = url + "&fps=" + str(fps) else: url = url + "?fps=" + str(fps) - - - + if unlocked_framerate is not None: if "?" in url: url = url + "&unlocked_framerate=" + str(unlocked_framerate) else: url = url + "?unlocked_framerate=" + str(unlocked_framerate) - - - + if video_res_height is not None: if "?" in url: url = url + "&video_res_height=" + str(video_res_height) else: url = url + "?video_res_height=" + str(video_res_height) - - - + if video_res_width is not None: if "?" in url: url = url + "&video_res_width=" + str(video_res_width) else: url = url + "?video_res_width=" + str(video_res_width) - - - + if webrtc is not None: if "?" in url: url = url + "&webrtc=" + str(webrtc) else: url = url + "?webrtc=" + str(webrtc) - - - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -109,136 +63,62 @@ def _get_kwargs( def sync( - - fps: int, - - - unlocked_framerate: bool, - - - video_res_height: int, - - - video_res_width: int, - - - webrtc: bool, - - - body: WebSocketRequest, - - *, client: Client, - - - - - - - - - - - - - ) -> ClientConnection: """Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.""" # noqa: E501 kwargs = _get_kwargs( - fps=fps, - unlocked_framerate=unlocked_framerate, - video_res_height=video_res_height, - video_res_width=video_res_width, - webrtc=webrtc, - body=body, - client=client, ) - with ws_connect(kwargs["url"].replace("https://", "wss://"), additional_headers=kwargs["headers"]) as websocket: - return websocket # type: ignore + with ws_connect( + kwargs["url"].replace("https://", "wss://"), + additional_headers=kwargs["headers"], + ) as websocket: + return websocket # type: ignore # Return an error if we got here. return Error(message="An error occurred while connecting to the websocket.") - async def asyncio( - - fps: int, - - - unlocked_framerate: bool, - - - video_res_height: int, - - - video_res_width: int, - - - webrtc: bool, - - - body: WebSocketRequest, - - *, client: Client, - - - - - - - - - - - - - ) -> WebSocketClientProtocol: """Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.""" # noqa: E501 kwargs = _get_kwargs( - fps=fps, - unlocked_framerate=unlocked_framerate, - video_res_height=video_res_height, - video_res_width=video_res_width, - webrtc=webrtc, - body=body, - client=client, ) - async with ws_connect_async(kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"]) as websocket: + async with ws_connect_async( + kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"] + ) as websocket: return websocket # Return an error if we got here. diff --git a/kittycad/api/oauth2/__init__.py b/kittycad/api/oauth2/__init__.py index b1cf06475..1e216c556 100644 --- a/kittycad/api/oauth2/__init__.py +++ b/kittycad/api/oauth2/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the oauth2 API paths: Endpoints that implement OAuth 2.0 grant flows. """ # noqa: E501 +""" Contains methods for accessing the oauth2 API paths: Endpoints that implement OAuth 2.0 grant flows. """ # noqa: E501 diff --git a/kittycad/api/payments/__init__.py b/kittycad/api/payments/__init__.py index 189680fd2..61da5c79f 100644 --- a/kittycad/api/payments/__init__.py +++ b/kittycad/api/payments/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the payments API paths: Operations around payments and billing. """ # noqa: E501 +""" Contains methods for accessing the payments API paths: Operations around payments and billing. """ # noqa: E501 diff --git a/kittycad/api/payments/create_payment_information_for_user.py b/kittycad/api/payments/create_payment_information_for_user.py index 6395eb16d..a29c97371 100644 --- a/kittycad/api/payments/create_payment_information_for_user.py +++ b/kittycad/api/payments/create_payment_information_for_user.py @@ -10,22 +10,13 @@ def _get_kwargs( - - body: BillingInfo, - - *, client: Client, - - - ) -> Dict[str, Any]: - url = "{}/user/payment".format(client.base_url, ) # noqa: E501 - - - - + url = "{}/user/payment".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -39,23 +30,22 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]] : - if response.status_code == 201: - response_201 = Customer.from_dict(response.json()) - return response_201 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]]: + if response.status_code == 201: + response_201 = Customer.from_dict(response.json()) + return response_201 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[Customer, Error]]]: +) -> Response[Optional[Union[Customer, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -65,21 +55,12 @@ def _build_response( def sync_detailed( - - body: BillingInfo, - - *, client: Client, - - - -) -> Response[Optional[Union[Customer, Error]]]: +) -> Response[Optional[Union[Customer, Error]]]: kwargs = _get_kwargs( - body=body, - client=client, ) @@ -92,44 +73,27 @@ def sync_detailed( def sync( - - body: BillingInfo, - - *, client: Client, - - - -) -> Optional[Union[Customer, Error]] : +) -> Optional[Union[Customer, Error]]: """This includes billing address, phone, and name. -This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user. + """ # noqa: E501 return sync_detailed( - body=body, - client=client, ).parsed async def asyncio_detailed( - - body: BillingInfo, - - *, client: Client, - - - -) -> Response[Optional[Union[Customer, Error]]]: +) -> Response[Optional[Union[Customer, Error]]]: kwargs = _get_kwargs( - body=body, - client=client, ) @@ -140,25 +104,17 @@ async def asyncio_detailed( async def asyncio( - - body: BillingInfo, - - *, client: Client, - - - -) -> Optional[Union[Customer, Error]] : +) -> Optional[Union[Customer, Error]]: """This includes billing address, phone, and name. -This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user. + """ # noqa: E501 return ( await asyncio_detailed( - body=body, - client=client, ) ).parsed diff --git a/kittycad/api/payments/create_payment_intent_for_user.py b/kittycad/api/payments/create_payment_intent_for_user.py index 520bfadf2..c212b22f1 100644 --- a/kittycad/api/payments/create_payment_intent_for_user.py +++ b/kittycad/api/payments/create_payment_intent_for_user.py @@ -9,14 +9,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/user/payment/intent".format(client.base_url, ) # noqa: E501 - - + url = "{}/user/payment/intent".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,27 +24,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[PaymentIntent, Error]] : - if response.status_code == 201: - response_201 = PaymentIntent.from_dict(response.json()) - return response_201 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[PaymentIntent, Error]]: + if response.status_code == 201: + response_201 = PaymentIntent.from_dict(response.json()) + return response_201 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[PaymentIntent, Error]]]: +) -> Response[Optional[Union[PaymentIntent, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -56,13 +54,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[PaymentIntent, Error]]]: +) -> Response[Optional[Union[PaymentIntent, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -75,27 +70,21 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[PaymentIntent, Error]] : +) -> Optional[Union[PaymentIntent, Error]]: """This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.""" # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[PaymentIntent, Error]]]: +) -> Response[Optional[Union[PaymentIntent, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -106,16 +95,13 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[PaymentIntent, Error]] : +) -> Optional[Union[PaymentIntent, Error]]: """This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/payments/delete_payment_information_for_user.py b/kittycad/api/payments/delete_payment_information_for_user.py index 5c716bfce..159f523a2 100644 --- a/kittycad/api/payments/delete_payment_information_for_user.py +++ b/kittycad/api/payments/delete_payment_information_for_user.py @@ -8,14 +8,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/user/payment".format(client.base_url, ) # noqa: E501 - - + url = "{}/user/payment".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -25,25 +23,21 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Error] : - return None - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Error]: + return None + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) -def _build_response( - *, response: httpx.Response -) -> Response[Optional[Error]]: +def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -53,13 +47,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - client=client, ) @@ -72,28 +63,23 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Error] : +) -> Optional[Error]: """This includes billing address, phone, and name. -This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user. + """ # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - client=client, ) @@ -104,17 +90,15 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Error] : +) -> Optional[Error]: """This includes billing address, phone, and name. -This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user. + """ # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/payments/delete_payment_method_for_user.py b/kittycad/api/payments/delete_payment_method_for_user.py index 2697434ce..52f69e264 100644 --- a/kittycad/api/payments/delete_payment_method_for_user.py +++ b/kittycad/api/payments/delete_payment_method_for_user.py @@ -8,22 +8,14 @@ def _get_kwargs( - - id: str, - - *, client: Client, - - - ) -> Dict[str, Any]: - url = "{}/user/payment/methods/{id}".format(client.base_url, id=id,) # noqa: E501 - - - - + url = "{}/user/payment/methods/{id}".format( + client.base_url, + id=id, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -33,25 +25,21 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Error] : - return None - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Error]: + return None + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) -def _build_response( - *, response: httpx.Response -) -> Response[Optional[Error]]: +def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -61,21 +49,12 @@ def _build_response( def sync_detailed( - - id: str, - - *, client: Client, - - - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - id=id, - client=client, ) @@ -88,43 +67,25 @@ def sync_detailed( def sync( - - id: str, - - *, client: Client, - - - -) -> Optional[Error] : +) -> Optional[Error]: """This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.""" # noqa: E501 return sync_detailed( - id=id, - client=client, ).parsed async def asyncio_detailed( - - id: str, - - *, client: Client, - - - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - id=id, - client=client, ) @@ -135,24 +96,15 @@ async def asyncio_detailed( async def asyncio( - - id: str, - - *, client: Client, - - - -) -> Optional[Error] : +) -> Optional[Error]: """This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( - id=id, - client=client, ) ).parsed diff --git a/kittycad/api/payments/get_payment_balance_for_user.py b/kittycad/api/payments/get_payment_balance_for_user.py index 5b9fda73c..4de88e376 100644 --- a/kittycad/api/payments/get_payment_balance_for_user.py +++ b/kittycad/api/payments/get_payment_balance_for_user.py @@ -9,14 +9,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/user/payment/balance".format(client.base_url, ) # noqa: E501 - - + url = "{}/user/payment/balance".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,27 +24,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[CustomerBalance, Error]] : - if response.status_code == 200: - response_200 = CustomerBalance.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[CustomerBalance, Error]]: + if response.status_code == 200: + response_200 = CustomerBalance.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[CustomerBalance, Error]]]: +) -> Response[Optional[Union[CustomerBalance, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -56,13 +54,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[CustomerBalance, Error]]]: +) -> Response[Optional[Union[CustomerBalance, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -75,27 +70,21 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[CustomerBalance, Error]] : +) -> Optional[Union[CustomerBalance, Error]]: """This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user.""" # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[CustomerBalance, Error]]]: +) -> Response[Optional[Union[CustomerBalance, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -106,16 +95,13 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[CustomerBalance, Error]] : +) -> Optional[Union[CustomerBalance, Error]]: """This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/payments/get_payment_information_for_user.py b/kittycad/api/payments/get_payment_information_for_user.py index c3ea85938..44f5692e5 100644 --- a/kittycad/api/payments/get_payment_information_for_user.py +++ b/kittycad/api/payments/get_payment_information_for_user.py @@ -9,14 +9,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/user/payment".format(client.base_url, ) # noqa: E501 - - + url = "{}/user/payment".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,27 +24,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]] : - if response.status_code == 200: - response_200 = Customer.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]]: + if response.status_code == 200: + response_200 = Customer.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[Customer, Error]]]: +) -> Response[Optional[Union[Customer, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -56,13 +52,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[Customer, Error]]]: +) -> Response[Optional[Union[Customer, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -75,28 +68,23 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[Customer, Error]] : +) -> Optional[Union[Customer, Error]]: """This includes billing address, phone, and name. -This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user. + """ # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[Customer, Error]]]: +) -> Response[Optional[Union[Customer, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -107,17 +95,15 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[Customer, Error]] : +) -> Optional[Union[Customer, Error]]: """This includes billing address, phone, and name. -This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user. + """ # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/payments/list_invoices_for_user.py b/kittycad/api/payments/list_invoices_for_user.py index 1e7558f19..2af14491d 100644 --- a/kittycad/api/payments/list_invoices_for_user.py +++ b/kittycad/api/payments/list_invoices_for_user.py @@ -9,14 +9,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/user/payment/invoices".format(client.base_url, ) # noqa: E501 - - + url = "{}/user/payment/invoices".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,30 +24,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[List[Invoice], Error]] : - if response.status_code == 200: - response_200 = [ - Invoice.from_dict(item) - for item in response.json() - ] - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[List[Invoice], Error]]: + if response.status_code == 200: + response_200 = [Invoice.from_dict(item) for item in response.json()] + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[List[Invoice], Error]]]: +) -> Response[Optional[Union[List[Invoice], Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -59,13 +54,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[List[Invoice], Error]]]: +) -> Response[Optional[Union[List[Invoice], Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -78,27 +70,21 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[List[Invoice], Error]] : +) -> Optional[Union[List[Invoice], Error]]: """This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.""" # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[List[Invoice], Error]]]: +) -> Response[Optional[Union[List[Invoice], Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -109,16 +95,13 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[List[Invoice], Error]] : +) -> Optional[Union[List[Invoice], Error]]: """This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/payments/list_payment_methods_for_user.py b/kittycad/api/payments/list_payment_methods_for_user.py index 37b0dd02b..f23fc4d9c 100644 --- a/kittycad/api/payments/list_payment_methods_for_user.py +++ b/kittycad/api/payments/list_payment_methods_for_user.py @@ -9,14 +9,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/user/payment/methods".format(client.base_url, ) # noqa: E501 - - + url = "{}/user/payment/methods".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,30 +24,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[List[PaymentMethod], Error]] : - if response.status_code == 200: - response_200 = [ - PaymentMethod.from_dict(item) - for item in response.json() - ] - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[List[PaymentMethod], Error]]: + if response.status_code == 200: + response_200 = [PaymentMethod.from_dict(item) for item in response.json()] + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[List[PaymentMethod], Error]]]: +) -> Response[Optional[Union[List[PaymentMethod], Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -59,13 +54,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[List[PaymentMethod], Error]]]: +) -> Response[Optional[Union[List[PaymentMethod], Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -78,27 +70,21 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[List[PaymentMethod], Error]] : +) -> Optional[Union[List[PaymentMethod], Error]]: """This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.""" # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[List[PaymentMethod], Error]]]: +) -> Response[Optional[Union[List[PaymentMethod], Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -109,16 +95,13 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[List[PaymentMethod], Error]] : +) -> Optional[Union[List[PaymentMethod], Error]]: """This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/payments/update_payment_information_for_user.py b/kittycad/api/payments/update_payment_information_for_user.py index 5b1546078..e4ab3a8c7 100644 --- a/kittycad/api/payments/update_payment_information_for_user.py +++ b/kittycad/api/payments/update_payment_information_for_user.py @@ -10,22 +10,13 @@ def _get_kwargs( - - body: BillingInfo, - - *, client: Client, - - - ) -> Dict[str, Any]: - url = "{}/user/payment".format(client.base_url, ) # noqa: E501 - - - - + url = "{}/user/payment".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -39,23 +30,22 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]] : - if response.status_code == 200: - response_200 = Customer.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]]: + if response.status_code == 200: + response_200 = Customer.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[Customer, Error]]]: +) -> Response[Optional[Union[Customer, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -65,21 +55,12 @@ def _build_response( def sync_detailed( - - body: BillingInfo, - - *, client: Client, - - - -) -> Response[Optional[Union[Customer, Error]]]: +) -> Response[Optional[Union[Customer, Error]]]: kwargs = _get_kwargs( - body=body, - client=client, ) @@ -92,44 +73,27 @@ def sync_detailed( def sync( - - body: BillingInfo, - - *, client: Client, - - - -) -> Optional[Union[Customer, Error]] : +) -> Optional[Union[Customer, Error]]: """This includes billing address, phone, and name. -This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user. + """ # noqa: E501 return sync_detailed( - body=body, - client=client, ).parsed async def asyncio_detailed( - - body: BillingInfo, - - *, client: Client, - - - -) -> Response[Optional[Union[Customer, Error]]]: +) -> Response[Optional[Union[Customer, Error]]]: kwargs = _get_kwargs( - body=body, - client=client, ) @@ -140,25 +104,17 @@ async def asyncio_detailed( async def asyncio( - - body: BillingInfo, - - *, client: Client, - - - -) -> Optional[Union[Customer, Error]] : +) -> Optional[Union[Customer, Error]]: """This includes billing address, phone, and name. -This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user. + """ # noqa: E501 return ( await asyncio_detailed( - body=body, - client=client, ) ).parsed diff --git a/kittycad/api/payments/validate_customer_tax_information_for_user.py b/kittycad/api/payments/validate_customer_tax_information_for_user.py index 258a9b041..fab999d0a 100644 --- a/kittycad/api/payments/validate_customer_tax_information_for_user.py +++ b/kittycad/api/payments/validate_customer_tax_information_for_user.py @@ -8,14 +8,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/user/payment/tax".format(client.base_url, ) # noqa: E501 - - + url = "{}/user/payment/tax".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -25,25 +23,21 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Error] : - return None - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Error]: + return None + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) -def _build_response( - *, response: httpx.Response -) -> Response[Optional[Error]]: +def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -53,13 +47,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - client=client, ) @@ -72,27 +63,21 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Error] : +) -> Optional[Error]: """This endpoint requires authentication by any KittyCAD user. It will return an error if the customer's information is not valid for automatic tax. Otherwise, it will return an empty successful response.""" # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - client=client, ) @@ -103,16 +88,13 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Error] : +) -> Optional[Error]: """This endpoint requires authentication by any KittyCAD user. It will return an error if the customer's information is not valid for automatic tax. Otherwise, it will return an empty successful response.""" # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/unit/__init__.py b/kittycad/api/unit/__init__.py index 606ed2d49..e6b3722c9 100644 --- a/kittycad/api/unit/__init__.py +++ b/kittycad/api/unit/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the unit API paths: Unit conversion operations. """ # noqa: E501 +""" Contains methods for accessing the unit API paths: Unit conversion operations. """ # noqa: E501 diff --git a/kittycad/api/unit/get_angle_unit_conversion.py b/kittycad/api/unit/get_angle_unit_conversion.py index 628c79837..08703bb66 100644 --- a/kittycad/api/unit/get_angle_unit_conversion.py +++ b/kittycad/api/unit/get_angle_unit_conversion.py @@ -10,44 +10,23 @@ def _get_kwargs( - - input_unit: UnitAngle, - - - output_unit: UnitAngle, - - - value: float, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/unit/conversion/angle/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 - - - - - - + url = "{}/unit/conversion/angle/{input_unit}/{output_unit}".format( + client.base_url, + input_unit=input_unit, + output_unit=output_unit, + ) # noqa: E501 + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -57,27 +36,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitAngleConversion, Error]] : - if response.status_code == 200: - response_200 = UnitAngleConversion.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[UnitAngleConversion, Error]]: + if response.status_code == 200: + response_200 = UnitAngleConversion.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[UnitAngleConversion, Error]]]: +) -> Response[Optional[Union[UnitAngleConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -87,37 +66,16 @@ def _build_response( def sync_detailed( - - input_unit: UnitAngle, - - - output_unit: UnitAngle, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitAngleConversion, Error]]]: +) -> Response[Optional[Union[UnitAngleConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -130,75 +88,33 @@ def sync_detailed( def sync( - - input_unit: UnitAngle, - - - output_unit: UnitAngle, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitAngleConversion, Error]] : +) -> Optional[Union[UnitAngleConversion, Error]]: """Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ).parsed async def asyncio_detailed( - - input_unit: UnitAngle, - - - output_unit: UnitAngle, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitAngleConversion, Error]]]: +) -> Response[Optional[Union[UnitAngleConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -209,40 +125,19 @@ async def asyncio_detailed( async def asyncio( - - input_unit: UnitAngle, - - - output_unit: UnitAngle, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitAngleConversion, Error]] : +) -> Optional[Union[UnitAngleConversion, Error]]: """Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) ).parsed diff --git a/kittycad/api/unit/get_area_unit_conversion.py b/kittycad/api/unit/get_area_unit_conversion.py index 9f97719ee..1ae8b2e43 100644 --- a/kittycad/api/unit/get_area_unit_conversion.py +++ b/kittycad/api/unit/get_area_unit_conversion.py @@ -10,44 +10,23 @@ def _get_kwargs( - - input_unit: UnitArea, - - - output_unit: UnitArea, - - - value: float, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/unit/conversion/area/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 - - - - - - + url = "{}/unit/conversion/area/{input_unit}/{output_unit}".format( + client.base_url, + input_unit=input_unit, + output_unit=output_unit, + ) # noqa: E501 + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -57,27 +36,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitAreaConversion, Error]] : - if response.status_code == 200: - response_200 = UnitAreaConversion.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[UnitAreaConversion, Error]]: + if response.status_code == 200: + response_200 = UnitAreaConversion.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[UnitAreaConversion, Error]]]: +) -> Response[Optional[Union[UnitAreaConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -87,37 +66,16 @@ def _build_response( def sync_detailed( - - input_unit: UnitArea, - - - output_unit: UnitArea, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitAreaConversion, Error]]]: +) -> Response[Optional[Union[UnitAreaConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -130,75 +88,33 @@ def sync_detailed( def sync( - - input_unit: UnitArea, - - - output_unit: UnitArea, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitAreaConversion, Error]] : +) -> Optional[Union[UnitAreaConversion, Error]]: """Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ).parsed async def asyncio_detailed( - - input_unit: UnitArea, - - - output_unit: UnitArea, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitAreaConversion, Error]]]: +) -> Response[Optional[Union[UnitAreaConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -209,40 +125,19 @@ async def asyncio_detailed( async def asyncio( - - input_unit: UnitArea, - - - output_unit: UnitArea, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitAreaConversion, Error]] : +) -> Optional[Union[UnitAreaConversion, Error]]: """Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) ).parsed diff --git a/kittycad/api/unit/get_current_unit_conversion.py b/kittycad/api/unit/get_current_unit_conversion.py index 96db2e892..f5fde0e2d 100644 --- a/kittycad/api/unit/get_current_unit_conversion.py +++ b/kittycad/api/unit/get_current_unit_conversion.py @@ -10,44 +10,23 @@ def _get_kwargs( - - input_unit: UnitCurrent, - - - output_unit: UnitCurrent, - - - value: float, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/unit/conversion/current/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 - - - - - - + url = "{}/unit/conversion/current/{input_unit}/{output_unit}".format( + client.base_url, + input_unit=input_unit, + output_unit=output_unit, + ) # noqa: E501 + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -57,27 +36,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitCurrentConversion, Error]] : - if response.status_code == 200: - response_200 = UnitCurrentConversion.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[UnitCurrentConversion, Error]]: + if response.status_code == 200: + response_200 = UnitCurrentConversion.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[UnitCurrentConversion, Error]]]: +) -> Response[Optional[Union[UnitCurrentConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -87,37 +66,16 @@ def _build_response( def sync_detailed( - - input_unit: UnitCurrent, - - - output_unit: UnitCurrent, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitCurrentConversion, Error]]]: +) -> Response[Optional[Union[UnitCurrentConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -130,75 +88,33 @@ def sync_detailed( def sync( - - input_unit: UnitCurrent, - - - output_unit: UnitCurrent, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitCurrentConversion, Error]] : +) -> Optional[Union[UnitCurrentConversion, Error]]: """Convert a current unit value to another current unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ).parsed async def asyncio_detailed( - - input_unit: UnitCurrent, - - - output_unit: UnitCurrent, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitCurrentConversion, Error]]]: +) -> Response[Optional[Union[UnitCurrentConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -209,40 +125,19 @@ async def asyncio_detailed( async def asyncio( - - input_unit: UnitCurrent, - - - output_unit: UnitCurrent, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitCurrentConversion, Error]] : +) -> Optional[Union[UnitCurrentConversion, Error]]: """Convert a current unit value to another current unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) ).parsed diff --git a/kittycad/api/unit/get_energy_unit_conversion.py b/kittycad/api/unit/get_energy_unit_conversion.py index aee279e9b..e64c61da2 100644 --- a/kittycad/api/unit/get_energy_unit_conversion.py +++ b/kittycad/api/unit/get_energy_unit_conversion.py @@ -10,44 +10,23 @@ def _get_kwargs( - - input_unit: UnitEnergy, - - - output_unit: UnitEnergy, - - - value: float, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/unit/conversion/energy/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 - - - - - - + url = "{}/unit/conversion/energy/{input_unit}/{output_unit}".format( + client.base_url, + input_unit=input_unit, + output_unit=output_unit, + ) # noqa: E501 + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -57,27 +36,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitEnergyConversion, Error]] : - if response.status_code == 200: - response_200 = UnitEnergyConversion.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[UnitEnergyConversion, Error]]: + if response.status_code == 200: + response_200 = UnitEnergyConversion.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[UnitEnergyConversion, Error]]]: +) -> Response[Optional[Union[UnitEnergyConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -87,37 +66,16 @@ def _build_response( def sync_detailed( - - input_unit: UnitEnergy, - - - output_unit: UnitEnergy, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitEnergyConversion, Error]]]: +) -> Response[Optional[Union[UnitEnergyConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -130,75 +88,33 @@ def sync_detailed( def sync( - - input_unit: UnitEnergy, - - - output_unit: UnitEnergy, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitEnergyConversion, Error]] : +) -> Optional[Union[UnitEnergyConversion, Error]]: """Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ).parsed async def asyncio_detailed( - - input_unit: UnitEnergy, - - - output_unit: UnitEnergy, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitEnergyConversion, Error]]]: +) -> Response[Optional[Union[UnitEnergyConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -209,40 +125,19 @@ async def asyncio_detailed( async def asyncio( - - input_unit: UnitEnergy, - - - output_unit: UnitEnergy, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitEnergyConversion, Error]] : +) -> Optional[Union[UnitEnergyConversion, Error]]: """Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) ).parsed diff --git a/kittycad/api/unit/get_force_unit_conversion.py b/kittycad/api/unit/get_force_unit_conversion.py index a57412418..1aa100ab0 100644 --- a/kittycad/api/unit/get_force_unit_conversion.py +++ b/kittycad/api/unit/get_force_unit_conversion.py @@ -10,44 +10,23 @@ def _get_kwargs( - - input_unit: UnitForce, - - - output_unit: UnitForce, - - - value: float, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/unit/conversion/force/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 - - - - - - + url = "{}/unit/conversion/force/{input_unit}/{output_unit}".format( + client.base_url, + input_unit=input_unit, + output_unit=output_unit, + ) # noqa: E501 + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -57,27 +36,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitForceConversion, Error]] : - if response.status_code == 200: - response_200 = UnitForceConversion.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[UnitForceConversion, Error]]: + if response.status_code == 200: + response_200 = UnitForceConversion.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[UnitForceConversion, Error]]]: +) -> Response[Optional[Union[UnitForceConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -87,37 +66,16 @@ def _build_response( def sync_detailed( - - input_unit: UnitForce, - - - output_unit: UnitForce, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitForceConversion, Error]]]: +) -> Response[Optional[Union[UnitForceConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -130,75 +88,33 @@ def sync_detailed( def sync( - - input_unit: UnitForce, - - - output_unit: UnitForce, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitForceConversion, Error]] : +) -> Optional[Union[UnitForceConversion, Error]]: """Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ).parsed async def asyncio_detailed( - - input_unit: UnitForce, - - - output_unit: UnitForce, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitForceConversion, Error]]]: +) -> Response[Optional[Union[UnitForceConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -209,40 +125,19 @@ async def asyncio_detailed( async def asyncio( - - input_unit: UnitForce, - - - output_unit: UnitForce, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitForceConversion, Error]] : +) -> Optional[Union[UnitForceConversion, Error]]: """Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) ).parsed diff --git a/kittycad/api/unit/get_frequency_unit_conversion.py b/kittycad/api/unit/get_frequency_unit_conversion.py index aa31fc7b5..9ffc58c91 100644 --- a/kittycad/api/unit/get_frequency_unit_conversion.py +++ b/kittycad/api/unit/get_frequency_unit_conversion.py @@ -10,44 +10,23 @@ def _get_kwargs( - - input_unit: UnitFrequency, - - - output_unit: UnitFrequency, - - - value: float, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/unit/conversion/frequency/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 - - - - - - + url = "{}/unit/conversion/frequency/{input_unit}/{output_unit}".format( + client.base_url, + input_unit=input_unit, + output_unit=output_unit, + ) # noqa: E501 + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -57,27 +36,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitFrequencyConversion, Error]] : - if response.status_code == 200: - response_200 = UnitFrequencyConversion.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[UnitFrequencyConversion, Error]]: + if response.status_code == 200: + response_200 = UnitFrequencyConversion.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]: +) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -87,37 +66,16 @@ def _build_response( def sync_detailed( - - input_unit: UnitFrequency, - - - output_unit: UnitFrequency, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]: +) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -130,75 +88,33 @@ def sync_detailed( def sync( - - input_unit: UnitFrequency, - - - output_unit: UnitFrequency, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitFrequencyConversion, Error]] : +) -> Optional[Union[UnitFrequencyConversion, Error]]: """Convert a frequency unit value to another frequency unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ).parsed async def asyncio_detailed( - - input_unit: UnitFrequency, - - - output_unit: UnitFrequency, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]: +) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -209,40 +125,19 @@ async def asyncio_detailed( async def asyncio( - - input_unit: UnitFrequency, - - - output_unit: UnitFrequency, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitFrequencyConversion, Error]] : +) -> Optional[Union[UnitFrequencyConversion, Error]]: """Convert a frequency unit value to another frequency unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) ).parsed diff --git a/kittycad/api/unit/get_length_unit_conversion.py b/kittycad/api/unit/get_length_unit_conversion.py index cf00e43bf..29ae76ce6 100644 --- a/kittycad/api/unit/get_length_unit_conversion.py +++ b/kittycad/api/unit/get_length_unit_conversion.py @@ -10,44 +10,23 @@ def _get_kwargs( - - input_unit: UnitLength, - - - output_unit: UnitLength, - - - value: float, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/unit/conversion/length/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 - - - - - - + url = "{}/unit/conversion/length/{input_unit}/{output_unit}".format( + client.base_url, + input_unit=input_unit, + output_unit=output_unit, + ) # noqa: E501 + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -57,27 +36,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitLengthConversion, Error]] : - if response.status_code == 200: - response_200 = UnitLengthConversion.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[UnitLengthConversion, Error]]: + if response.status_code == 200: + response_200 = UnitLengthConversion.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[UnitLengthConversion, Error]]]: +) -> Response[Optional[Union[UnitLengthConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -87,37 +66,16 @@ def _build_response( def sync_detailed( - - input_unit: UnitLength, - - - output_unit: UnitLength, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitLengthConversion, Error]]]: +) -> Response[Optional[Union[UnitLengthConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -130,75 +88,33 @@ def sync_detailed( def sync( - - input_unit: UnitLength, - - - output_unit: UnitLength, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitLengthConversion, Error]] : +) -> Optional[Union[UnitLengthConversion, Error]]: """Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ).parsed async def asyncio_detailed( - - input_unit: UnitLength, - - - output_unit: UnitLength, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitLengthConversion, Error]]]: +) -> Response[Optional[Union[UnitLengthConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -209,40 +125,19 @@ async def asyncio_detailed( async def asyncio( - - input_unit: UnitLength, - - - output_unit: UnitLength, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitLengthConversion, Error]] : +) -> Optional[Union[UnitLengthConversion, Error]]: """Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) ).parsed diff --git a/kittycad/api/unit/get_mass_unit_conversion.py b/kittycad/api/unit/get_mass_unit_conversion.py index 5c0641259..3f743ce73 100644 --- a/kittycad/api/unit/get_mass_unit_conversion.py +++ b/kittycad/api/unit/get_mass_unit_conversion.py @@ -10,44 +10,23 @@ def _get_kwargs( - - input_unit: UnitMass, - - - output_unit: UnitMass, - - - value: float, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/unit/conversion/mass/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 - - - - - - + url = "{}/unit/conversion/mass/{input_unit}/{output_unit}".format( + client.base_url, + input_unit=input_unit, + output_unit=output_unit, + ) # noqa: E501 + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -57,27 +36,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitMassConversion, Error]] : - if response.status_code == 200: - response_200 = UnitMassConversion.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[UnitMassConversion, Error]]: + if response.status_code == 200: + response_200 = UnitMassConversion.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[UnitMassConversion, Error]]]: +) -> Response[Optional[Union[UnitMassConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -87,37 +66,16 @@ def _build_response( def sync_detailed( - - input_unit: UnitMass, - - - output_unit: UnitMass, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitMassConversion, Error]]]: +) -> Response[Optional[Union[UnitMassConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -130,75 +88,33 @@ def sync_detailed( def sync( - - input_unit: UnitMass, - - - output_unit: UnitMass, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitMassConversion, Error]] : +) -> Optional[Union[UnitMassConversion, Error]]: """Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ).parsed async def asyncio_detailed( - - input_unit: UnitMass, - - - output_unit: UnitMass, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitMassConversion, Error]]]: +) -> Response[Optional[Union[UnitMassConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -209,40 +125,19 @@ async def asyncio_detailed( async def asyncio( - - input_unit: UnitMass, - - - output_unit: UnitMass, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitMassConversion, Error]] : +) -> Optional[Union[UnitMassConversion, Error]]: """Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) ).parsed diff --git a/kittycad/api/unit/get_power_unit_conversion.py b/kittycad/api/unit/get_power_unit_conversion.py index 9e2ebf912..f9c75f44d 100644 --- a/kittycad/api/unit/get_power_unit_conversion.py +++ b/kittycad/api/unit/get_power_unit_conversion.py @@ -10,44 +10,23 @@ def _get_kwargs( - - input_unit: UnitPower, - - - output_unit: UnitPower, - - - value: float, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/unit/conversion/power/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 - - - - - - + url = "{}/unit/conversion/power/{input_unit}/{output_unit}".format( + client.base_url, + input_unit=input_unit, + output_unit=output_unit, + ) # noqa: E501 + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -57,27 +36,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitPowerConversion, Error]] : - if response.status_code == 200: - response_200 = UnitPowerConversion.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[UnitPowerConversion, Error]]: + if response.status_code == 200: + response_200 = UnitPowerConversion.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[UnitPowerConversion, Error]]]: +) -> Response[Optional[Union[UnitPowerConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -87,37 +66,16 @@ def _build_response( def sync_detailed( - - input_unit: UnitPower, - - - output_unit: UnitPower, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitPowerConversion, Error]]]: +) -> Response[Optional[Union[UnitPowerConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -130,75 +88,33 @@ def sync_detailed( def sync( - - input_unit: UnitPower, - - - output_unit: UnitPower, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitPowerConversion, Error]] : +) -> Optional[Union[UnitPowerConversion, Error]]: """Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ).parsed async def asyncio_detailed( - - input_unit: UnitPower, - - - output_unit: UnitPower, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitPowerConversion, Error]]]: +) -> Response[Optional[Union[UnitPowerConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -209,40 +125,19 @@ async def asyncio_detailed( async def asyncio( - - input_unit: UnitPower, - - - output_unit: UnitPower, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitPowerConversion, Error]] : +) -> Optional[Union[UnitPowerConversion, Error]]: """Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) ).parsed diff --git a/kittycad/api/unit/get_pressure_unit_conversion.py b/kittycad/api/unit/get_pressure_unit_conversion.py index 02fdbd4e4..1eb6f25ad 100644 --- a/kittycad/api/unit/get_pressure_unit_conversion.py +++ b/kittycad/api/unit/get_pressure_unit_conversion.py @@ -10,44 +10,23 @@ def _get_kwargs( - - input_unit: UnitPressure, - - - output_unit: UnitPressure, - - - value: float, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/unit/conversion/pressure/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 - - - - - - + url = "{}/unit/conversion/pressure/{input_unit}/{output_unit}".format( + client.base_url, + input_unit=input_unit, + output_unit=output_unit, + ) # noqa: E501 + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -57,27 +36,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitPressureConversion, Error]] : - if response.status_code == 200: - response_200 = UnitPressureConversion.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[UnitPressureConversion, Error]]: + if response.status_code == 200: + response_200 = UnitPressureConversion.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[UnitPressureConversion, Error]]]: +) -> Response[Optional[Union[UnitPressureConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -87,37 +66,16 @@ def _build_response( def sync_detailed( - - input_unit: UnitPressure, - - - output_unit: UnitPressure, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitPressureConversion, Error]]]: +) -> Response[Optional[Union[UnitPressureConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -130,75 +88,33 @@ def sync_detailed( def sync( - - input_unit: UnitPressure, - - - output_unit: UnitPressure, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitPressureConversion, Error]] : +) -> Optional[Union[UnitPressureConversion, Error]]: """Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ).parsed async def asyncio_detailed( - - input_unit: UnitPressure, - - - output_unit: UnitPressure, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitPressureConversion, Error]]]: +) -> Response[Optional[Union[UnitPressureConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -209,40 +125,19 @@ async def asyncio_detailed( async def asyncio( - - input_unit: UnitPressure, - - - output_unit: UnitPressure, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitPressureConversion, Error]] : +) -> Optional[Union[UnitPressureConversion, Error]]: """Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) ).parsed diff --git a/kittycad/api/unit/get_temperature_unit_conversion.py b/kittycad/api/unit/get_temperature_unit_conversion.py index 1bbd70e62..8b22b53c7 100644 --- a/kittycad/api/unit/get_temperature_unit_conversion.py +++ b/kittycad/api/unit/get_temperature_unit_conversion.py @@ -10,44 +10,23 @@ def _get_kwargs( - - input_unit: UnitTemperature, - - - output_unit: UnitTemperature, - - - value: float, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/unit/conversion/temperature/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 - - - - - - + url = "{}/unit/conversion/temperature/{input_unit}/{output_unit}".format( + client.base_url, + input_unit=input_unit, + output_unit=output_unit, + ) # noqa: E501 + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -57,27 +36,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitTemperatureConversion, Error]] : - if response.status_code == 200: - response_200 = UnitTemperatureConversion.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[UnitTemperatureConversion, Error]]: + if response.status_code == 200: + response_200 = UnitTemperatureConversion.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]: +) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -87,37 +66,16 @@ def _build_response( def sync_detailed( - - input_unit: UnitTemperature, - - - output_unit: UnitTemperature, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]: +) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -130,75 +88,33 @@ def sync_detailed( def sync( - - input_unit: UnitTemperature, - - - output_unit: UnitTemperature, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitTemperatureConversion, Error]] : +) -> Optional[Union[UnitTemperatureConversion, Error]]: """Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ).parsed async def asyncio_detailed( - - input_unit: UnitTemperature, - - - output_unit: UnitTemperature, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]: +) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -209,40 +125,19 @@ async def asyncio_detailed( async def asyncio( - - input_unit: UnitTemperature, - - - output_unit: UnitTemperature, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitTemperatureConversion, Error]] : +) -> Optional[Union[UnitTemperatureConversion, Error]]: """Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) ).parsed diff --git a/kittycad/api/unit/get_torque_unit_conversion.py b/kittycad/api/unit/get_torque_unit_conversion.py index 30077e952..f0406e79e 100644 --- a/kittycad/api/unit/get_torque_unit_conversion.py +++ b/kittycad/api/unit/get_torque_unit_conversion.py @@ -10,44 +10,23 @@ def _get_kwargs( - - input_unit: UnitTorque, - - - output_unit: UnitTorque, - - - value: float, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/unit/conversion/torque/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 - - - - - - + url = "{}/unit/conversion/torque/{input_unit}/{output_unit}".format( + client.base_url, + input_unit=input_unit, + output_unit=output_unit, + ) # noqa: E501 + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -57,27 +36,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitTorqueConversion, Error]] : - if response.status_code == 200: - response_200 = UnitTorqueConversion.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[UnitTorqueConversion, Error]]: + if response.status_code == 200: + response_200 = UnitTorqueConversion.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[UnitTorqueConversion, Error]]]: +) -> Response[Optional[Union[UnitTorqueConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -87,37 +66,16 @@ def _build_response( def sync_detailed( - - input_unit: UnitTorque, - - - output_unit: UnitTorque, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitTorqueConversion, Error]]]: +) -> Response[Optional[Union[UnitTorqueConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -130,75 +88,33 @@ def sync_detailed( def sync( - - input_unit: UnitTorque, - - - output_unit: UnitTorque, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitTorqueConversion, Error]] : +) -> Optional[Union[UnitTorqueConversion, Error]]: """Convert a torque unit value to another torque unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ).parsed async def asyncio_detailed( - - input_unit: UnitTorque, - - - output_unit: UnitTorque, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitTorqueConversion, Error]]]: +) -> Response[Optional[Union[UnitTorqueConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -209,40 +125,19 @@ async def asyncio_detailed( async def asyncio( - - input_unit: UnitTorque, - - - output_unit: UnitTorque, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitTorqueConversion, Error]] : +) -> Optional[Union[UnitTorqueConversion, Error]]: """Convert a torque unit value to another torque unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) ).parsed diff --git a/kittycad/api/unit/get_volume_unit_conversion.py b/kittycad/api/unit/get_volume_unit_conversion.py index 2babc6499..8711169a5 100644 --- a/kittycad/api/unit/get_volume_unit_conversion.py +++ b/kittycad/api/unit/get_volume_unit_conversion.py @@ -10,44 +10,23 @@ def _get_kwargs( - - input_unit: UnitVolume, - - - output_unit: UnitVolume, - - - value: float, - - *, client: Client, - - - - - - - ) -> Dict[str, Any]: - url = "{}/unit/conversion/volume/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 - - - - - - + url = "{}/unit/conversion/volume/{input_unit}/{output_unit}".format( + client.base_url, + input_unit=input_unit, + output_unit=output_unit, + ) # noqa: E501 + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -57,27 +36,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[UnitVolumeConversion, Error]] : - if response.status_code == 200: - response_200 = UnitVolumeConversion.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[UnitVolumeConversion, Error]]: + if response.status_code == 200: + response_200 = UnitVolumeConversion.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[UnitVolumeConversion, Error]]]: +) -> Response[Optional[Union[UnitVolumeConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -87,37 +66,16 @@ def _build_response( def sync_detailed( - - input_unit: UnitVolume, - - - output_unit: UnitVolume, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitVolumeConversion, Error]]]: +) -> Response[Optional[Union[UnitVolumeConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -130,75 +88,33 @@ def sync_detailed( def sync( - - input_unit: UnitVolume, - - - output_unit: UnitVolume, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitVolumeConversion, Error]] : +) -> Optional[Union[UnitVolumeConversion, Error]]: """Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ).parsed async def asyncio_detailed( - - input_unit: UnitVolume, - - - output_unit: UnitVolume, - - - value: float, - - *, client: Client, - - - - - - - -) -> Response[Optional[Union[UnitVolumeConversion, Error]]]: +) -> Response[Optional[Union[UnitVolumeConversion, Error]]]: kwargs = _get_kwargs( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) @@ -209,40 +125,19 @@ async def asyncio_detailed( async def asyncio( - - input_unit: UnitVolume, - - - output_unit: UnitVolume, - - - value: float, - - *, client: Client, - - - - - - - -) -> Optional[Union[UnitVolumeConversion, Error]] : +) -> Optional[Union[UnitVolumeConversion, Error]]: """Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( - input_unit=input_unit, - output_unit=output_unit, - value=value, - client=client, ) ).parsed diff --git a/kittycad/api/users/__init__.py b/kittycad/api/users/__init__.py index a3c3d8d06..c26e25d42 100644 --- a/kittycad/api/users/__init__.py +++ b/kittycad/api/users/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the users API paths: A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves. """ # noqa: E501 +""" Contains methods for accessing the users API paths: A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves. """ # noqa: E501 diff --git a/kittycad/api/users/delete_user_self.py b/kittycad/api/users/delete_user_self.py index bc2e9ce92..836b59333 100644 --- a/kittycad/api/users/delete_user_self.py +++ b/kittycad/api/users/delete_user_self.py @@ -8,14 +8,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/user".format(client.base_url, ) # noqa: E501 - - + url = "{}/user".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -25,25 +23,21 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Error] : - return None - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Error]: + return None + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) -def _build_response( - *, response: httpx.Response -) -> Response[Optional[Error]]: +def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -53,13 +47,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - client=client, ) @@ -72,28 +63,23 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Error] : +) -> Optional[Error]: """This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database. -This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.""" # noqa: E501 + This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance. + """ # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Error]]: +) -> Response[Optional[Error]]: kwargs = _get_kwargs( - client=client, ) @@ -104,17 +90,15 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Error] : +) -> Optional[Error]: """This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database. -This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.""" # noqa: E501 + This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance. + """ # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/users/get_session_for_user.py b/kittycad/api/users/get_session_for_user.py index dd2a70bf3..629a31ad7 100644 --- a/kittycad/api/users/get_session_for_user.py +++ b/kittycad/api/users/get_session_for_user.py @@ -9,22 +9,14 @@ def _get_kwargs( - - token: str, - - *, client: Client, - - - ) -> Dict[str, Any]: - url = "{}/user/session/{token}".format(client.base_url, token=token,) # noqa: E501 - - - - + url = "{}/user/session/{token}".format( + client.base_url, + token=token, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -34,27 +26,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Session, Error]] : - if response.status_code == 200: - response_200 = Session.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[Session, Error]]: + if response.status_code == 200: + response_200 = Session.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[Session, Error]]]: +) -> Response[Optional[Union[Session, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -64,21 +54,12 @@ def _build_response( def sync_detailed( - - token: str, - - *, client: Client, - - - -) -> Response[Optional[Union[Session, Error]]]: +) -> Response[Optional[Union[Session, Error]]]: kwargs = _get_kwargs( - token=token, - client=client, ) @@ -91,43 +72,25 @@ def sync_detailed( def sync( - - token: str, - - *, client: Client, - - - -) -> Optional[Union[Session, Error]] : +) -> Optional[Union[Session, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501 return sync_detailed( - token=token, - client=client, ).parsed async def asyncio_detailed( - - token: str, - - *, client: Client, - - - -) -> Response[Optional[Union[Session, Error]]]: +) -> Response[Optional[Union[Session, Error]]]: kwargs = _get_kwargs( - token=token, - client=client, ) @@ -138,24 +101,15 @@ async def asyncio_detailed( async def asyncio( - - token: str, - - *, client: Client, - - - -) -> Optional[Union[Session, Error]] : +) -> Optional[Union[Session, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501 return ( await asyncio_detailed( - token=token, - client=client, ) ).parsed diff --git a/kittycad/api/users/get_user.py b/kittycad/api/users/get_user.py index bda3a36e0..0497b7252 100644 --- a/kittycad/api/users/get_user.py +++ b/kittycad/api/users/get_user.py @@ -9,22 +9,14 @@ def _get_kwargs( - - id: str, - - *, client: Client, - - - ) -> Dict[str, Any]: - url = "{}/users/{id}".format(client.base_url, id=id,) # noqa: E501 - - - - + url = "{}/users/{id}".format( + client.base_url, + id=id, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -34,27 +26,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]] : - if response.status_code == 200: - response_200 = User.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]]: + if response.status_code == 200: + response_200 = User.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[User, Error]]]: +) -> Response[Optional[Union[User, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -64,21 +54,12 @@ def _build_response( def sync_detailed( - - id: str, - - *, client: Client, - - - -) -> Response[Optional[Union[User, Error]]]: +) -> Response[Optional[Union[User, Error]]]: kwargs = _get_kwargs( - id=id, - client=client, ) @@ -91,45 +72,27 @@ def sync_detailed( def sync( - - id: str, - - *, client: Client, - - - -) -> Optional[Union[User, Error]] : +) -> Optional[Union[User, Error]]: """To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user. -Alternatively, to get information about the authenticated user, use `/user` endpoint. -To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 + Alternatively, to get information about the authenticated user, use `/user` endpoint. + To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 return sync_detailed( - id=id, - client=client, ).parsed async def asyncio_detailed( - - id: str, - - *, client: Client, - - - -) -> Response[Optional[Union[User, Error]]]: +) -> Response[Optional[Union[User, Error]]]: kwargs = _get_kwargs( - id=id, - client=client, ) @@ -140,26 +103,17 @@ async def asyncio_detailed( async def asyncio( - - id: str, - - *, client: Client, - - - -) -> Optional[Union[User, Error]] : +) -> Optional[Union[User, Error]]: """To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user. -Alternatively, to get information about the authenticated user, use `/user` endpoint. -To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 + Alternatively, to get information about the authenticated user, use `/user` endpoint. + To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 return ( await asyncio_detailed( - id=id, - client=client, ) ).parsed diff --git a/kittycad/api/users/get_user_extended.py b/kittycad/api/users/get_user_extended.py index a39a07f7f..44ce69869 100644 --- a/kittycad/api/users/get_user_extended.py +++ b/kittycad/api/users/get_user_extended.py @@ -9,22 +9,14 @@ def _get_kwargs( - - id: str, - - *, client: Client, - - - ) -> Dict[str, Any]: - url = "{}/users-extended/{id}".format(client.base_url, id=id,) # noqa: E501 - - - - + url = "{}/users-extended/{id}".format( + client.base_url, + id=id, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -34,27 +26,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[ExtendedUser, Error]] : - if response.status_code == 200: - response_200 = ExtendedUser.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[ExtendedUser, Error]]: + if response.status_code == 200: + response_200 = ExtendedUser.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[ExtendedUser, Error]]]: +) -> Response[Optional[Union[ExtendedUser, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -64,21 +56,12 @@ def _build_response( def sync_detailed( - - id: str, - - *, client: Client, - - - -) -> Response[Optional[Union[ExtendedUser, Error]]]: +) -> Response[Optional[Union[ExtendedUser, Error]]]: kwargs = _get_kwargs( - id=id, - client=client, ) @@ -91,45 +74,27 @@ def sync_detailed( def sync( - - id: str, - - *, client: Client, - - - -) -> Optional[Union[ExtendedUser, Error]] : +) -> Optional[Union[ExtendedUser, Error]]: """To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user. -Alternatively, to get information about the authenticated user, use `/user/extended` endpoint. -To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 + Alternatively, to get information about the authenticated user, use `/user/extended` endpoint. + To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 return sync_detailed( - id=id, - client=client, ).parsed async def asyncio_detailed( - - id: str, - - *, client: Client, - - - -) -> Response[Optional[Union[ExtendedUser, Error]]]: +) -> Response[Optional[Union[ExtendedUser, Error]]]: kwargs = _get_kwargs( - id=id, - client=client, ) @@ -140,26 +105,17 @@ async def asyncio_detailed( async def asyncio( - - id: str, - - *, client: Client, - - - -) -> Optional[Union[ExtendedUser, Error]] : +) -> Optional[Union[ExtendedUser, Error]]: """To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user. -Alternatively, to get information about the authenticated user, use `/user/extended` endpoint. -To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 + Alternatively, to get information about the authenticated user, use `/user/extended` endpoint. + To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 return ( await asyncio_detailed( - id=id, - client=client, ) ).parsed diff --git a/kittycad/api/users/get_user_front_hash_self.py b/kittycad/api/users/get_user_front_hash_self.py index 5548e33d3..e2eda71e4 100644 --- a/kittycad/api/users/get_user_front_hash_self.py +++ b/kittycad/api/users/get_user_front_hash_self.py @@ -8,14 +8,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/user/front-hash".format(client.base_url, ) # noqa: E501 - - + url = "{}/user/front-hash".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -25,27 +23,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[str, Error]] : - if response.status_code == 200: - response_200 = response.text - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[str, Error]]: + if response.status_code == 200: + response_200 = response.text + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[str, Error]]]: +) -> Response[Optional[Union[str, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -55,13 +51,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[str, Error]]]: +) -> Response[Optional[Union[str, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -74,27 +67,21 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[str, Error]] : +) -> Optional[Union[str, Error]]: """This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser""" # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[str, Error]]]: +) -> Response[Optional[Union[str, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -105,16 +92,13 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[str, Error]] : +) -> Optional[Union[str, Error]]: """This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser""" # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/users/get_user_onboarding_self.py b/kittycad/api/users/get_user_onboarding_self.py index e89435e16..db56949b6 100644 --- a/kittycad/api/users/get_user_onboarding_self.py +++ b/kittycad/api/users/get_user_onboarding_self.py @@ -9,14 +9,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/user/onboarding".format(client.base_url, ) # noqa: E501 - - + url = "{}/user/onboarding".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,27 +24,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Onboarding, Error]] : - if response.status_code == 200: - response_200 = Onboarding.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[Onboarding, Error]]: + if response.status_code == 200: + response_200 = Onboarding.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[Onboarding, Error]]]: +) -> Response[Optional[Union[Onboarding, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -56,13 +52,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[Onboarding, Error]]]: +) -> Response[Optional[Union[Onboarding, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -75,27 +68,21 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[Onboarding, Error]] : +) -> Optional[Union[Onboarding, Error]]: """Checks key part of their api usage to determine their onboarding progress""" # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[Onboarding, Error]]]: +) -> Response[Optional[Union[Onboarding, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -106,16 +93,13 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[Onboarding, Error]] : +) -> Optional[Union[Onboarding, Error]]: """Checks key part of their api usage to determine their onboarding progress""" # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/users/get_user_self.py b/kittycad/api/users/get_user_self.py index 02c730e94..b7c58c9cf 100644 --- a/kittycad/api/users/get_user_self.py +++ b/kittycad/api/users/get_user_self.py @@ -9,14 +9,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/user".format(client.base_url, ) # noqa: E501 - - + url = "{}/user".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,27 +24,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]] : - if response.status_code == 200: - response_200 = User.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]]: + if response.status_code == 200: + response_200 = User.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[User, Error]]]: +) -> Response[Optional[Union[User, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -56,13 +52,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[User, Error]]]: +) -> Response[Optional[Union[User, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -75,28 +68,22 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[User, Error]] : +) -> Optional[Union[User, Error]]: """Get the user information for the authenticated user. -Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501 + Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[User, Error]]]: +) -> Response[Optional[Union[User, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -107,17 +94,14 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[User, Error]] : +) -> Optional[Union[User, Error]]: """Get the user information for the authenticated user. -Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501 + Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/users/get_user_self_extended.py b/kittycad/api/users/get_user_self_extended.py index 949d1fd8e..5d663247b 100644 --- a/kittycad/api/users/get_user_self_extended.py +++ b/kittycad/api/users/get_user_self_extended.py @@ -9,14 +9,12 @@ def _get_kwargs( - *, client: Client, - ) -> Dict[str, Any]: - url = "{}/user/extended".format(client.base_url, ) # noqa: E501 - - + url = "{}/user/extended".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,27 +24,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[ExtendedUser, Error]] : - if response.status_code == 200: - response_200 = ExtendedUser.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[ExtendedUser, Error]]: + if response.status_code == 200: + response_200 = ExtendedUser.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[ExtendedUser, Error]]]: +) -> Response[Optional[Union[ExtendedUser, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -56,13 +54,10 @@ def _build_response( def sync_detailed( - *, client: Client, - -) -> Response[Optional[Union[ExtendedUser, Error]]]: +) -> Response[Optional[Union[ExtendedUser, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -75,28 +70,22 @@ def sync_detailed( def sync( - *, client: Client, - -) -> Optional[Union[ExtendedUser, Error]] : +) -> Optional[Union[ExtendedUser, Error]]: """Get the user information for the authenticated user. -Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501 + Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501 return sync_detailed( - client=client, ).parsed async def asyncio_detailed( - *, client: Client, - -) -> Response[Optional[Union[ExtendedUser, Error]]]: +) -> Response[Optional[Union[ExtendedUser, Error]]]: kwargs = _get_kwargs( - client=client, ) @@ -107,17 +96,14 @@ async def asyncio_detailed( async def asyncio( - *, client: Client, - -) -> Optional[Union[ExtendedUser, Error]] : +) -> Optional[Union[ExtendedUser, Error]]: """Get the user information for the authenticated user. -Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501 + Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501 return ( await asyncio_detailed( - client=client, ) ).parsed diff --git a/kittycad/api/users/list_users.py b/kittycad/api/users/list_users.py index 9180e56a5..4da2aab96 100644 --- a/kittycad/api/users/list_users.py +++ b/kittycad/api/users/list_users.py @@ -10,56 +10,33 @@ def _get_kwargs( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - ) -> Dict[str, Any]: - url = "{}/users".format(client.base_url, ) # noqa: E501 - - + url = "{}/users".format( + client.base_url, + ) # noqa: E501 + if limit is not None: if "?" in url: url = url + "&limit=" + str(limit) else: url = url + "?limit=" + str(limit) - - - + if page_token is not None: if "?" in url: url = url + "&page_token=" + str(page_token) else: url = url + "?page_token=" + str(page_token) - - - + if sort_by is not None: if "?" in url: url = url + "&sort_by=" + str(sort_by) else: url = url + "?sort_by=" + str(sort_by) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -69,27 +46,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[UserResultsPage, Error]] : - if response.status_code == 200: - response_200 = UserResultsPage.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[UserResultsPage, Error]]: + if response.status_code == 200: + response_200 = UserResultsPage.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[UserResultsPage, Error]]]: +) -> Response[Optional[Union[UserResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -99,37 +76,16 @@ def _build_response( def sync_detailed( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Response[Optional[Union[UserResultsPage, Error]]]: +) -> Response[Optional[Union[UserResultsPage, Error]]]: kwargs = _get_kwargs( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) @@ -142,75 +98,33 @@ def sync_detailed( def sync( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Optional[Union[UserResultsPage, Error]] : +) -> Optional[Union[UserResultsPage, Error]]: """This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501 return sync_detailed( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ).parsed async def asyncio_detailed( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Response[Optional[Union[UserResultsPage, Error]]]: +) -> Response[Optional[Union[UserResultsPage, Error]]]: kwargs = _get_kwargs( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) @@ -221,40 +135,19 @@ async def asyncio_detailed( async def asyncio( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Optional[Union[UserResultsPage, Error]] : +) -> Optional[Union[UserResultsPage, Error]]: """This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501 return ( await asyncio_detailed( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) ).parsed diff --git a/kittycad/api/users/list_users_extended.py b/kittycad/api/users/list_users_extended.py index 490429ede..05043587e 100644 --- a/kittycad/api/users/list_users_extended.py +++ b/kittycad/api/users/list_users_extended.py @@ -10,56 +10,33 @@ def _get_kwargs( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - ) -> Dict[str, Any]: - url = "{}/users-extended".format(client.base_url, ) # noqa: E501 - - + url = "{}/users-extended".format( + client.base_url, + ) # noqa: E501 + if limit is not None: if "?" in url: url = url + "&limit=" + str(limit) else: url = url + "?limit=" + str(limit) - - - + if page_token is not None: if "?" in url: url = url + "&page_token=" + str(page_token) else: url = url + "?page_token=" + str(page_token) - - - + if sort_by is not None: if "?" in url: url = url + "&sort_by=" + str(sort_by) else: url = url + "?sort_by=" + str(sort_by) - - - headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -69,27 +46,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - } -def _parse_response(*, response: httpx.Response) -> Optional[Union[ExtendedUserResultsPage, Error]] : - if response.status_code == 200: - response_200 = ExtendedUserResultsPage.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[ExtendedUserResultsPage, Error]]: + if response.status_code == 200: + response_200 = ExtendedUserResultsPage.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]: +) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -99,37 +76,16 @@ def _build_response( def sync_detailed( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]: +) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]: kwargs = _get_kwargs( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) @@ -142,75 +98,33 @@ def sync_detailed( def sync( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Optional[Union[ExtendedUserResultsPage, Error]] : +) -> Optional[Union[ExtendedUserResultsPage, Error]]: """This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501 return sync_detailed( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ).parsed async def asyncio_detailed( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]: +) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]: kwargs = _get_kwargs( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) @@ -221,40 +135,19 @@ async def asyncio_detailed( async def asyncio( - - - - - - sort_by: CreatedAtSortMode, - - *, client: Client, - - limit: Optional[int] = None, - - - page_token: Optional[str] = None, - - - - -) -> Optional[Union[ExtendedUserResultsPage, Error]] : +) -> Optional[Union[ExtendedUserResultsPage, Error]]: """This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501 return ( await asyncio_detailed( - limit=limit, - page_token=page_token, - sort_by=sort_by, - client=client, ) ).parsed diff --git a/kittycad/api/users/update_user_self.py b/kittycad/api/users/update_user_self.py index 4e556ee28..8bf2ef538 100644 --- a/kittycad/api/users/update_user_self.py +++ b/kittycad/api/users/update_user_self.py @@ -10,22 +10,13 @@ def _get_kwargs( - - body: UpdateUser, - - *, client: Client, - - - ) -> Dict[str, Any]: - url = "{}/user".format(client.base_url, ) # noqa: E501 - - - - + url = "{}/user".format( + client.base_url, + ) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -39,23 +30,22 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]] : - if response.status_code == 200: - response_200 = User.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - +def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]]: + if response.status_code == 200: + response_200 = User.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[User, Error]]]: +) -> Response[Optional[Union[User, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -65,21 +55,12 @@ def _build_response( def sync_detailed( - - body: UpdateUser, - - *, client: Client, - - - -) -> Response[Optional[Union[User, Error]]]: +) -> Response[Optional[Union[User, Error]]]: kwargs = _get_kwargs( - body=body, - client=client, ) @@ -92,43 +73,25 @@ def sync_detailed( def sync( - - body: UpdateUser, - - *, client: Client, - - - -) -> Optional[Union[User, Error]] : +) -> Optional[Union[User, Error]]: """This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.""" # noqa: E501 return sync_detailed( - body=body, - client=client, ).parsed async def asyncio_detailed( - - body: UpdateUser, - - *, client: Client, - - - -) -> Response[Optional[Union[User, Error]]]: +) -> Response[Optional[Union[User, Error]]]: kwargs = _get_kwargs( - body=body, - client=client, ) @@ -139,24 +102,15 @@ async def asyncio_detailed( async def asyncio( - - body: UpdateUser, - - *, client: Client, - - - -) -> Optional[Union[User, Error]] : +) -> Optional[Union[User, Error]]: """This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( - body=body, - client=client, ) ).parsed diff --git a/kittycad/examples_test.py b/kittycad/examples_test.py index 201bed190..8f92edfe0 100644 --- a/kittycad/examples_test.py +++ b/kittycad/examples_test.py @@ -5,6 +5,9 @@ from kittycad.api.ai import ( create_text_to_cad, create_text_to_cad_model_feedback, + get_ai_prompt, + get_text_to_cad_model_for_user, + list_ai_prompts, list_text_to_cad_models_for_user, ) from kittycad.api.api_calls import ( @@ -43,6 +46,7 @@ get_metadata, get_openai_schema, get_schema, + internal_get_api_token_for_discord_user, ping, ) from kittycad.api.modeling import modeling_commands_ws @@ -89,6 +93,8 @@ from kittycad.client import ClientFromEnv from kittycad.models import ( AiPluginManifest, + AiPrompt, + AiPromptResultsPage, ApiCallQueryGroup, ApiCallWithPrice, ApiCallWithPriceResultsPage, @@ -283,6 +289,106 @@ async def test_get_metadata_async(): ) +@pytest.mark.skip +def test_list_ai_prompts(): + # Create our client. + client = ClientFromEnv() + + result: Optional[Union[AiPromptResultsPage, Error]] = list_ai_prompts.sync( + client=client, + sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING, + limit=None, # Optional[int] + page_token=None, # Optional[str] + ) + + if isinstance(result, Error) or result is None: + print(result) + raise Exception("Error in response") + + body: AiPromptResultsPage = result + print(body) + + # OR if you need more info (e.g. status_code) + response: Response[ + Optional[Union[AiPromptResultsPage, Error]] + ] = list_ai_prompts.sync_detailed( + client=client, + sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING, + limit=None, # Optional[int] + page_token=None, # Optional[str] + ) + + +# OR run async +@pytest.mark.asyncio +@pytest.mark.skip +async def test_list_ai_prompts_async(): + # Create our client. + client = ClientFromEnv() + + result: Optional[Union[AiPromptResultsPage, Error]] = await list_ai_prompts.asyncio( + client=client, + sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING, + limit=None, # Optional[int] + page_token=None, # Optional[str] + ) + + # OR run async with more info + response: Response[ + Optional[Union[AiPromptResultsPage, Error]] + ] = await list_ai_prompts.asyncio_detailed( + client=client, + sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING, + limit=None, # Optional[int] + page_token=None, # Optional[str] + ) + + +@pytest.mark.skip +def test_get_ai_prompt(): + # Create our client. + client = ClientFromEnv() + + result: Optional[Union[AiPrompt, Error]] = get_ai_prompt.sync( + client=client, + id="", + ) + + if isinstance(result, Error) or result is None: + print(result) + raise Exception("Error in response") + + body: AiPrompt = result + print(body) + + # OR if you need more info (e.g. status_code) + response: Response[Optional[Union[AiPrompt, Error]]] = get_ai_prompt.sync_detailed( + client=client, + id="", + ) + + +# OR run async +@pytest.mark.asyncio +@pytest.mark.skip +async def test_get_ai_prompt_async(): + # Create our client. + client = ClientFromEnv() + + result: Optional[Union[AiPrompt, Error]] = await get_ai_prompt.asyncio( + client=client, + id="", + ) + + # OR run async with more info + response: Response[ + Optional[Union[AiPrompt, Error]] + ] = await get_ai_prompt.asyncio_detailed( + client=client, + id="", + ) + + @pytest.mark.skip def test_create_text_to_cad(): # Create our client. @@ -1295,6 +1401,57 @@ async def test_create_file_volume_async(): ) +@pytest.mark.skip +def test_internal_get_api_token_for_discord_user(): + # Create our client. + client = ClientFromEnv() + + result: Optional[ + Union[ApiToken, Error] + ] = internal_get_api_token_for_discord_user.sync( + client=client, + discord_id="", + ) + + if isinstance(result, Error) or result is None: + print(result) + raise Exception("Error in response") + + body: ApiToken = result + print(body) + + # OR if you need more info (e.g. status_code) + response: Response[ + Optional[Union[ApiToken, Error]] + ] = internal_get_api_token_for_discord_user.sync_detailed( + client=client, + discord_id="", + ) + + +# OR run async +@pytest.mark.asyncio +@pytest.mark.skip +async def test_internal_get_api_token_for_discord_user_async(): + # Create our client. + client = ClientFromEnv() + + result: Optional[ + Union[ApiToken, Error] + ] = await internal_get_api_token_for_discord_user.asyncio( + client=client, + discord_id="", + ) + + # OR run async with more info + response: Response[ + Optional[Union[ApiToken, Error]] + ] = await internal_get_api_token_for_discord_user.asyncio_detailed( + client=client, + discord_id="", + ) + + @pytest.mark.skip def test_logout(): # Create our client. @@ -3325,6 +3482,55 @@ async def test_list_text_to_cad_models_for_user_async(): ) +@pytest.mark.skip +def test_get_text_to_cad_model_for_user(): + # Create our client. + client = ClientFromEnv() + + result: Optional[Union[TextToCad, Error]] = get_text_to_cad_model_for_user.sync( + client=client, + id="", + ) + + if isinstance(result, Error) or result is None: + print(result) + raise Exception("Error in response") + + body: TextToCad = result + print(body) + + # OR if you need more info (e.g. status_code) + response: Response[ + Optional[Union[TextToCad, Error]] + ] = get_text_to_cad_model_for_user.sync_detailed( + client=client, + id="", + ) + + +# OR run async +@pytest.mark.asyncio +@pytest.mark.skip +async def test_get_text_to_cad_model_for_user_async(): + # Create our client. + client = ClientFromEnv() + + result: Optional[ + Union[TextToCad, Error] + ] = await get_text_to_cad_model_for_user.asyncio( + client=client, + id="", + ) + + # OR run async with more info + response: Response[ + Optional[Union[TextToCad, Error]] + ] = await get_text_to_cad_model_for_user.asyncio_detailed( + client=client, + id="", + ) + + @pytest.mark.skip def test_create_text_to_cad_model_feedback(): # Create our client. diff --git a/kittycad/models/__init__.py b/kittycad/models/__init__.py index c303a736f..d7fc28c18 100644 --- a/kittycad/models/__init__.py +++ b/kittycad/models/__init__.py @@ -8,6 +8,9 @@ from .ai_plugin_auth_type import AiPluginAuthType from .ai_plugin_http_auth_type import AiPluginHttpAuthType from .ai_plugin_manifest import AiPluginManifest +from .ai_prompt import AiPrompt +from .ai_prompt_results_page import AiPromptResultsPage +from .ai_prompt_type import AiPromptType from .angle import Angle from .annotation_line_end import AnnotationLineEnd from .annotation_line_end_options import AnnotationLineEndOptions @@ -142,6 +145,7 @@ from .scene_tool_type import SceneToolType from .select_get import SelectGet from .select_with_point import SelectWithPoint +from .selection import Selection from .session import Session from .solid3d_get_all_edge_faces import Solid3dGetAllEdgeFaces from .solid3d_get_all_opposite_edges import Solid3dGetAllOppositeEdges @@ -187,6 +191,7 @@ from .user import User from .user_results_page import UserResultsPage from .uuid import Uuid +from .uuid_binary import UuidBinary from .verification_token import VerificationToken from .volume import Volume from .web_socket_request import WebSocketRequest diff --git a/kittycad/models/account_provider.py b/kittycad/models/account_provider.py index 6221c2f1a..0a31c45e0 100644 --- a/kittycad/models/account_provider.py +++ b/kittycad/models/account_provider.py @@ -2,11 +2,14 @@ class AccountProvider(str, Enum): - """ An account provider. """ # noqa: E501 - """# The Google account provider. """ # noqa: E501 - GOOGLE = 'google' - """# The GitHub account provider. """ # noqa: E501 - GITHUB = 'github' - - def __str__(self) -> str: - return str(self.value) + """An account provider.""" # noqa: E501 + + """# The Discord account provider. """ # noqa: E501 + DISCORD = "discord" + """# The Google account provider. """ # noqa: E501 + GOOGLE = "google" + """# The GitHub account provider. """ # noqa: E501 + GITHUB = "github" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/ai_feedback.py b/kittycad/models/ai_feedback.py index 4bee93337..03769bdce 100644 --- a/kittycad/models/ai_feedback.py +++ b/kittycad/models/ai_feedback.py @@ -2,11 +2,12 @@ class AiFeedback(str, Enum): - """ Human feedback on an AI response. """ # noqa: E501 - """# Thumbs up. """ # noqa: E501 - THUMBS_UP = 'thumbs_up' - """# Thumbs down. """ # noqa: E501 - THUMBS_DOWN = 'thumbs_down' - - def __str__(self) -> str: - return str(self.value) + """Human feedback on an AI response.""" # noqa: E501 + + """# Thumbs up. """ # noqa: E501 + THUMBS_UP = "thumbs_up" + """# Thumbs down. """ # noqa: E501 + THUMBS_DOWN = "thumbs_down" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/ai_plugin_api.py b/kittycad/models/ai_plugin_api.py index ddd3babb0..e5d2c2e0e 100644 --- a/kittycad/models/ai_plugin_api.py +++ b/kittycad/models/ai_plugin_api.py @@ -7,69 +7,70 @@ SB = TypeVar("SB", bound="AiPluginApi") + @attr.s(auto_attribs=True) class AiPluginApi: - """ AI plugin api information. """ # noqa: E501 - is_user_authenticated: Union[Unset, bool] = False - type: Union[Unset, AiPluginApiType] = UNSET - url: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - is_user_authenticated = self.is_user_authenticated - if not isinstance(self.type, Unset): - type = self.type - url = self.url - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if is_user_authenticated is not UNSET: - field_dict['is_user_authenticated'] = is_user_authenticated - if type is not UNSET: - field_dict['type'] = type - if url is not UNSET: - field_dict['url'] = url - - return field_dict - - @classmethod - def from_dict(cls: Type[SB], src_dict: Dict[str, Any]) -> SB: - d = src_dict.copy() - is_user_authenticated = d.pop("is_user_authenticated", UNSET) - - _type = d.pop("type", UNSET) - type: Union[Unset, AiPluginApiType] - if isinstance(_type, Unset): - type = UNSET - else: - type = _type # type: ignore[arg-type] - - url = d.pop("url", UNSET) - - - ai_plugin_api = cls( - is_user_authenticated= is_user_authenticated, - type= type, - url= url, - ) - - ai_plugin_api.additional_properties = d - return ai_plugin_api - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """AI plugin api information.""" # noqa: E501 + + is_user_authenticated: Union[Unset, bool] = False + type: Union[Unset, AiPluginApiType] = UNSET + url: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + is_user_authenticated = self.is_user_authenticated + if not isinstance(self.type, Unset): + type = self.type + url = self.url + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if is_user_authenticated is not UNSET: + field_dict["is_user_authenticated"] = is_user_authenticated + if type is not UNSET: + field_dict["type"] = type + if url is not UNSET: + field_dict["url"] = url + + return field_dict + + @classmethod + def from_dict(cls: Type[SB], src_dict: Dict[str, Any]) -> SB: + d = src_dict.copy() + is_user_authenticated = d.pop("is_user_authenticated", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, AiPluginApiType] + if isinstance(_type, Unset): + type = UNSET + else: + type = _type # type: ignore[arg-type] + + url = d.pop("url", UNSET) + + ai_plugin_api = cls( + is_user_authenticated=is_user_authenticated, + type=type, + url=url, + ) + + ai_plugin_api.additional_properties = d + return ai_plugin_api + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/ai_plugin_api_type.py b/kittycad/models/ai_plugin_api_type.py index 691d57db5..c058bfcf2 100644 --- a/kittycad/models/ai_plugin_api_type.py +++ b/kittycad/models/ai_plugin_api_type.py @@ -2,9 +2,10 @@ class AiPluginApiType(str, Enum): - """ AI plugin api type. """ # noqa: E501 - """# An OpenAPI specification. """ # noqa: E501 - OPENAPI = 'openapi' + """AI plugin api type.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# An OpenAPI specification. """ # noqa: E501 + OPENAPI = "openapi" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/ai_plugin_auth.py b/kittycad/models/ai_plugin_auth.py index 41ebc6a3e..022281367 100644 --- a/kittycad/models/ai_plugin_auth.py +++ b/kittycad/models/ai_plugin_auth.py @@ -8,68 +8,69 @@ NP = TypeVar("NP", bound="AiPluginAuth") + @attr.s(auto_attribs=True) class AiPluginAuth: - """ AI plugin auth information. """ # noqa: E501 - authorization_type: Union[Unset, AiPluginHttpAuthType] = UNSET - type: Union[Unset, AiPluginAuthType] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.authorization_type, Unset): - authorization_type = self.authorization_type - if not isinstance(self.type, Unset): - type = self.type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if authorization_type is not UNSET: - field_dict['authorization_type'] = authorization_type - if type is not UNSET: - field_dict['type'] = type - - return field_dict - - @classmethod - def from_dict(cls: Type[NP], src_dict: Dict[str, Any]) -> NP: - d = src_dict.copy() - _authorization_type = d.pop("authorization_type", UNSET) - authorization_type: Union[Unset, AiPluginHttpAuthType] - if isinstance(_authorization_type, Unset): - authorization_type = UNSET - else: - authorization_type = _authorization_type # type: ignore[arg-type] - - _type = d.pop("type", UNSET) - type: Union[Unset, AiPluginAuthType] - if isinstance(_type, Unset): - type = UNSET - else: - type = _type # type: ignore[arg-type] - - - ai_plugin_auth = cls( - authorization_type= authorization_type, - type= type, - ) - - ai_plugin_auth.additional_properties = d - return ai_plugin_auth - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """AI plugin auth information.""" # noqa: E501 + + authorization_type: Union[Unset, AiPluginHttpAuthType] = UNSET + type: Union[Unset, AiPluginAuthType] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.authorization_type, Unset): + authorization_type = self.authorization_type + if not isinstance(self.type, Unset): + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if authorization_type is not UNSET: + field_dict["authorization_type"] = authorization_type + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[NP], src_dict: Dict[str, Any]) -> NP: + d = src_dict.copy() + _authorization_type = d.pop("authorization_type", UNSET) + authorization_type: Union[Unset, AiPluginHttpAuthType] + if isinstance(_authorization_type, Unset): + authorization_type = UNSET + else: + authorization_type = _authorization_type # type: ignore[arg-type] + + _type = d.pop("type", UNSET) + type: Union[Unset, AiPluginAuthType] + if isinstance(_type, Unset): + type = UNSET + else: + type = _type # type: ignore[arg-type] + + ai_plugin_auth = cls( + authorization_type=authorization_type, + type=type, + ) + + ai_plugin_auth.additional_properties = d + return ai_plugin_auth + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/ai_plugin_auth_type.py b/kittycad/models/ai_plugin_auth_type.py index 3bfa7aa6d..72764a86d 100644 --- a/kittycad/models/ai_plugin_auth_type.py +++ b/kittycad/models/ai_plugin_auth_type.py @@ -2,15 +2,16 @@ class AiPluginAuthType(str, Enum): - """ AI plugin auth type. """ # noqa: E501 - """# None. """ # noqa: E501 - NONE = 'none' - """# User http. """ # noqa: E501 - USER_HTTP = 'user_http' - """# Service http. """ # noqa: E501 - SERVICE_HTTP = 'service_http' - """# OAuth. """ # noqa: E501 - OAUTH = 'oauth' + """AI plugin auth type.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# None. """ # noqa: E501 + NONE = "none" + """# User http. """ # noqa: E501 + USER_HTTP = "user_http" + """# Service http. """ # noqa: E501 + SERVICE_HTTP = "service_http" + """# OAuth. """ # noqa: E501 + OAUTH = "oauth" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/ai_plugin_http_auth_type.py b/kittycad/models/ai_plugin_http_auth_type.py index 911ab36a0..879ce8b0e 100644 --- a/kittycad/models/ai_plugin_http_auth_type.py +++ b/kittycad/models/ai_plugin_http_auth_type.py @@ -2,11 +2,12 @@ class AiPluginHttpAuthType(str, Enum): - """ AI plugin http auth type. """ # noqa: E501 - """# Basic. """ # noqa: E501 - BASIC = 'basic' - """# Bearer. """ # noqa: E501 - BEARER = 'bearer' - - def __str__(self) -> str: - return str(self.value) + """AI plugin http auth type.""" # noqa: E501 + + """# Basic. """ # noqa: E501 + BASIC = "basic" + """# Bearer. """ # noqa: E501 + BEARER = "bearer" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/ai_plugin_manifest.py b/kittycad/models/ai_plugin_manifest.py index 549634a91..b59b1ca30 100644 --- a/kittycad/models/ai_plugin_manifest.py +++ b/kittycad/models/ai_plugin_manifest.py @@ -8,126 +8,128 @@ SA = TypeVar("SA", bound="AiPluginManifest") + @attr.s(auto_attribs=True) class AiPluginManifest: - """ AI plugin manifest. - -This is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest). """ # noqa: E501 - api: Union[Unset, AiPluginApi] = UNSET - auth: Union[Unset, AiPluginAuth] = UNSET - contact_email: Union[Unset, str] = UNSET - description_for_human: Union[Unset, str] = UNSET - description_for_model: Union[Unset, str] = UNSET - legal_info_url: Union[Unset, str] = UNSET - logo_url: Union[Unset, str] = UNSET - name_for_human: Union[Unset, str] = UNSET - name_for_model: Union[Unset, str] = UNSET - schema_version: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.api, Unset): - api = self.api - if not isinstance(self.auth, Unset): - auth = self.auth - contact_email = self.contact_email - description_for_human = self.description_for_human - description_for_model = self.description_for_model - legal_info_url = self.legal_info_url - logo_url = self.logo_url - name_for_human = self.name_for_human - name_for_model = self.name_for_model - schema_version = self.schema_version - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if api is not UNSET: - field_dict['api'] = api - if auth is not UNSET: - field_dict['auth'] = auth - if contact_email is not UNSET: - field_dict['contact_email'] = contact_email - if description_for_human is not UNSET: - field_dict['description_for_human'] = description_for_human - if description_for_model is not UNSET: - field_dict['description_for_model'] = description_for_model - if legal_info_url is not UNSET: - field_dict['legal_info_url'] = legal_info_url - if logo_url is not UNSET: - field_dict['logo_url'] = logo_url - if name_for_human is not UNSET: - field_dict['name_for_human'] = name_for_human - if name_for_model is not UNSET: - field_dict['name_for_model'] = name_for_model - if schema_version is not UNSET: - field_dict['schema_version'] = schema_version - - return field_dict - - @classmethod - def from_dict(cls: Type[SA], src_dict: Dict[str, Any]) -> SA: - d = src_dict.copy() - _api = d.pop("api", UNSET) - api: Union[Unset, AiPluginApi] - if isinstance(_api, Unset): - api = UNSET - else: - api = _api # type: ignore[arg-type] - - _auth = d.pop("auth", UNSET) - auth: Union[Unset, AiPluginAuth] - if isinstance(_auth, Unset): - auth = UNSET - else: - auth = _auth # type: ignore[arg-type] - - contact_email = d.pop("contact_email", UNSET) - - description_for_human = d.pop("description_for_human", UNSET) - - description_for_model = d.pop("description_for_model", UNSET) - - legal_info_url = d.pop("legal_info_url", UNSET) - - logo_url = d.pop("logo_url", UNSET) - - name_for_human = d.pop("name_for_human", UNSET) - - name_for_model = d.pop("name_for_model", UNSET) - - schema_version = d.pop("schema_version", UNSET) - - - ai_plugin_manifest = cls( - api= api, - auth= auth, - contact_email= contact_email, - description_for_human= description_for_human, - description_for_model= description_for_model, - legal_info_url= legal_info_url, - logo_url= logo_url, - name_for_human= name_for_human, - name_for_model= name_for_model, - schema_version= schema_version, - ) - - ai_plugin_manifest.additional_properties = d - return ai_plugin_manifest - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """AI plugin manifest. + + This is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest). + """ # noqa: E501 + + api: Union[Unset, AiPluginApi] = UNSET + auth: Union[Unset, AiPluginAuth] = UNSET + contact_email: Union[Unset, str] = UNSET + description_for_human: Union[Unset, str] = UNSET + description_for_model: Union[Unset, str] = UNSET + legal_info_url: Union[Unset, str] = UNSET + logo_url: Union[Unset, str] = UNSET + name_for_human: Union[Unset, str] = UNSET + name_for_model: Union[Unset, str] = UNSET + schema_version: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.api, Unset): + api = self.api + if not isinstance(self.auth, Unset): + auth = self.auth + contact_email = self.contact_email + description_for_human = self.description_for_human + description_for_model = self.description_for_model + legal_info_url = self.legal_info_url + logo_url = self.logo_url + name_for_human = self.name_for_human + name_for_model = self.name_for_model + schema_version = self.schema_version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if api is not UNSET: + field_dict["api"] = api + if auth is not UNSET: + field_dict["auth"] = auth + if contact_email is not UNSET: + field_dict["contact_email"] = contact_email + if description_for_human is not UNSET: + field_dict["description_for_human"] = description_for_human + if description_for_model is not UNSET: + field_dict["description_for_model"] = description_for_model + if legal_info_url is not UNSET: + field_dict["legal_info_url"] = legal_info_url + if logo_url is not UNSET: + field_dict["logo_url"] = logo_url + if name_for_human is not UNSET: + field_dict["name_for_human"] = name_for_human + if name_for_model is not UNSET: + field_dict["name_for_model"] = name_for_model + if schema_version is not UNSET: + field_dict["schema_version"] = schema_version + + return field_dict + + @classmethod + def from_dict(cls: Type[SA], src_dict: Dict[str, Any]) -> SA: + d = src_dict.copy() + _api = d.pop("api", UNSET) + api: Union[Unset, AiPluginApi] + if isinstance(_api, Unset): + api = UNSET + else: + api = _api # type: ignore[arg-type] + + _auth = d.pop("auth", UNSET) + auth: Union[Unset, AiPluginAuth] + if isinstance(_auth, Unset): + auth = UNSET + else: + auth = _auth # type: ignore[arg-type] + + contact_email = d.pop("contact_email", UNSET) + + description_for_human = d.pop("description_for_human", UNSET) + + description_for_model = d.pop("description_for_model", UNSET) + + legal_info_url = d.pop("legal_info_url", UNSET) + + logo_url = d.pop("logo_url", UNSET) + + name_for_human = d.pop("name_for_human", UNSET) + + name_for_model = d.pop("name_for_model", UNSET) + + schema_version = d.pop("schema_version", UNSET) + + ai_plugin_manifest = cls( + api=api, + auth=auth, + contact_email=contact_email, + description_for_human=description_for_human, + description_for_model=description_for_model, + legal_info_url=legal_info_url, + logo_url=logo_url, + name_for_human=name_for_human, + name_for_model=name_for_model, + schema_version=schema_version, + ) + + ai_plugin_manifest.additional_properties = d + return ai_plugin_manifest + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/ai_prompt.py b/kittycad/models/ai_prompt.py new file mode 100644 index 000000000..1fc95c1f8 --- /dev/null +++ b/kittycad/models/ai_prompt.py @@ -0,0 +1,209 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.ai_feedback import AiFeedback +from ..models.ai_prompt_type import AiPromptType +from ..models.api_call_status import ApiCallStatus +from ..models.uuid import Uuid +from ..models.uuid_binary import UuidBinary +from ..types import UNSET, Unset + +GO = TypeVar("GO", bound="AiPrompt") + + +@attr.s(auto_attribs=True) +class AiPrompt: + """An AI prompt.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + feedback: Union[Unset, AiFeedback] = UNSET + id: Union[Unset, UuidBinary] = UNSET + metadata: Union[Unset, Any] = UNSET + model_version: Union[Unset, str] = UNSET + output_file: Union[Unset, str] = UNSET + prompt: Union[Unset, str] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + type: Union[Unset, AiPromptType] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + if not isinstance(self.feedback, Unset): + feedback = self.feedback + if not isinstance(self.id, Unset): + id = self.id + metadata = self.metadata + model_version = self.model_version + output_file = self.output_file + prompt = self.prompt + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + if not isinstance(self.type, Unset): + type = self.type + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if feedback is not UNSET: + field_dict["feedback"] = feedback + if id is not UNSET: + field_dict["id"] = id + if metadata is not UNSET: + field_dict["metadata"] = metadata + if model_version is not UNSET: + field_dict["model_version"] = model_version + if output_file is not UNSET: + field_dict["output_file"] = output_file + if prompt is not UNSET: + field_dict["prompt"] = prompt + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if type is not UNSET: + field_dict["type"] = type + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[GO], src_dict: Dict[str, Any]) -> GO: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _feedback = d.pop("feedback", UNSET) + feedback: Union[Unset, AiFeedback] + if isinstance(_feedback, Unset): + feedback = UNSET + else: + feedback = _feedback # type: ignore[arg-type] + + _id = d.pop("id", UNSET) + id: Union[Unset, UuidBinary] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + metadata = d.pop("metadata", UNSET) + model_version = d.pop("model_version", UNSET) + + output_file = d.pop("output_file", UNSET) + + prompt = d.pop("prompt", UNSET) + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _type = d.pop("type", UNSET) + type: Union[Unset, AiPromptType] + if isinstance(_type, Unset): + type = UNSET + else: + type = _type # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + ai_prompt = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + feedback=feedback, + id=id, + metadata=metadata, + model_version=model_version, + output_file=output_file, + prompt=prompt, + started_at=started_at, + status=status, + type=type, + updated_at=updated_at, + user_id=user_id, + ) + + ai_prompt.additional_properties = d + return ai_prompt + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/ai_prompt_results_page.py b/kittycad/models/ai_prompt_results_page.py new file mode 100644 index 000000000..2e1992c55 --- /dev/null +++ b/kittycad/models/ai_prompt_results_page.py @@ -0,0 +1,70 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +PI = TypeVar("PI", bound="AiPromptResultsPage") + + +@attr.s(auto_attribs=True) +class AiPromptResultsPage: + """A single page of results""" # noqa: E501 + + from ..models.ai_prompt import AiPrompt + + items: Union[Unset, List[AiPrompt]] = UNSET + next_page: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.ai_prompt import AiPrompt + + items: Union[Unset, List[AiPrompt]] = UNSET + if not isinstance(self.items, Unset): + items = self.items + next_page = self.next_page + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if items is not UNSET: + field_dict["items"] = items + if next_page is not UNSET: + field_dict["next_page"] = next_page + + return field_dict + + @classmethod + def from_dict(cls: Type[PI], src_dict: Dict[str, Any]) -> PI: + d = src_dict.copy() + from ..models.ai_prompt import AiPrompt + + items = cast(List[AiPrompt], d.pop("items", UNSET)) + + next_page = d.pop("next_page", UNSET) + + ai_prompt_results_page = cls( + items=items, + next_page=next_page, + ) + + ai_prompt_results_page.additional_properties = d + return ai_prompt_results_page + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/ai_prompt_type.py b/kittycad/models/ai_prompt_type.py new file mode 100644 index 000000000..bcfa480aa --- /dev/null +++ b/kittycad/models/ai_prompt_type.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class AiPromptType(str, Enum): + """A type of AI prompt.""" # noqa: E501 + + """# Text to CAD. """ # noqa: E501 + TEXT_TO_CAD = "text_to_cad" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/angle.py b/kittycad/models/angle.py index 42543c1e4..ccc6f39e8 100644 --- a/kittycad/models/angle.py +++ b/kittycad/models/angle.py @@ -5,64 +5,65 @@ from ..models.unit_angle import UnitAngle from ..types import UNSET, Unset -GO = TypeVar("GO", bound="Angle") +UZ = TypeVar("UZ", bound="Angle") + @attr.s(auto_attribs=True) class Angle: - """ An angle, with a specific unit. """ # noqa: E501 - unit: Union[Unset, UnitAngle] = UNSET - value: Union[Unset, float] = UNSET + """An angle, with a specific unit.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + unit: Union[Unset, UnitAngle] = UNSET + value: Union[Unset, float] = UNSET - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.unit, Unset): - unit = self.unit - value = self.value + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if unit is not UNSET: - field_dict['unit'] = unit - if value is not UNSET: - field_dict['value'] = value + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.unit, Unset): + unit = self.unit + value = self.value - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if unit is not UNSET: + field_dict["unit"] = unit + if value is not UNSET: + field_dict["value"] = value - @classmethod - def from_dict(cls: Type[GO], src_dict: Dict[str, Any]) -> GO: - d = src_dict.copy() - _unit = d.pop("unit", UNSET) - unit: Union[Unset, UnitAngle] - if isinstance(_unit, Unset): - unit = UNSET - else: - unit = _unit # type: ignore[arg-type] + return field_dict - value = d.pop("value", UNSET) + @classmethod + def from_dict(cls: Type[UZ], src_dict: Dict[str, Any]) -> UZ: + d = src_dict.copy() + _unit = d.pop("unit", UNSET) + unit: Union[Unset, UnitAngle] + if isinstance(_unit, Unset): + unit = UNSET + else: + unit = _unit # type: ignore[arg-type] + value = d.pop("value", UNSET) - angle = cls( - unit= unit, - value= value, - ) + angle = cls( + unit=unit, + value=value, + ) - angle.additional_properties = d - return angle + angle.additional_properties = d + return angle - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/annotation_line_end.py b/kittycad/models/annotation_line_end.py index 8ea0fdde3..85eedc629 100644 --- a/kittycad/models/annotation_line_end.py +++ b/kittycad/models/annotation_line_end.py @@ -2,9 +2,10 @@ class AnnotationLineEnd(str, Enum): - """ Annotation line end type """ # noqa: E501 - NONE = 'none' - ARROW = 'arrow' + """Annotation line end type""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + NONE = "none" + ARROW = "arrow" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/annotation_line_end_options.py b/kittycad/models/annotation_line_end_options.py index f20c87507..58c976f38 100644 --- a/kittycad/models/annotation_line_end_options.py +++ b/kittycad/models/annotation_line_end_options.py @@ -5,70 +5,71 @@ from ..models.annotation_line_end import AnnotationLineEnd from ..types import UNSET, Unset -PI = TypeVar("PI", bound="AnnotationLineEndOptions") +FB = TypeVar("FB", bound="AnnotationLineEndOptions") + @attr.s(auto_attribs=True) class AnnotationLineEndOptions: - """ Options for annotation text """ # noqa: E501 - end: Union[Unset, AnnotationLineEnd] = UNSET - start: Union[Unset, AnnotationLineEnd] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.end, Unset): - end = self.end - if not isinstance(self.start, Unset): - start = self.start - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if end is not UNSET: - field_dict['end'] = end - if start is not UNSET: - field_dict['start'] = start - - return field_dict - - @classmethod - def from_dict(cls: Type[PI], src_dict: Dict[str, Any]) -> PI: - d = src_dict.copy() - _end = d.pop("end", UNSET) - end: Union[Unset, AnnotationLineEnd] - if isinstance(_end, Unset): - end = UNSET - else: - end = _end # type: ignore[arg-type] - - _start = d.pop("start", UNSET) - start: Union[Unset, AnnotationLineEnd] - if isinstance(_start, Unset): - start = UNSET - else: - start = _start # type: ignore[arg-type] - - - annotation_line_end_options = cls( - end= end, - start= start, - ) - - annotation_line_end_options.additional_properties = d - return annotation_line_end_options - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Options for annotation text""" # noqa: E501 + + end: Union[Unset, AnnotationLineEnd] = UNSET + start: Union[Unset, AnnotationLineEnd] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.end, Unset): + end = self.end + if not isinstance(self.start, Unset): + start = self.start + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if end is not UNSET: + field_dict["end"] = end + if start is not UNSET: + field_dict["start"] = start + + return field_dict + + @classmethod + def from_dict(cls: Type[FB], src_dict: Dict[str, Any]) -> FB: + d = src_dict.copy() + _end = d.pop("end", UNSET) + end: Union[Unset, AnnotationLineEnd] + if isinstance(_end, Unset): + end = UNSET + else: + end = _end # type: ignore[arg-type] + + _start = d.pop("start", UNSET) + start: Union[Unset, AnnotationLineEnd] + if isinstance(_start, Unset): + start = UNSET + else: + start = _start # type: ignore[arg-type] + + annotation_line_end_options = cls( + end=end, + start=start, + ) + + annotation_line_end_options.additional_properties = d + return annotation_line_end_options + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/annotation_options.py b/kittycad/models/annotation_options.py index 5df0bb3aa..3d258245b 100644 --- a/kittycad/models/annotation_options.py +++ b/kittycad/models/annotation_options.py @@ -8,103 +8,104 @@ from ..models.point3d import Point3d from ..types import UNSET, Unset -UZ = TypeVar("UZ", bound="AnnotationOptions") +QP = TypeVar("QP", bound="AnnotationOptions") + @attr.s(auto_attribs=True) class AnnotationOptions: - """ Options for annotations """ # noqa: E501 - color: Union[Unset, Color] = UNSET - line_ends: Union[Unset, AnnotationLineEndOptions] = UNSET - line_width: Union[Unset, float] = UNSET - position: Union[Unset, Point3d] = UNSET - text: Union[Unset, AnnotationTextOptions] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.color, Unset): - color = self.color - if not isinstance(self.line_ends, Unset): - line_ends = self.line_ends - line_width = self.line_width - if not isinstance(self.position, Unset): - position = self.position - if not isinstance(self.text, Unset): - text = self.text - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if color is not UNSET: - field_dict['color'] = color - if line_ends is not UNSET: - field_dict['line_ends'] = line_ends - if line_width is not UNSET: - field_dict['line_width'] = line_width - if position is not UNSET: - field_dict['position'] = position - if text is not UNSET: - field_dict['text'] = text - - return field_dict - - @classmethod - def from_dict(cls: Type[UZ], src_dict: Dict[str, Any]) -> UZ: - d = src_dict.copy() - _color = d.pop("color", UNSET) - color: Union[Unset, Color] - if isinstance(_color, Unset): - color = UNSET - else: - color = _color # type: ignore[arg-type] - - _line_ends = d.pop("line_ends", UNSET) - line_ends: Union[Unset, AnnotationLineEndOptions] - if isinstance(_line_ends, Unset): - line_ends = UNSET - else: - line_ends = _line_ends # type: ignore[arg-type] - - line_width = d.pop("line_width", UNSET) - - _position = d.pop("position", UNSET) - position: Union[Unset, Point3d] - if isinstance(_position, Unset): - position = UNSET - else: - position = _position # type: ignore[arg-type] - - _text = d.pop("text", UNSET) - text: Union[Unset, AnnotationTextOptions] - if isinstance(_text, Unset): - text = UNSET - else: - text = _text # type: ignore[arg-type] - - - annotation_options = cls( - color= color, - line_ends= line_ends, - line_width= line_width, - position= position, - text= text, - ) - - annotation_options.additional_properties = d - return annotation_options - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Options for annotations""" # noqa: E501 + + color: Union[Unset, Color] = UNSET + line_ends: Union[Unset, AnnotationLineEndOptions] = UNSET + line_width: Union[Unset, float] = UNSET + position: Union[Unset, Point3d] = UNSET + text: Union[Unset, AnnotationTextOptions] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.color, Unset): + color = self.color + if not isinstance(self.line_ends, Unset): + line_ends = self.line_ends + line_width = self.line_width + if not isinstance(self.position, Unset): + position = self.position + if not isinstance(self.text, Unset): + text = self.text + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if color is not UNSET: + field_dict["color"] = color + if line_ends is not UNSET: + field_dict["line_ends"] = line_ends + if line_width is not UNSET: + field_dict["line_width"] = line_width + if position is not UNSET: + field_dict["position"] = position + if text is not UNSET: + field_dict["text"] = text + + return field_dict + + @classmethod + def from_dict(cls: Type[QP], src_dict: Dict[str, Any]) -> QP: + d = src_dict.copy() + _color = d.pop("color", UNSET) + color: Union[Unset, Color] + if isinstance(_color, Unset): + color = UNSET + else: + color = _color # type: ignore[arg-type] + + _line_ends = d.pop("line_ends", UNSET) + line_ends: Union[Unset, AnnotationLineEndOptions] + if isinstance(_line_ends, Unset): + line_ends = UNSET + else: + line_ends = _line_ends # type: ignore[arg-type] + + line_width = d.pop("line_width", UNSET) + + _position = d.pop("position", UNSET) + position: Union[Unset, Point3d] + if isinstance(_position, Unset): + position = UNSET + else: + position = _position # type: ignore[arg-type] + + _text = d.pop("text", UNSET) + text: Union[Unset, AnnotationTextOptions] + if isinstance(_text, Unset): + text = UNSET + else: + text = _text # type: ignore[arg-type] + + annotation_options = cls( + color=color, + line_ends=line_ends, + line_width=line_width, + position=position, + text=text, + ) + + annotation_options.additional_properties = d + return annotation_options + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/annotation_text_alignment_x.py b/kittycad/models/annotation_text_alignment_x.py index c667bd469..1b0b42901 100644 --- a/kittycad/models/annotation_text_alignment_x.py +++ b/kittycad/models/annotation_text_alignment_x.py @@ -2,10 +2,11 @@ class AnnotationTextAlignmentX(str, Enum): - """ Horizontal Text aligment """ # noqa: E501 - LEFT = 'left' - CENTER = 'center' - RIGHT = 'right' + """Horizontal Text aligment""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + LEFT = "left" + CENTER = "center" + RIGHT = "right" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/annotation_text_alignment_y.py b/kittycad/models/annotation_text_alignment_y.py index fa04e8340..3fc4842ca 100644 --- a/kittycad/models/annotation_text_alignment_y.py +++ b/kittycad/models/annotation_text_alignment_y.py @@ -2,10 +2,11 @@ class AnnotationTextAlignmentY(str, Enum): - """ Vertical Text aligment """ # noqa: E501 - BOTTOM = 'bottom' - CENTER = 'center' - TOP = 'top' + """Vertical Text aligment""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + BOTTOM = "bottom" + CENTER = "center" + TOP = "top" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/annotation_text_options.py b/kittycad/models/annotation_text_options.py index f8f98588c..67df21be8 100644 --- a/kittycad/models/annotation_text_options.py +++ b/kittycad/models/annotation_text_options.py @@ -6,84 +6,85 @@ from ..models.annotation_text_alignment_y import AnnotationTextAlignmentY from ..types import UNSET, Unset -FB = TypeVar("FB", bound="AnnotationTextOptions") +KC = TypeVar("KC", bound="AnnotationTextOptions") + @attr.s(auto_attribs=True) class AnnotationTextOptions: - """ Options for annotation text """ # noqa: E501 - point_size: Union[Unset, int] = UNSET - text: Union[Unset, str] = UNSET - x: Union[Unset, AnnotationTextAlignmentX] = UNSET - y: Union[Unset, AnnotationTextAlignmentY] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - point_size = self.point_size - text = self.text - if not isinstance(self.x, Unset): - x = self.x - if not isinstance(self.y, Unset): - y = self.y - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if point_size is not UNSET: - field_dict['point_size'] = point_size - if text is not UNSET: - field_dict['text'] = text - if x is not UNSET: - field_dict['x'] = x - if y is not UNSET: - field_dict['y'] = y - - return field_dict - - @classmethod - def from_dict(cls: Type[FB], src_dict: Dict[str, Any]) -> FB: - d = src_dict.copy() - point_size = d.pop("point_size", UNSET) - - text = d.pop("text", UNSET) - - _x = d.pop("x", UNSET) - x: Union[Unset, AnnotationTextAlignmentX] - if isinstance(_x, Unset): - x = UNSET - else: - x = _x # type: ignore[arg-type] - - _y = d.pop("y", UNSET) - y: Union[Unset, AnnotationTextAlignmentY] - if isinstance(_y, Unset): - y = UNSET - else: - y = _y # type: ignore[arg-type] - - - annotation_text_options = cls( - point_size= point_size, - text= text, - x= x, - y= y, - ) - - annotation_text_options.additional_properties = d - return annotation_text_options - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Options for annotation text""" # noqa: E501 + + point_size: Union[Unset, int] = UNSET + text: Union[Unset, str] = UNSET + x: Union[Unset, AnnotationTextAlignmentX] = UNSET + y: Union[Unset, AnnotationTextAlignmentY] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + point_size = self.point_size + text = self.text + if not isinstance(self.x, Unset): + x = self.x + if not isinstance(self.y, Unset): + y = self.y + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if point_size is not UNSET: + field_dict["point_size"] = point_size + if text is not UNSET: + field_dict["text"] = text + if x is not UNSET: + field_dict["x"] = x + if y is not UNSET: + field_dict["y"] = y + + return field_dict + + @classmethod + def from_dict(cls: Type[KC], src_dict: Dict[str, Any]) -> KC: + d = src_dict.copy() + point_size = d.pop("point_size", UNSET) + + text = d.pop("text", UNSET) + + _x = d.pop("x", UNSET) + x: Union[Unset, AnnotationTextAlignmentX] + if isinstance(_x, Unset): + x = UNSET + else: + x = _x # type: ignore[arg-type] + + _y = d.pop("y", UNSET) + y: Union[Unset, AnnotationTextAlignmentY] + if isinstance(_y, Unset): + y = UNSET + else: + y = _y # type: ignore[arg-type] + + annotation_text_options = cls( + point_size=point_size, + text=text, + x=x, + y=y, + ) + + annotation_text_options.additional_properties = d + return annotation_text_options + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/annotation_type.py b/kittycad/models/annotation_type.py index 4fe3895f0..1fb492929 100644 --- a/kittycad/models/annotation_type.py +++ b/kittycad/models/annotation_type.py @@ -2,11 +2,12 @@ class AnnotationType(str, Enum): - """ The type of annotation """ # noqa: E501 - """# 2D annotation type (screen or planar space) """ # noqa: E501 - T2D = 't2d' - """# 3D annotation type """ # noqa: E501 - T3D = 't3d' - - def __str__(self) -> str: - return str(self.value) + """The type of annotation""" # noqa: E501 + + """# 2D annotation type (screen or planar space) """ # noqa: E501 + T2D = "t2d" + """# 3D annotation type """ # noqa: E501 + T3D = "t3d" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/api_call_query_group.py b/kittycad/models/api_call_query_group.py index 4ee5c2b16..ec3d1f879 100644 --- a/kittycad/models/api_call_query_group.py +++ b/kittycad/models/api_call_query_group.py @@ -4,58 +4,59 @@ from ..types import UNSET, Unset -QP = TypeVar("QP", bound="ApiCallQueryGroup") +HX = TypeVar("HX", bound="ApiCallQueryGroup") + @attr.s(auto_attribs=True) class ApiCallQueryGroup: - """ A response for a query on the API call table that is grouped by something. """ # noqa: E501 - count: Union[Unset, int] = UNSET - query: Union[Unset, str] = UNSET + """A response for a query on the API call table that is grouped by something.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + count: Union[Unset, int] = UNSET + query: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - count = self.count - query = self.query + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if count is not UNSET: - field_dict['count'] = count - if query is not UNSET: - field_dict['query'] = query + def to_dict(self) -> Dict[str, Any]: + count = self.count + query = self.query - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if count is not UNSET: + field_dict["count"] = count + if query is not UNSET: + field_dict["query"] = query - @classmethod - def from_dict(cls: Type[QP], src_dict: Dict[str, Any]) -> QP: - d = src_dict.copy() - count = d.pop("count", UNSET) + return field_dict - query = d.pop("query", UNSET) + @classmethod + def from_dict(cls: Type[HX], src_dict: Dict[str, Any]) -> HX: + d = src_dict.copy() + count = d.pop("count", UNSET) + query = d.pop("query", UNSET) - api_call_query_group = cls( - count= count, - query= query, - ) + api_call_query_group = cls( + count=count, + query=query, + ) - api_call_query_group.additional_properties = d - return api_call_query_group + api_call_query_group.additional_properties = d + return api_call_query_group - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/api_call_query_group_by.py b/kittycad/models/api_call_query_group_by.py index d00635c5b..c5024cb81 100644 --- a/kittycad/models/api_call_query_group_by.py +++ b/kittycad/models/api_call_query_group_by.py @@ -2,19 +2,20 @@ class ApiCallQueryGroupBy(str, Enum): - """ The field of an API call to group by. """ # noqa: E501 - """# The email of the user that requested the API call. """ # noqa: E501 - EMAIL = 'email' - """# The HTTP method of the API call. """ # noqa: E501 - METHOD = 'method' - """# The endpoint of the API call. """ # noqa: E501 - ENDPOINT = 'endpoint' - """# The user ID of the user that requested the API call. """ # noqa: E501 - USER_ID = 'user_id' - """# The origin of the API call. This is parsed from the `Origin` header. """ # noqa: E501 - ORIGIN = 'origin' - """# The IP address of the user making the API call. """ # noqa: E501 - IP_ADDRESS = 'ip_address' + """The field of an API call to group by.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# The email of the user that requested the API call. """ # noqa: E501 + EMAIL = "email" + """# The HTTP method of the API call. """ # noqa: E501 + METHOD = "method" + """# The endpoint of the API call. """ # noqa: E501 + ENDPOINT = "endpoint" + """# The user ID of the user that requested the API call. """ # noqa: E501 + USER_ID = "user_id" + """# The origin of the API call. This is parsed from the `Origin` header. """ # noqa: E501 + ORIGIN = "origin" + """# The IP address of the user making the API call. """ # noqa: E501 + IP_ADDRESS = "ip_address" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/api_call_status.py b/kittycad/models/api_call_status.py index 6b0bd9d1b..6c0361196 100644 --- a/kittycad/models/api_call_status.py +++ b/kittycad/models/api_call_status.py @@ -2,17 +2,18 @@ class ApiCallStatus(str, Enum): - """ The status of an async API call. """ # noqa: E501 - """# The async API call is queued. """ # noqa: E501 - QUEUED = 'queued' - """# The async API call was uploaded to be converted. """ # noqa: E501 - UPLOADED = 'uploaded' - """# The async API call is in progress. """ # noqa: E501 - IN_PROGRESS = 'in_progress' - """# The async API call has completed. """ # noqa: E501 - COMPLETED = 'completed' - """# The async API call has failed. """ # noqa: E501 - FAILED = 'failed' + """The status of an async API call.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# The async API call is queued. """ # noqa: E501 + QUEUED = "queued" + """# The async API call was uploaded to be converted. """ # noqa: E501 + UPLOADED = "uploaded" + """# The async API call is in progress. """ # noqa: E501 + IN_PROGRESS = "in_progress" + """# The async API call has completed. """ # noqa: E501 + COMPLETED = "completed" + """# The async API call has failed. """ # noqa: E501 + FAILED = "failed" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/api_call_with_price.py b/kittycad/models/api_call_with_price.py index 2525f40c1..5944bb0d6 100644 --- a/kittycad/models/api_call_with_price.py +++ b/kittycad/models/api_call_with_price.py @@ -8,244 +8,250 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -KC = TypeVar("KC", bound="ApiCallWithPrice") +LB = TypeVar("LB", bound="ApiCallWithPrice") + @attr.s(auto_attribs=True) class ApiCallWithPrice: - """ An API call with the price. - -This is a join of the `ApiCall` and `ApiCallPrice` tables. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - duration: Union[Unset, int] = UNSET - email: Union[Unset, str] = UNSET - endpoint: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - ip_address: Union[Unset, str] = UNSET - litterbox: Union[Unset, bool] = False - method: Union[Unset, Method] = UNSET - minutes: Union[Unset, int] = UNSET - origin: Union[Unset, str] = UNSET - price: Union[Unset, float] = UNSET - request_body: Union[Unset, str] = UNSET - request_query_params: Union[Unset, str] = UNSET - response_body: Union[Unset, str] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status_code: Union[Unset, int] = UNSET - stripe_invoice_item_id: Union[Unset, str] = UNSET - token: Union[Unset, str] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_agent: Union[Unset, str] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - duration = self.duration - email = self.email - endpoint = self.endpoint - id = self.id - ip_address = self.ip_address - litterbox = self.litterbox - if not isinstance(self.method, Unset): - method = self.method - minutes = self.minutes - origin = self.origin - price = self.price - request_body = self.request_body - request_query_params = self.request_query_params - response_body = self.response_body - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - status_code = self.status_code - stripe_invoice_item_id = self.stripe_invoice_item_id - token = self.token - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_agent = self.user_agent - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if duration is not UNSET: - field_dict['duration'] = duration - if email is not UNSET: - field_dict['email'] = email - if endpoint is not UNSET: - field_dict['endpoint'] = endpoint - if id is not UNSET: - field_dict['id'] = id - if ip_address is not UNSET: - field_dict['ip_address'] = ip_address - if litterbox is not UNSET: - field_dict['litterbox'] = litterbox - if method is not UNSET: - field_dict['method'] = method - if minutes is not UNSET: - field_dict['minutes'] = minutes - if origin is not UNSET: - field_dict['origin'] = origin - if price is not UNSET: - field_dict['price'] = price - if request_body is not UNSET: - field_dict['request_body'] = request_body - if request_query_params is not UNSET: - field_dict['request_query_params'] = request_query_params - if response_body is not UNSET: - field_dict['response_body'] = response_body - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status_code is not UNSET: - field_dict['status_code'] = status_code - if stripe_invoice_item_id is not UNSET: - field_dict['stripe_invoice_item_id'] = stripe_invoice_item_id - if token is not UNSET: - field_dict['token'] = token - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_agent is not UNSET: - field_dict['user_agent'] = user_agent - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[KC], src_dict: Dict[str, Any]) -> KC: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - duration = d.pop("duration", UNSET) - - email = d.pop("email", UNSET) - - endpoint = d.pop("endpoint", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - ip_address = d.pop("ip_address", UNSET) - - litterbox = d.pop("litterbox", UNSET) - - _method = d.pop("method", UNSET) - method: Union[Unset, Method] - if isinstance(_method, Unset): - method = UNSET - else: - method = _method # type: ignore[arg-type] - - minutes = d.pop("minutes", UNSET) - - origin = d.pop("origin", UNSET) - - price = d.pop("price", UNSET) - - request_body = d.pop("request_body", UNSET) - - request_query_params = d.pop("request_query_params", UNSET) - - response_body = d.pop("response_body", UNSET) - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - status_code = d.pop("status_code", UNSET) - - stripe_invoice_item_id = d.pop("stripe_invoice_item_id", UNSET) - - _token = d.pop("token", UNSET) - token: Union[Unset, Uuid] - if isinstance(_token, Unset): - token = UNSET - else: - token = _token # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_agent = d.pop("user_agent", UNSET) - - user_id = d.pop("user_id", UNSET) - - - api_call_with_price = cls( - completed_at= completed_at, - created_at= created_at, - duration= duration, - email= email, - endpoint= endpoint, - id= id, - ip_address= ip_address, - litterbox= litterbox, - method= method, - minutes= minutes, - origin= origin, - price= price, - request_body= request_body, - request_query_params= request_query_params, - response_body= response_body, - started_at= started_at, - status_code= status_code, - stripe_invoice_item_id= stripe_invoice_item_id, - token= token, - updated_at= updated_at, - user_agent= user_agent, - user_id= user_id, - ) - - api_call_with_price.additional_properties = d - return api_call_with_price - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """An API call with the price. + + This is a join of the `ApiCall` and `ApiCallPrice` tables.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + duration: Union[Unset, int] = UNSET + email: Union[Unset, str] = UNSET + endpoint: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + ip_address: Union[Unset, str] = UNSET + litterbox: Union[Unset, bool] = False + method: Union[Unset, Method] = UNSET + minutes: Union[Unset, int] = UNSET + origin: Union[Unset, str] = UNSET + price: Union[Unset, float] = UNSET + request_body: Union[Unset, str] = UNSET + request_query_params: Union[Unset, str] = UNSET + response_body: Union[Unset, str] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status_code: Union[Unset, int] = UNSET + stripe_invoice_item_id: Union[Unset, str] = UNSET + token: Union[Unset, str] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_agent: Union[Unset, str] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + duration = self.duration + email = self.email + endpoint = self.endpoint + id = self.id + ip_address = self.ip_address + litterbox = self.litterbox + if not isinstance(self.method, Unset): + method = self.method + minutes = self.minutes + origin = self.origin + price = self.price + request_body = self.request_body + request_query_params = self.request_query_params + response_body = self.response_body + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + status_code = self.status_code + stripe_invoice_item_id = self.stripe_invoice_item_id + token = self.token + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_agent = self.user_agent + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if duration is not UNSET: + field_dict["duration"] = duration + if email is not UNSET: + field_dict["email"] = email + if endpoint is not UNSET: + field_dict["endpoint"] = endpoint + if id is not UNSET: + field_dict["id"] = id + if ip_address is not UNSET: + field_dict["ip_address"] = ip_address + if litterbox is not UNSET: + field_dict["litterbox"] = litterbox + if method is not UNSET: + field_dict["method"] = method + if minutes is not UNSET: + field_dict["minutes"] = minutes + if origin is not UNSET: + field_dict["origin"] = origin + if price is not UNSET: + field_dict["price"] = price + if request_body is not UNSET: + field_dict["request_body"] = request_body + if request_query_params is not UNSET: + field_dict["request_query_params"] = request_query_params + if response_body is not UNSET: + field_dict["response_body"] = response_body + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status_code is not UNSET: + field_dict["status_code"] = status_code + if stripe_invoice_item_id is not UNSET: + field_dict["stripe_invoice_item_id"] = stripe_invoice_item_id + if token is not UNSET: + field_dict["token"] = token + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_agent is not UNSET: + field_dict["user_agent"] = user_agent + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[LB], src_dict: Dict[str, Any]) -> LB: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + duration = d.pop("duration", UNSET) + + email = d.pop("email", UNSET) + + endpoint = d.pop("endpoint", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + ip_address = d.pop("ip_address", UNSET) + + litterbox = d.pop("litterbox", UNSET) + + _method = d.pop("method", UNSET) + method: Union[Unset, Method] + if isinstance(_method, Unset): + method = UNSET + else: + method = _method # type: ignore[arg-type] + + minutes = d.pop("minutes", UNSET) + + origin = d.pop("origin", UNSET) + + price = d.pop("price", UNSET) + + request_body = d.pop("request_body", UNSET) + + request_query_params = d.pop("request_query_params", UNSET) + + response_body = d.pop("response_body", UNSET) + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + status_code = d.pop("status_code", UNSET) + + stripe_invoice_item_id = d.pop("stripe_invoice_item_id", UNSET) + + _token = d.pop("token", UNSET) + token: Union[Unset, Uuid] + if isinstance(_token, Unset): + token = UNSET + else: + token = _token # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + user_agent = d.pop("user_agent", UNSET) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + api_call_with_price = cls( + completed_at=completed_at, + created_at=created_at, + duration=duration, + email=email, + endpoint=endpoint, + id=id, + ip_address=ip_address, + litterbox=litterbox, + method=method, + minutes=minutes, + origin=origin, + price=price, + request_body=request_body, + request_query_params=request_query_params, + response_body=response_body, + started_at=started_at, + status_code=status_code, + stripe_invoice_item_id=stripe_invoice_item_id, + token=token, + updated_at=updated_at, + user_agent=user_agent, + user_id=user_id, + ) + + api_call_with_price.additional_properties = d + return api_call_with_price + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/api_call_with_price_results_page.py b/kittycad/models/api_call_with_price_results_page.py index 11375a3e7..e77730d5d 100644 --- a/kittycad/models/api_call_with_price_results_page.py +++ b/kittycad/models/api_call_with_price_results_page.py @@ -4,63 +4,67 @@ from ..types import UNSET, Unset -HX = TypeVar("HX", bound="ApiCallWithPriceResultsPage") +NE = TypeVar("NE", bound="ApiCallWithPriceResultsPage") + @attr.s(auto_attribs=True) class ApiCallWithPriceResultsPage: - """ A single page of results """ # noqa: E501 - from ..models.api_call_with_price import ApiCallWithPrice - items: Union[Unset, List[ApiCallWithPrice]] = UNSET - next_page: Union[Unset, str] = UNSET + """A single page of results""" # noqa: E501 + + from ..models.api_call_with_price import ApiCallWithPrice + + items: Union[Unset, List[ApiCallWithPrice]] = UNSET + next_page: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + from ..models.api_call_with_price import ApiCallWithPrice - def to_dict(self) -> Dict[str, Any]: - from ..models.api_call_with_price import ApiCallWithPrice - items: Union[Unset, List[ApiCallWithPrice]] = UNSET - if not isinstance(self.items, Unset): - items = self.items - next_page = self.next_page + items: Union[Unset, List[ApiCallWithPrice]] = UNSET + if not isinstance(self.items, Unset): + items = self.items + next_page = self.next_page - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if items is not UNSET: - field_dict['items'] = items - if next_page is not UNSET: - field_dict['next_page'] = next_page + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if items is not UNSET: + field_dict["items"] = items + if next_page is not UNSET: + field_dict["next_page"] = next_page - return field_dict + return field_dict - @classmethod - def from_dict(cls: Type[HX], src_dict: Dict[str, Any]) -> HX: - d = src_dict.copy() - from ..models.api_call_with_price import ApiCallWithPrice - items = cast(List[ApiCallWithPrice], d.pop("items", UNSET)) + @classmethod + def from_dict(cls: Type[NE], src_dict: Dict[str, Any]) -> NE: + d = src_dict.copy() + from ..models.api_call_with_price import ApiCallWithPrice - next_page = d.pop("next_page", UNSET) + items = cast(List[ApiCallWithPrice], d.pop("items", UNSET)) + next_page = d.pop("next_page", UNSET) - api_call_with_price_results_page = cls( - items= items, - next_page= next_page, - ) + api_call_with_price_results_page = cls( + items=items, + next_page=next_page, + ) - api_call_with_price_results_page.additional_properties = d - return api_call_with_price_results_page + api_call_with_price_results_page.additional_properties = d + return api_call_with_price_results_page - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/api_error.py b/kittycad/models/api_error.py index e86e1185e..f8ae2717d 100644 --- a/kittycad/models/api_error.py +++ b/kittycad/models/api_error.py @@ -5,64 +5,65 @@ from ..models.error_code import ErrorCode from ..types import UNSET, Unset -LB = TypeVar("LB", bound="ApiError") +TL = TypeVar("TL", bound="ApiError") + @attr.s(auto_attribs=True) class ApiError: - """ An error. """ # noqa: E501 - error_code: Union[Unset, ErrorCode] = UNSET - message: Union[Unset, str] = UNSET + """An error.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + error_code: Union[Unset, ErrorCode] = UNSET + message: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.error_code, Unset): - error_code = self.error_code - message = self.message + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if error_code is not UNSET: - field_dict['error_code'] = error_code - if message is not UNSET: - field_dict['message'] = message + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.error_code, Unset): + error_code = self.error_code + message = self.message - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if error_code is not UNSET: + field_dict["error_code"] = error_code + if message is not UNSET: + field_dict["message"] = message - @classmethod - def from_dict(cls: Type[LB], src_dict: Dict[str, Any]) -> LB: - d = src_dict.copy() - _error_code = d.pop("error_code", UNSET) - error_code: Union[Unset, ErrorCode] - if isinstance(_error_code, Unset): - error_code = UNSET - else: - error_code = _error_code # type: ignore[arg-type] + return field_dict - message = d.pop("message", UNSET) + @classmethod + def from_dict(cls: Type[TL], src_dict: Dict[str, Any]) -> TL: + d = src_dict.copy() + _error_code = d.pop("error_code", UNSET) + error_code: Union[Unset, ErrorCode] + if isinstance(_error_code, Unset): + error_code = UNSET + else: + error_code = _error_code # type: ignore[arg-type] + message = d.pop("message", UNSET) - api_error = cls( - error_code= error_code, - message= message, - ) + api_error = cls( + error_code=error_code, + message=message, + ) - api_error.additional_properties = d - return api_error + api_error.additional_properties = d + return api_error - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/api_token.py b/kittycad/models/api_token.py index 33cb96b2b..a73b14737 100644 --- a/kittycad/models/api_token.py +++ b/kittycad/models/api_token.py @@ -7,107 +7,118 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -NE = TypeVar("NE", bound="ApiToken") +MN = TypeVar("MN", bound="ApiToken") + @attr.s(auto_attribs=True) class ApiToken: - """ An API token. - -These are used to authenticate users with Bearer authentication. """ # noqa: E501 - created_at: Union[Unset, datetime.datetime] = UNSET - id: Union[Unset, str] = UNSET - is_valid: Union[Unset, bool] = False - token: Union[Unset, str] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - id = self.id - is_valid = self.is_valid - token = self.token - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict['created_at'] = created_at - if id is not UNSET: - field_dict['id'] = id - if is_valid is not UNSET: - field_dict['is_valid'] = is_valid - if token is not UNSET: - field_dict['token'] = token - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[NE], src_dict: Dict[str, Any]) -> NE: - d = src_dict.copy() - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - id = d.pop("id", UNSET) - - is_valid = d.pop("is_valid", UNSET) - - _token = d.pop("token", UNSET) - token: Union[Unset, Uuid] - if isinstance(_token, Unset): - token = UNSET - else: - token = _token # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - api_token = cls( - created_at= created_at, - id= id, - is_valid= is_valid, - token= token, - updated_at= updated_at, - user_id= user_id, - ) - - api_token.additional_properties = d - return api_token - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """An API token. + + These are used to authenticate users with Bearer authentication.""" # noqa: E501 + + created_at: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + is_valid: Union[Unset, bool] = False + token: Union[Unset, str] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + id = self.id + is_valid = self.is_valid + token = self.token + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if id is not UNSET: + field_dict["id"] = id + if is_valid is not UNSET: + field_dict["is_valid"] = is_valid + if token is not UNSET: + field_dict["token"] = token + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[MN], src_dict: Dict[str, Any]) -> MN: + d = src_dict.copy() + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + is_valid = d.pop("is_valid", UNSET) + + _token = d.pop("token", UNSET) + token: Union[Unset, Uuid] + if isinstance(_token, Unset): + token = UNSET + else: + token = _token # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + api_token = cls( + created_at=created_at, + id=id, + is_valid=is_valid, + token=token, + updated_at=updated_at, + user_id=user_id, + ) + + api_token.additional_properties = d + return api_token + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/api_token_results_page.py b/kittycad/models/api_token_results_page.py index 574d71129..eb4092320 100644 --- a/kittycad/models/api_token_results_page.py +++ b/kittycad/models/api_token_results_page.py @@ -4,63 +4,67 @@ from ..types import UNSET, Unset -TL = TypeVar("TL", bound="ApiTokenResultsPage") +JV = TypeVar("JV", bound="ApiTokenResultsPage") + @attr.s(auto_attribs=True) class ApiTokenResultsPage: - """ A single page of results """ # noqa: E501 - from ..models.api_token import ApiToken - items: Union[Unset, List[ApiToken]] = UNSET - next_page: Union[Unset, str] = UNSET + """A single page of results""" # noqa: E501 + + from ..models.api_token import ApiToken + + items: Union[Unset, List[ApiToken]] = UNSET + next_page: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + from ..models.api_token import ApiToken - def to_dict(self) -> Dict[str, Any]: - from ..models.api_token import ApiToken - items: Union[Unset, List[ApiToken]] = UNSET - if not isinstance(self.items, Unset): - items = self.items - next_page = self.next_page + items: Union[Unset, List[ApiToken]] = UNSET + if not isinstance(self.items, Unset): + items = self.items + next_page = self.next_page - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if items is not UNSET: - field_dict['items'] = items - if next_page is not UNSET: - field_dict['next_page'] = next_page + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if items is not UNSET: + field_dict["items"] = items + if next_page is not UNSET: + field_dict["next_page"] = next_page - return field_dict + return field_dict - @classmethod - def from_dict(cls: Type[TL], src_dict: Dict[str, Any]) -> TL: - d = src_dict.copy() - from ..models.api_token import ApiToken - items = cast(List[ApiToken], d.pop("items", UNSET)) + @classmethod + def from_dict(cls: Type[JV], src_dict: Dict[str, Any]) -> JV: + d = src_dict.copy() + from ..models.api_token import ApiToken - next_page = d.pop("next_page", UNSET) + items = cast(List[ApiToken], d.pop("items", UNSET)) + next_page = d.pop("next_page", UNSET) - api_token_results_page = cls( - items= items, - next_page= next_page, - ) + api_token_results_page = cls( + items=items, + next_page=next_page, + ) - api_token_results_page.additional_properties = d - return api_token_results_page + api_token_results_page.additional_properties = d + return api_token_results_page - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/app_client_info.py b/kittycad/models/app_client_info.py index 39acebacc..86fe373bc 100644 --- a/kittycad/models/app_client_info.py +++ b/kittycad/models/app_client_info.py @@ -4,51 +4,52 @@ from ..types import UNSET, Unset -MN = TypeVar("MN", bound="AppClientInfo") +IO = TypeVar("IO", bound="AppClientInfo") + @attr.s(auto_attribs=True) class AppClientInfo: - """ Information about a third party app client. """ # noqa: E501 - url: Union[Unset, str] = UNSET + """Information about a third party app client.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + url: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - url = self.url + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if url is not UNSET: - field_dict['url'] = url + def to_dict(self) -> Dict[str, Any]: + url = self.url - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if url is not UNSET: + field_dict["url"] = url - @classmethod - def from_dict(cls: Type[MN], src_dict: Dict[str, Any]) -> MN: - d = src_dict.copy() - url = d.pop("url", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[IO], src_dict: Dict[str, Any]) -> IO: + d = src_dict.copy() + url = d.pop("url", UNSET) - app_client_info = cls( - url= url, - ) + app_client_info = cls( + url=url, + ) - app_client_info.additional_properties = d - return app_client_info + app_client_info.additional_properties = d + return app_client_info - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/async_api_call.py b/kittycad/models/async_api_call.py index 8b0bb2b94..7a8c98032 100644 --- a/kittycad/models/async_api_call.py +++ b/kittycad/models/async_api_call.py @@ -9,171 +9,177 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -JV = TypeVar("JV", bound="AsyncApiCall") +FV = TypeVar("FV", bound="AsyncApiCall") + @attr.s(auto_attribs=True) class AsyncApiCall: - """ An async API call. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, Any] = UNSET - output: Union[Unset, Any] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - type: Union[Unset, AsyncApiCallType] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - worker: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - input = self.input - output = self.output - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - if not isinstance(self.type, Unset): - type = self.type - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - worker = self.worker - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if input is not UNSET: - field_dict['input'] = input - if output is not UNSET: - field_dict['output'] = output - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if type is not UNSET: - field_dict['type'] = type - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - if worker is not UNSET: - field_dict['worker'] = worker - - return field_dict - - @classmethod - def from_dict(cls: Type[JV], src_dict: Dict[str, Any]) -> JV: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - input = d.pop("input", UNSET) - output = d.pop("output", UNSET) - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _type = d.pop("type", UNSET) - type: Union[Unset, AsyncApiCallType] - if isinstance(_type, Unset): - type = UNSET - else: - type = _type # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - worker = d.pop("worker", UNSET) - - - async_api_call = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - input= input, - output= output, - started_at= started_at, - status= status, - type= type, - updated_at= updated_at, - user_id= user_id, - worker= worker, - ) - - async_api_call.additional_properties = d - return async_api_call - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """An async API call.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, Any] = UNSET + output: Union[Unset, Any] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + type: Union[Unset, AsyncApiCallType] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + worker: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + input = self.input + output = self.output + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + if not isinstance(self.type, Unset): + type = self.type + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + worker = self.worker + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if input is not UNSET: + field_dict["input"] = input + if output is not UNSET: + field_dict["output"] = output + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if type is not UNSET: + field_dict["type"] = type + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + if worker is not UNSET: + field_dict["worker"] = worker + + return field_dict + + @classmethod + def from_dict(cls: Type[FV], src_dict: Dict[str, Any]) -> FV: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + input = d.pop("input", UNSET) + output = d.pop("output", UNSET) + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _type = d.pop("type", UNSET) + type: Union[Unset, AsyncApiCallType] + if isinstance(_type, Unset): + type = UNSET + else: + type = _type # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + worker = d.pop("worker", UNSET) + + async_api_call = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + input=input, + output=output, + started_at=started_at, + status=status, + type=type, + updated_at=updated_at, + user_id=user_id, + worker=worker, + ) + + async_api_call.additional_properties = d + return async_api_call + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/async_api_call_output.py b/kittycad/models/async_api_call_output.py index e26f027d6..2ce447407 100644 --- a/kittycad/models/async_api_call_output.py +++ b/kittycad/models/async_api_call_output.py @@ -20,1364 +20,1403 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -IO = TypeVar("IO", bound="file_conversion") +LE = TypeVar("LE", bound="file_conversion") + @attr.s(auto_attribs=True) class file_conversion: - """ A file conversion. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_format: Union[Unset, FileExportFormat] = UNSET - output_format_options: Union[Unset, OutputFormat] = UNSET - outputs: Union[Unset, Dict[str, Base64Data]] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - src_format_options: Union[Unset, InputFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - type: str = "file_conversion" - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - if not isinstance(self.output_format, Unset): - output_format = self.output_format - if not isinstance(self.output_format_options, Unset): - output_format_options = self.output_format_options - outputs: Union[Unset, Dict[str, str]] = UNSET - if not isinstance(self.outputs, Unset): - new_dict: Dict[str, str] = {} - for key, value in self.outputs.items(): - new_dict[key] = value.get_encoded() - outputs = new_dict - if not isinstance(self.src_format, Unset): - src_format = self.src_format - if not isinstance(self.src_format_options, Unset): - src_format_options = self.src_format_options - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - type = self.type - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if output_format is not UNSET: - field_dict['output_format'] = output_format - if output_format_options is not UNSET: - field_dict['output_format_options'] = output_format_options - if outputs is not UNSET: - field_dict['outputs'] = outputs - if src_format is not UNSET: - field_dict['src_format'] = src_format - if src_format_options is not UNSET: - field_dict['src_format_options'] = src_format_options - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - field_dict['type'] = type - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[IO], src_dict: Dict[str, Any]) -> IO: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - _output_format = d.pop("output_format", UNSET) - output_format: Union[Unset, FileExportFormat] - if isinstance(_output_format, Unset): - output_format = UNSET - else: - output_format = _output_format # type: ignore[arg-type] - - _output_format_options = d.pop("output_format_options", UNSET) - output_format_options: Union[Unset, OutputFormat] - if isinstance(_output_format_options, Unset): - output_format_options = UNSET - else: - output_format_options = _output_format_options # type: ignore[arg-type] - - _outputs = d.pop("outputs", UNSET) - if isinstance(_outputs, Unset): - outputs = UNSET - else: - new_map: Dict[str, Base64Data] = {} - for k, v in _outputs.items(): - new_map[k] = Base64Data(bytes(v, 'utf-8')) - outputs = new_map # type: ignore - - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] - - _src_format_options = d.pop("src_format_options", UNSET) - src_format_options: Union[Unset, InputFormat] - if isinstance(_src_format_options, Unset): - src_format_options = UNSET - else: - src_format_options = _src_format_options # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - file_conversion = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - output_format= output_format, - output_format_options= output_format_options, - outputs= outputs, - src_format= src_format, - src_format_options= src_format_options, - started_at= started_at, - status= status, - type= type, - updated_at= updated_at, - user_id= user_id, - ) - - file_conversion.additional_properties = d - return file_conversion - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - - - -FV = TypeVar("FV", bound="file_center_of_mass") + """A file conversion.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_format: Union[Unset, FileExportFormat] = UNSET + output_format_options: Union[Unset, OutputFormat] = UNSET + outputs: Union[Unset, Dict[str, Base64Data]] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + src_format_options: Union[Unset, InputFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + type: str = "file_conversion" + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + if not isinstance(self.output_format, Unset): + output_format = self.output_format + if not isinstance(self.output_format_options, Unset): + output_format_options = self.output_format_options + outputs: Union[Unset, Dict[str, str]] = UNSET + if not isinstance(self.outputs, Unset): + new_dict: Dict[str, str] = {} + for key, value in self.outputs.items(): + new_dict[key] = value.get_encoded() + outputs = new_dict + if not isinstance(self.src_format, Unset): + src_format = self.src_format + if not isinstance(self.src_format_options, Unset): + src_format_options = self.src_format_options + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + type = self.type + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if output_format is not UNSET: + field_dict["output_format"] = output_format + if output_format_options is not UNSET: + field_dict["output_format_options"] = output_format_options + if outputs is not UNSET: + field_dict["outputs"] = outputs + if src_format is not UNSET: + field_dict["src_format"] = src_format + if src_format_options is not UNSET: + field_dict["src_format_options"] = src_format_options + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + field_dict["type"] = type + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[LE], src_dict: Dict[str, Any]) -> LE: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + _output_format = d.pop("output_format", UNSET) + output_format: Union[Unset, FileExportFormat] + if isinstance(_output_format, Unset): + output_format = UNSET + else: + output_format = _output_format # type: ignore[arg-type] + + _output_format_options = d.pop("output_format_options", UNSET) + output_format_options: Union[Unset, OutputFormat] + if isinstance(_output_format_options, Unset): + output_format_options = UNSET + else: + output_format_options = _output_format_options # type: ignore[arg-type] + + _outputs = d.pop("outputs", UNSET) + if isinstance(_outputs, Unset): + outputs = UNSET + else: + new_map: Dict[str, Base64Data] = {} + for k, v in _outputs.items(): + new_map[k] = Base64Data(bytes(v, "utf-8")) + outputs = new_map # type: ignore + + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] + + _src_format_options = d.pop("src_format_options", UNSET) + src_format_options: Union[Unset, InputFormat] + if isinstance(_src_format_options, Unset): + src_format_options = UNSET + else: + src_format_options = _src_format_options # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + file_conversion = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + output_format=output_format, + output_format_options=output_format_options, + outputs=outputs, + src_format=src_format, + src_format_options=src_format_options, + started_at=started_at, + status=status, + type=type, + updated_at=updated_at, + user_id=user_id, + ) + + file_conversion.additional_properties = d + return file_conversion + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +OY = TypeVar("OY", bound="file_center_of_mass") + @attr.s(auto_attribs=True) class file_center_of_mass: - """ File center of mass. """ # noqa: E501 - center_of_mass: Union[Unset, Point3d] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_unit: Union[Unset, UnitLength] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - type: str = "file_center_of_mass" - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.center_of_mass, Unset): - center_of_mass = self.center_of_mass - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - type = self.type - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if center_of_mass is not UNSET: - field_dict['center_of_mass'] = center_of_mass - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if src_format is not UNSET: - field_dict['src_format'] = src_format - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - field_dict['type'] = type - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[FV], src_dict: Dict[str, Any]) -> FV: - d = src_dict.copy() - _center_of_mass = d.pop("center_of_mass", UNSET) - center_of_mass: Union[Unset, Point3d] - if isinstance(_center_of_mass, Unset): - center_of_mass = UNSET - else: - center_of_mass = _center_of_mass # type: ignore[arg-type] - - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitLength] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - file_center_of_mass = cls( - center_of_mass= center_of_mass, - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - output_unit= output_unit, - src_format= src_format, - started_at= started_at, - status= status, - type= type, - updated_at= updated_at, - user_id= user_id, - ) - - file_center_of_mass.additional_properties = d - return file_center_of_mass - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - - - -LE = TypeVar("LE", bound="file_mass") + """File center of mass.""" # noqa: E501 + + center_of_mass: Union[Unset, Point3d] = UNSET + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitLength] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + type: str = "file_center_of_mass" + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.center_of_mass, Unset): + center_of_mass = self.center_of_mass + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + type = self.type + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if center_of_mass is not UNSET: + field_dict["center_of_mass"] = center_of_mass + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if src_format is not UNSET: + field_dict["src_format"] = src_format + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + field_dict["type"] = type + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[OY], src_dict: Dict[str, Any]) -> OY: + d = src_dict.copy() + _center_of_mass = d.pop("center_of_mass", UNSET) + center_of_mass: Union[Unset, Point3d] + if isinstance(_center_of_mass, Unset): + center_of_mass = UNSET + else: + center_of_mass = _center_of_mass # type: ignore[arg-type] + + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitLength] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + file_center_of_mass = cls( + center_of_mass=center_of_mass, + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + output_unit=output_unit, + src_format=src_format, + started_at=started_at, + status=status, + type=type, + updated_at=updated_at, + user_id=user_id, + ) + + file_center_of_mass.additional_properties = d + return file_center_of_mass + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +HO = TypeVar("HO", bound="file_mass") + @attr.s(auto_attribs=True) class file_mass: - """ A file mass. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - mass: Union[Unset, float] = UNSET - material_density: Union[Unset, float] = UNSET - material_density_unit: Union[Unset, UnitDensity] = UNSET - output_unit: Union[Unset, UnitMass] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - type: str = "file_mass" - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - mass = self.mass - material_density = self.material_density - if not isinstance(self.material_density_unit, Unset): - material_density_unit = self.material_density_unit - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - type = self.type - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if mass is not UNSET: - field_dict['mass'] = mass - if material_density is not UNSET: - field_dict['material_density'] = material_density - if material_density_unit is not UNSET: - field_dict['material_density_unit'] = material_density_unit - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if src_format is not UNSET: - field_dict['src_format'] = src_format - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - field_dict['type'] = type - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[LE], src_dict: Dict[str, Any]) -> LE: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - mass = d.pop("mass", UNSET) - - material_density = d.pop("material_density", UNSET) - - _material_density_unit = d.pop("material_density_unit", UNSET) - material_density_unit: Union[Unset, UnitDensity] - if isinstance(_material_density_unit, Unset): - material_density_unit = UNSET - else: - material_density_unit = _material_density_unit # type: ignore[arg-type] - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitMass] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - file_mass = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - mass= mass, - material_density= material_density, - material_density_unit= material_density_unit, - output_unit= output_unit, - src_format= src_format, - started_at= started_at, - status= status, - type= type, - updated_at= updated_at, - user_id= user_id, - ) - - file_mass.additional_properties = d - return file_mass - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - - + """A file mass.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + mass: Union[Unset, float] = UNSET + material_density: Union[Unset, float] = UNSET + material_density_unit: Union[Unset, UnitDensity] = UNSET + output_unit: Union[Unset, UnitMass] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + type: str = "file_mass" + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + mass = self.mass + material_density = self.material_density + if not isinstance(self.material_density_unit, Unset): + material_density_unit = self.material_density_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + type = self.type + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if mass is not UNSET: + field_dict["mass"] = mass + if material_density is not UNSET: + field_dict["material_density"] = material_density + if material_density_unit is not UNSET: + field_dict["material_density_unit"] = material_density_unit + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if src_format is not UNSET: + field_dict["src_format"] = src_format + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + field_dict["type"] = type + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[HO], src_dict: Dict[str, Any]) -> HO: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + mass = d.pop("mass", UNSET) + + material_density = d.pop("material_density", UNSET) + + _material_density_unit = d.pop("material_density_unit", UNSET) + material_density_unit: Union[Unset, UnitDensity] + if isinstance(_material_density_unit, Unset): + material_density_unit = UNSET + else: + material_density_unit = _material_density_unit # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitMass] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + file_mass = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + mass=mass, + material_density=material_density, + material_density_unit=material_density_unit, + output_unit=output_unit, + src_format=src_format, + started_at=started_at, + status=status, + type=type, + updated_at=updated_at, + user_id=user_id, + ) + + file_mass.additional_properties = d + return file_mass + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +TM = TypeVar("TM", bound="file_volume") -OY = TypeVar("OY", bound="file_volume") @attr.s(auto_attribs=True) class file_volume: - """ A file volume. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_unit: Union[Unset, UnitVolume] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - type: str = "file_volume" - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - volume: Union[Unset, float] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - type = self.type - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - volume = self.volume - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if src_format is not UNSET: - field_dict['src_format'] = src_format - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - field_dict['type'] = type - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - if volume is not UNSET: - field_dict['volume'] = volume - - return field_dict - - @classmethod - def from_dict(cls: Type[OY], src_dict: Dict[str, Any]) -> OY: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitVolume] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - volume = d.pop("volume", UNSET) - - - file_volume = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - output_unit= output_unit, - src_format= src_format, - started_at= started_at, - status= status, - type= type, - updated_at= updated_at, - user_id= user_id, - volume= volume, - ) - - file_volume.additional_properties = d - return file_volume - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - - - -HO = TypeVar("HO", bound="file_density") + """A file volume.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitVolume] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + type: str = "file_volume" + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + volume: Union[Unset, float] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + type = self.type + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + volume = self.volume + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if src_format is not UNSET: + field_dict["src_format"] = src_format + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + field_dict["type"] = type + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + if volume is not UNSET: + field_dict["volume"] = volume + + return field_dict + + @classmethod + def from_dict(cls: Type[TM], src_dict: Dict[str, Any]) -> TM: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitVolume] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + volume = d.pop("volume", UNSET) + + file_volume = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + output_unit=output_unit, + src_format=src_format, + started_at=started_at, + status=status, + type=type, + updated_at=updated_at, + user_id=user_id, + volume=volume, + ) + + file_volume.additional_properties = d + return file_volume + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +BS = TypeVar("BS", bound="file_density") + @attr.s(auto_attribs=True) class file_density: - """ A file density. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - density: Union[Unset, float] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - material_mass: Union[Unset, float] = UNSET - material_mass_unit: Union[Unset, UnitMass] = UNSET - output_unit: Union[Unset, UnitDensity] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - type: str = "file_density" - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - density = self.density - error = self.error - id = self.id - material_mass = self.material_mass - if not isinstance(self.material_mass_unit, Unset): - material_mass_unit = self.material_mass_unit - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - type = self.type - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if density is not UNSET: - field_dict['density'] = density - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if material_mass is not UNSET: - field_dict['material_mass'] = material_mass - if material_mass_unit is not UNSET: - field_dict['material_mass_unit'] = material_mass_unit - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if src_format is not UNSET: - field_dict['src_format'] = src_format - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - field_dict['type'] = type - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[HO], src_dict: Dict[str, Any]) -> HO: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - density = d.pop("density", UNSET) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - material_mass = d.pop("material_mass", UNSET) - - _material_mass_unit = d.pop("material_mass_unit", UNSET) - material_mass_unit: Union[Unset, UnitMass] - if isinstance(_material_mass_unit, Unset): - material_mass_unit = UNSET - else: - material_mass_unit = _material_mass_unit # type: ignore[arg-type] - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitDensity] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - file_density = cls( - completed_at= completed_at, - created_at= created_at, - density= density, - error= error, - id= id, - material_mass= material_mass, - material_mass_unit= material_mass_unit, - output_unit= output_unit, - src_format= src_format, - started_at= started_at, - status= status, - type= type, - updated_at= updated_at, - user_id= user_id, - ) - - file_density.additional_properties = d - return file_density - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - - + """A file density.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + density: Union[Unset, float] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + material_mass: Union[Unset, float] = UNSET + material_mass_unit: Union[Unset, UnitMass] = UNSET + output_unit: Union[Unset, UnitDensity] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + type: str = "file_density" + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + density = self.density + error = self.error + id = self.id + material_mass = self.material_mass + if not isinstance(self.material_mass_unit, Unset): + material_mass_unit = self.material_mass_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + type = self.type + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if density is not UNSET: + field_dict["density"] = density + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if material_mass is not UNSET: + field_dict["material_mass"] = material_mass + if material_mass_unit is not UNSET: + field_dict["material_mass_unit"] = material_mass_unit + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if src_format is not UNSET: + field_dict["src_format"] = src_format + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + field_dict["type"] = type + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[BS], src_dict: Dict[str, Any]) -> BS: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + density = d.pop("density", UNSET) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + material_mass = d.pop("material_mass", UNSET) + + _material_mass_unit = d.pop("material_mass_unit", UNSET) + material_mass_unit: Union[Unset, UnitMass] + if isinstance(_material_mass_unit, Unset): + material_mass_unit = UNSET + else: + material_mass_unit = _material_mass_unit # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitDensity] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + file_density = cls( + completed_at=completed_at, + created_at=created_at, + density=density, + error=error, + id=id, + material_mass=material_mass, + material_mass_unit=material_mass_unit, + output_unit=output_unit, + src_format=src_format, + started_at=started_at, + status=status, + type=type, + updated_at=updated_at, + user_id=user_id, + ) + + file_density.additional_properties = d + return file_density + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +AH = TypeVar("AH", bound="file_surface_area") -TM = TypeVar("TM", bound="file_surface_area") @attr.s(auto_attribs=True) class file_surface_area: - """ A file surface area. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_unit: Union[Unset, UnitArea] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - surface_area: Union[Unset, float] = UNSET - type: str = "file_surface_area" - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - surface_area = self.surface_area - type = self.type - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if src_format is not UNSET: - field_dict['src_format'] = src_format - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if surface_area is not UNSET: - field_dict['surface_area'] = surface_area - field_dict['type'] = type - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[TM], src_dict: Dict[str, Any]) -> TM: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitArea] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - surface_area = d.pop("surface_area", UNSET) - - type = d.pop("type", UNSET) - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - file_surface_area = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - output_unit= output_unit, - src_format= src_format, - started_at= started_at, - status= status, - surface_area= surface_area, - type= type, - updated_at= updated_at, - user_id= user_id, - ) - - file_surface_area.additional_properties = d - return file_surface_area - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - - - -BS = TypeVar("BS", bound="text_to_cad") + """A file surface area.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitArea] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + surface_area: Union[Unset, float] = UNSET + type: str = "file_surface_area" + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + surface_area = self.surface_area + type = self.type + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if src_format is not UNSET: + field_dict["src_format"] = src_format + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if surface_area is not UNSET: + field_dict["surface_area"] = surface_area + field_dict["type"] = type + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[AH], src_dict: Dict[str, Any]) -> AH: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitArea] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + surface_area = d.pop("surface_area", UNSET) + + type = d.pop("type", UNSET) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + file_surface_area = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + output_unit=output_unit, + src_format=src_format, + started_at=started_at, + status=status, + surface_area=surface_area, + type=type, + updated_at=updated_at, + user_id=user_id, + ) + + file_surface_area.additional_properties = d + return file_surface_area + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +EG = TypeVar("EG", bound="text_to_cad") + @attr.s(auto_attribs=True) class text_to_cad: - """ Text to CAD. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - feedback: Union[Unset, AiFeedback] = UNSET - id: Union[Unset, str] = UNSET - model_version: Union[Unset, str] = UNSET - output_format: Union[Unset, FileExportFormat] = UNSET - outputs: Union[Unset, Dict[str, Base64Data]] = UNSET - prompt: Union[Unset, str] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - type: str = "text_to_cad" - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - if not isinstance(self.feedback, Unset): - feedback = self.feedback - id = self.id - model_version = self.model_version - if not isinstance(self.output_format, Unset): - output_format = self.output_format - outputs: Union[Unset, Dict[str, str]] = UNSET - if not isinstance(self.outputs, Unset): - new_dict: Dict[str, str] = {} - for key, value in self.outputs.items(): - new_dict[key] = value.get_encoded() - outputs = new_dict - prompt = self.prompt - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - type = self.type - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if feedback is not UNSET: - field_dict['feedback'] = feedback - if id is not UNSET: - field_dict['id'] = id - if model_version is not UNSET: - field_dict['model_version'] = model_version - if output_format is not UNSET: - field_dict['output_format'] = output_format - if outputs is not UNSET: - field_dict['outputs'] = outputs - if prompt is not UNSET: - field_dict['prompt'] = prompt - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - field_dict['type'] = type - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[BS], src_dict: Dict[str, Any]) -> BS: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _feedback = d.pop("feedback", UNSET) - feedback: Union[Unset, AiFeedback] - if isinstance(_feedback, Unset): - feedback = UNSET - else: - feedback = _feedback # type: ignore[arg-type] - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - model_version = d.pop("model_version", UNSET) - - _output_format = d.pop("output_format", UNSET) - output_format: Union[Unset, FileExportFormat] - if isinstance(_output_format, Unset): - output_format = UNSET - else: - output_format = _output_format # type: ignore[arg-type] - - _outputs = d.pop("outputs", UNSET) - if isinstance(_outputs, Unset): - outputs = UNSET - else: - new_map: Dict[str, Base64Data] = {} - for k, v in _outputs.items(): - new_map[k] = Base64Data(bytes(v, 'utf-8')) - outputs = new_map # type: ignore - - prompt = d.pop("prompt", UNSET) - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - text_to_cad = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - feedback= feedback, - id= id, - model_version= model_version, - output_format= output_format, - outputs= outputs, - prompt= prompt, - started_at= started_at, - status= status, - type= type, - updated_at= updated_at, - user_id= user_id, - ) - - text_to_cad.additional_properties = d - return text_to_cad - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - -AsyncApiCallOutput = Union[file_conversion, file_center_of_mass, file_mass, file_volume, file_density, file_surface_area, text_to_cad] + """Text to CAD.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + feedback: Union[Unset, AiFeedback] = UNSET + id: Union[Unset, str] = UNSET + model_version: Union[Unset, str] = UNSET + output_format: Union[Unset, FileExportFormat] = UNSET + outputs: Union[Unset, Dict[str, Base64Data]] = UNSET + prompt: Union[Unset, str] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + type: str = "text_to_cad" + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + if not isinstance(self.feedback, Unset): + feedback = self.feedback + id = self.id + model_version = self.model_version + if not isinstance(self.output_format, Unset): + output_format = self.output_format + outputs: Union[Unset, Dict[str, str]] = UNSET + if not isinstance(self.outputs, Unset): + new_dict: Dict[str, str] = {} + for key, value in self.outputs.items(): + new_dict[key] = value.get_encoded() + outputs = new_dict + prompt = self.prompt + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + type = self.type + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if feedback is not UNSET: + field_dict["feedback"] = feedback + if id is not UNSET: + field_dict["id"] = id + if model_version is not UNSET: + field_dict["model_version"] = model_version + if output_format is not UNSET: + field_dict["output_format"] = output_format + if outputs is not UNSET: + field_dict["outputs"] = outputs + if prompt is not UNSET: + field_dict["prompt"] = prompt + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + field_dict["type"] = type + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[EG], src_dict: Dict[str, Any]) -> EG: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _feedback = d.pop("feedback", UNSET) + feedback: Union[Unset, AiFeedback] + if isinstance(_feedback, Unset): + feedback = UNSET + else: + feedback = _feedback # type: ignore[arg-type] + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + model_version = d.pop("model_version", UNSET) + + _output_format = d.pop("output_format", UNSET) + output_format: Union[Unset, FileExportFormat] + if isinstance(_output_format, Unset): + output_format = UNSET + else: + output_format = _output_format # type: ignore[arg-type] + + _outputs = d.pop("outputs", UNSET) + if isinstance(_outputs, Unset): + outputs = UNSET + else: + new_map: Dict[str, Base64Data] = {} + for k, v in _outputs.items(): + new_map[k] = Base64Data(bytes(v, "utf-8")) + outputs = new_map # type: ignore + + prompt = d.pop("prompt", UNSET) + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + text_to_cad = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + feedback=feedback, + id=id, + model_version=model_version, + output_format=output_format, + outputs=outputs, + prompt=prompt, + started_at=started_at, + status=status, + type=type, + updated_at=updated_at, + user_id=user_id, + ) + + text_to_cad.additional_properties = d + return text_to_cad + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +AsyncApiCallOutput = Union[ + file_conversion, + file_center_of_mass, + file_mass, + file_volume, + file_density, + file_surface_area, + text_to_cad, +] diff --git a/kittycad/models/async_api_call_results_page.py b/kittycad/models/async_api_call_results_page.py index 337de3746..7ff45a69a 100644 --- a/kittycad/models/async_api_call_results_page.py +++ b/kittycad/models/async_api_call_results_page.py @@ -4,63 +4,67 @@ from ..types import UNSET, Unset -AH = TypeVar("AH", bound="AsyncApiCallResultsPage") +JR = TypeVar("JR", bound="AsyncApiCallResultsPage") + @attr.s(auto_attribs=True) class AsyncApiCallResultsPage: - """ A single page of results """ # noqa: E501 - from ..models.async_api_call import AsyncApiCall - items: Union[Unset, List[AsyncApiCall]] = UNSET - next_page: Union[Unset, str] = UNSET + """A single page of results""" # noqa: E501 + + from ..models.async_api_call import AsyncApiCall + + items: Union[Unset, List[AsyncApiCall]] = UNSET + next_page: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + from ..models.async_api_call import AsyncApiCall - def to_dict(self) -> Dict[str, Any]: - from ..models.async_api_call import AsyncApiCall - items: Union[Unset, List[AsyncApiCall]] = UNSET - if not isinstance(self.items, Unset): - items = self.items - next_page = self.next_page + items: Union[Unset, List[AsyncApiCall]] = UNSET + if not isinstance(self.items, Unset): + items = self.items + next_page = self.next_page - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if items is not UNSET: - field_dict['items'] = items - if next_page is not UNSET: - field_dict['next_page'] = next_page + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if items is not UNSET: + field_dict["items"] = items + if next_page is not UNSET: + field_dict["next_page"] = next_page - return field_dict + return field_dict - @classmethod - def from_dict(cls: Type[AH], src_dict: Dict[str, Any]) -> AH: - d = src_dict.copy() - from ..models.async_api_call import AsyncApiCall - items = cast(List[AsyncApiCall], d.pop("items", UNSET)) + @classmethod + def from_dict(cls: Type[JR], src_dict: Dict[str, Any]) -> JR: + d = src_dict.copy() + from ..models.async_api_call import AsyncApiCall - next_page = d.pop("next_page", UNSET) + items = cast(List[AsyncApiCall], d.pop("items", UNSET)) + next_page = d.pop("next_page", UNSET) - async_api_call_results_page = cls( - items= items, - next_page= next_page, - ) + async_api_call_results_page = cls( + items=items, + next_page=next_page, + ) - async_api_call_results_page.additional_properties = d - return async_api_call_results_page + async_api_call_results_page.additional_properties = d + return async_api_call_results_page - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/async_api_call_type.py b/kittycad/models/async_api_call_type.py index a05b5435e..4a4c44563 100644 --- a/kittycad/models/async_api_call_type.py +++ b/kittycad/models/async_api_call_type.py @@ -2,21 +2,22 @@ class AsyncApiCallType(str, Enum): - """ The type of async API call. """ # noqa: E501 - """# File conversion. """ # noqa: E501 - FILE_CONVERSION = 'file_conversion' - """# File volume. """ # noqa: E501 - FILE_VOLUME = 'file_volume' - """# File center of mass. """ # noqa: E501 - FILE_CENTER_OF_MASS = 'file_center_of_mass' - """# File mass. """ # noqa: E501 - FILE_MASS = 'file_mass' - """# File density. """ # noqa: E501 - FILE_DENSITY = 'file_density' - """# File surface area. """ # noqa: E501 - FILE_SURFACE_AREA = 'file_surface_area' - """# Text to CAD. """ # noqa: E501 - TEXT_TO_CAD = 'text_to_cad' + """The type of async API call.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# File conversion. """ # noqa: E501 + FILE_CONVERSION = "file_conversion" + """# File volume. """ # noqa: E501 + FILE_VOLUME = "file_volume" + """# File center of mass. """ # noqa: E501 + FILE_CENTER_OF_MASS = "file_center_of_mass" + """# File mass. """ # noqa: E501 + FILE_MASS = "file_mass" + """# File density. """ # noqa: E501 + FILE_DENSITY = "file_density" + """# File surface area. """ # noqa: E501 + FILE_SURFACE_AREA = "file_surface_area" + """# Text to CAD. """ # noqa: E501 + TEXT_TO_CAD = "text_to_cad" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/axis.py b/kittycad/models/axis.py index 595ed4f03..e8d15f3f7 100644 --- a/kittycad/models/axis.py +++ b/kittycad/models/axis.py @@ -2,15 +2,17 @@ class Axis(str, Enum): - """ Co-ordinate axis specifier. + """Co-ordinate axis specifier. -See [cglearn.eu] for background reading. + See [cglearn.eu] for background reading. -[cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1 """ # noqa: E501 - """# 'Y' axis. """ # noqa: E501 - Y = 'y' - """# 'Z' axis. """ # noqa: E501 - Z = 'z' + [cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1 + """ # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# 'Y' axis. """ # noqa: E501 + Y = "y" + """# 'Z' axis. """ # noqa: E501 + Z = "z" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/axis_direction_pair.py b/kittycad/models/axis_direction_pair.py index 2401b5861..b496957c3 100644 --- a/kittycad/models/axis_direction_pair.py +++ b/kittycad/models/axis_direction_pair.py @@ -6,70 +6,71 @@ from ..models.direction import Direction from ..types import UNSET, Unset -EG = TypeVar("EG", bound="AxisDirectionPair") +LY = TypeVar("LY", bound="AxisDirectionPair") + @attr.s(auto_attribs=True) class AxisDirectionPair: - """ An [`Axis`] paired with a [`Direction`]. """ # noqa: E501 - axis: Union[Unset, Axis] = UNSET - direction: Union[Unset, Direction] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.axis, Unset): - axis = self.axis - if not isinstance(self.direction, Unset): - direction = self.direction - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if axis is not UNSET: - field_dict['axis'] = axis - if direction is not UNSET: - field_dict['direction'] = direction - - return field_dict - - @classmethod - def from_dict(cls: Type[EG], src_dict: Dict[str, Any]) -> EG: - d = src_dict.copy() - _axis = d.pop("axis", UNSET) - axis: Union[Unset, Axis] - if isinstance(_axis, Unset): - axis = UNSET - else: - axis = _axis # type: ignore[arg-type] - - _direction = d.pop("direction", UNSET) - direction: Union[Unset, Direction] - if isinstance(_direction, Unset): - direction = UNSET - else: - direction = _direction # type: ignore[arg-type] - - - axis_direction_pair = cls( - axis= axis, - direction= direction, - ) - - axis_direction_pair.additional_properties = d - return axis_direction_pair - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """An [`Axis`] paired with a [`Direction`].""" # noqa: E501 + + axis: Union[Unset, Axis] = UNSET + direction: Union[Unset, Direction] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.axis, Unset): + axis = self.axis + if not isinstance(self.direction, Unset): + direction = self.direction + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if axis is not UNSET: + field_dict["axis"] = axis + if direction is not UNSET: + field_dict["direction"] = direction + + return field_dict + + @classmethod + def from_dict(cls: Type[LY], src_dict: Dict[str, Any]) -> LY: + d = src_dict.copy() + _axis = d.pop("axis", UNSET) + axis: Union[Unset, Axis] + if isinstance(_axis, Unset): + axis = UNSET + else: + axis = _axis # type: ignore[arg-type] + + _direction = d.pop("direction", UNSET) + direction: Union[Unset, Direction] + if isinstance(_direction, Unset): + direction = UNSET + else: + direction = _direction # type: ignore[arg-type] + + axis_direction_pair = cls( + axis=axis, + direction=direction, + ) + + axis_direction_pair.additional_properties = d + return axis_direction_pair + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/billing_info.py b/kittycad/models/billing_info.py index 311055141..d55e80961 100644 --- a/kittycad/models/billing_info.py +++ b/kittycad/models/billing_info.py @@ -5,71 +5,72 @@ from ..models.new_address import NewAddress from ..types import UNSET, Unset -JR = TypeVar("JR", bound="BillingInfo") +HK = TypeVar("HK", bound="BillingInfo") + @attr.s(auto_attribs=True) class BillingInfo: - """ The billing information for payments. """ # noqa: E501 - address: Union[Unset, NewAddress] = UNSET - name: Union[Unset, str] = UNSET - phone: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.address, Unset): - address = self.address - name = self.name - phone = self.phone - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if address is not UNSET: - field_dict['address'] = address - if name is not UNSET: - field_dict['name'] = name - if phone is not UNSET: - field_dict['phone'] = phone - - return field_dict - - @classmethod - def from_dict(cls: Type[JR], src_dict: Dict[str, Any]) -> JR: - d = src_dict.copy() - _address = d.pop("address", UNSET) - address: Union[Unset, NewAddress] - if isinstance(_address, Unset): - address = UNSET - else: - address = _address # type: ignore[arg-type] - - name = d.pop("name", UNSET) - - phone = d.pop("phone", UNSET) - - - billing_info = cls( - address= address, - name= name, - phone= phone, - ) - - billing_info.additional_properties = d - return billing_info - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """The billing information for payments.""" # noqa: E501 + + address: Union[Unset, NewAddress] = UNSET + name: Union[Unset, str] = UNSET + phone: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.address, Unset): + address = self.address + name = self.name + phone = self.phone + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address is not UNSET: + field_dict["address"] = address + if name is not UNSET: + field_dict["name"] = name + if phone is not UNSET: + field_dict["phone"] = phone + + return field_dict + + @classmethod + def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK: + d = src_dict.copy() + _address = d.pop("address", UNSET) + address: Union[Unset, NewAddress] + if isinstance(_address, Unset): + address = UNSET + else: + address = _address # type: ignore[arg-type] + + name = d.pop("name", UNSET) + + phone = d.pop("phone", UNSET) + + billing_info = cls( + address=address, + name=name, + phone=phone, + ) + + billing_info.additional_properties = d + return billing_info + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/cache_metadata.py b/kittycad/models/cache_metadata.py index 688bdc0c2..f6c7e90f7 100644 --- a/kittycad/models/cache_metadata.py +++ b/kittycad/models/cache_metadata.py @@ -4,53 +4,54 @@ from ..types import UNSET, Unset -LY = TypeVar("LY", bound="CacheMetadata") +VR = TypeVar("VR", bound="CacheMetadata") + @attr.s(auto_attribs=True) class CacheMetadata: - """ Metadata about our cache. + """Metadata about our cache. -This is mostly used for internal purposes and debugging. """ # noqa: E501 - ok: Union[Unset, bool] = False + This is mostly used for internal purposes and debugging.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + ok: Union[Unset, bool] = False - def to_dict(self) -> Dict[str, Any]: - ok = self.ok + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if ok is not UNSET: - field_dict['ok'] = ok + def to_dict(self) -> Dict[str, Any]: + ok = self.ok - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if ok is not UNSET: + field_dict["ok"] = ok - @classmethod - def from_dict(cls: Type[LY], src_dict: Dict[str, Any]) -> LY: - d = src_dict.copy() - ok = d.pop("ok", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR: + d = src_dict.copy() + ok = d.pop("ok", UNSET) - cache_metadata = cls( - ok= ok, - ) + cache_metadata = cls( + ok=ok, + ) - cache_metadata.additional_properties = d - return cache_metadata + cache_metadata.additional_properties = d + return cache_metadata - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/camera_drag_interaction_type.py b/kittycad/models/camera_drag_interaction_type.py index 186cc0e7d..9de78e7fc 100644 --- a/kittycad/models/camera_drag_interaction_type.py +++ b/kittycad/models/camera_drag_interaction_type.py @@ -2,13 +2,14 @@ class CameraDragInteractionType(str, Enum): - """ The type of camera drag interaction. """ # noqa: E501 - """# Camera pan """ # noqa: E501 - PAN = 'pan' - """# Camera rotate (revolve/orbit) """ # noqa: E501 - ROTATE = 'rotate' - """# Camera zoom (increase or decrease distance to reference point center) """ # noqa: E501 - ZOOM = 'zoom' - - def __str__(self) -> str: - return str(self.value) + """The type of camera drag interaction.""" # noqa: E501 + + """# Camera pan """ # noqa: E501 + PAN = "pan" + """# Camera rotate (revolve/orbit) """ # noqa: E501 + ROTATE = "rotate" + """# Camera zoom (increase or decrease distance to reference point center) """ # noqa: E501 + ZOOM = "zoom" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/card_details.py b/kittycad/models/card_details.py index 4dfbd6b08..58d92aedd 100644 --- a/kittycad/models/card_details.py +++ b/kittycad/models/card_details.py @@ -5,106 +5,107 @@ from ..models.payment_method_card_checks import PaymentMethodCardChecks from ..types import UNSET, Unset -HK = TypeVar("HK", bound="CardDetails") +ON = TypeVar("ON", bound="CardDetails") + @attr.s(auto_attribs=True) class CardDetails: - """ The card details of a payment method. """ # noqa: E501 - brand: Union[Unset, str] = UNSET - checks: Union[Unset, PaymentMethodCardChecks] = UNSET - country: Union[Unset, str] = UNSET - exp_month: Union[Unset, int] = UNSET - exp_year: Union[Unset, int] = UNSET - fingerprint: Union[Unset, str] = UNSET - funding: Union[Unset, str] = UNSET - last4: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - brand = self.brand - if not isinstance(self.checks, Unset): - checks = self.checks - country = self.country - exp_month = self.exp_month - exp_year = self.exp_year - fingerprint = self.fingerprint - funding = self.funding - last4 = self.last4 - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if brand is not UNSET: - field_dict['brand'] = brand - if checks is not UNSET: - field_dict['checks'] = checks - if country is not UNSET: - field_dict['country'] = country - if exp_month is not UNSET: - field_dict['exp_month'] = exp_month - if exp_year is not UNSET: - field_dict['exp_year'] = exp_year - if fingerprint is not UNSET: - field_dict['fingerprint'] = fingerprint - if funding is not UNSET: - field_dict['funding'] = funding - if last4 is not UNSET: - field_dict['last4'] = last4 - - return field_dict - - @classmethod - def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK: - d = src_dict.copy() - brand = d.pop("brand", UNSET) - - _checks = d.pop("checks", UNSET) - checks: Union[Unset, PaymentMethodCardChecks] - if isinstance(_checks, Unset): - checks = UNSET - else: - checks = _checks # type: ignore[arg-type] - - country = d.pop("country", UNSET) - - exp_month = d.pop("exp_month", UNSET) - - exp_year = d.pop("exp_year", UNSET) - - fingerprint = d.pop("fingerprint", UNSET) - - funding = d.pop("funding", UNSET) - - last4 = d.pop("last4", UNSET) - - - card_details = cls( - brand= brand, - checks= checks, - country= country, - exp_month= exp_month, - exp_year= exp_year, - fingerprint= fingerprint, - funding= funding, - last4= last4, - ) - - card_details.additional_properties = d - return card_details - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """The card details of a payment method.""" # noqa: E501 + + brand: Union[Unset, str] = UNSET + checks: Union[Unset, PaymentMethodCardChecks] = UNSET + country: Union[Unset, str] = UNSET + exp_month: Union[Unset, int] = UNSET + exp_year: Union[Unset, int] = UNSET + fingerprint: Union[Unset, str] = UNSET + funding: Union[Unset, str] = UNSET + last4: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + brand = self.brand + if not isinstance(self.checks, Unset): + checks = self.checks + country = self.country + exp_month = self.exp_month + exp_year = self.exp_year + fingerprint = self.fingerprint + funding = self.funding + last4 = self.last4 + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if brand is not UNSET: + field_dict["brand"] = brand + if checks is not UNSET: + field_dict["checks"] = checks + if country is not UNSET: + field_dict["country"] = country + if exp_month is not UNSET: + field_dict["exp_month"] = exp_month + if exp_year is not UNSET: + field_dict["exp_year"] = exp_year + if fingerprint is not UNSET: + field_dict["fingerprint"] = fingerprint + if funding is not UNSET: + field_dict["funding"] = funding + if last4 is not UNSET: + field_dict["last4"] = last4 + + return field_dict + + @classmethod + def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON: + d = src_dict.copy() + brand = d.pop("brand", UNSET) + + _checks = d.pop("checks", UNSET) + checks: Union[Unset, PaymentMethodCardChecks] + if isinstance(_checks, Unset): + checks = UNSET + else: + checks = _checks # type: ignore[arg-type] + + country = d.pop("country", UNSET) + + exp_month = d.pop("exp_month", UNSET) + + exp_year = d.pop("exp_year", UNSET) + + fingerprint = d.pop("fingerprint", UNSET) + + funding = d.pop("funding", UNSET) + + last4 = d.pop("last4", UNSET) + + card_details = cls( + brand=brand, + checks=checks, + country=country, + exp_month=exp_month, + exp_year=exp_year, + fingerprint=fingerprint, + funding=funding, + last4=last4, + ) + + card_details.additional_properties = d + return card_details + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/center_of_mass.py b/kittycad/models/center_of_mass.py index 64ca7bba0..2d5147597 100644 --- a/kittycad/models/center_of_mass.py +++ b/kittycad/models/center_of_mass.py @@ -6,70 +6,71 @@ from ..models.unit_length import UnitLength from ..types import UNSET, Unset -VR = TypeVar("VR", bound="CenterOfMass") +PC = TypeVar("PC", bound="CenterOfMass") + @attr.s(auto_attribs=True) class CenterOfMass: - """ The center of mass response. """ # noqa: E501 - center_of_mass: Union[Unset, Point3d] = UNSET - output_unit: Union[Unset, UnitLength] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.center_of_mass, Unset): - center_of_mass = self.center_of_mass - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if center_of_mass is not UNSET: - field_dict['center_of_mass'] = center_of_mass - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - - return field_dict - - @classmethod - def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR: - d = src_dict.copy() - _center_of_mass = d.pop("center_of_mass", UNSET) - center_of_mass: Union[Unset, Point3d] - if isinstance(_center_of_mass, Unset): - center_of_mass = UNSET - else: - center_of_mass = _center_of_mass # type: ignore[arg-type] - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitLength] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - - center_of_mass = cls( - center_of_mass= center_of_mass, - output_unit= output_unit, - ) - - center_of_mass.additional_properties = d - return center_of_mass - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """The center of mass response.""" # noqa: E501 + + center_of_mass: Union[Unset, Point3d] = UNSET + output_unit: Union[Unset, UnitLength] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.center_of_mass, Unset): + center_of_mass = self.center_of_mass + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if center_of_mass is not UNSET: + field_dict["center_of_mass"] = center_of_mass + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + + return field_dict + + @classmethod + def from_dict(cls: Type[PC], src_dict: Dict[str, Any]) -> PC: + d = src_dict.copy() + _center_of_mass = d.pop("center_of_mass", UNSET) + center_of_mass: Union[Unset, Point3d] + if isinstance(_center_of_mass, Unset): + center_of_mass = UNSET + else: + center_of_mass = _center_of_mass # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitLength] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + center_of_mass = cls( + center_of_mass=center_of_mass, + output_unit=output_unit, + ) + + center_of_mass.additional_properties = d + return center_of_mass + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/client_metrics.py b/kittycad/models/client_metrics.py index c214dae01..55a161e7d 100644 --- a/kittycad/models/client_metrics.py +++ b/kittycad/models/client_metrics.py @@ -4,100 +4,103 @@ from ..types import UNSET, Unset -ON = TypeVar("ON", bound="ClientMetrics") +US = TypeVar("US", bound="ClientMetrics") + @attr.s(auto_attribs=True) class ClientMetrics: - """ ClientMetrics contains information regarding the state of the peer. """ # noqa: E501 - rtc_frames_decoded: Union[Unset, int] = UNSET - rtc_frames_dropped: Union[Unset, int] = UNSET - rtc_frames_per_second: Union[Unset, int] = UNSET - rtc_frames_received: Union[Unset, int] = UNSET - rtc_freeze_count: Union[Unset, int] = UNSET - rtc_jitter_sec: Union[Unset, float] = UNSET - rtc_keyframes_decoded: Union[Unset, int] = UNSET - rtc_total_freezes_duration_sec: Union[Unset, float] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - rtc_frames_decoded = self.rtc_frames_decoded - rtc_frames_dropped = self.rtc_frames_dropped - rtc_frames_per_second = self.rtc_frames_per_second - rtc_frames_received = self.rtc_frames_received - rtc_freeze_count = self.rtc_freeze_count - rtc_jitter_sec = self.rtc_jitter_sec - rtc_keyframes_decoded = self.rtc_keyframes_decoded - rtc_total_freezes_duration_sec = self.rtc_total_freezes_duration_sec - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if rtc_frames_decoded is not UNSET: - field_dict['rtc_frames_decoded'] = rtc_frames_decoded - if rtc_frames_dropped is not UNSET: - field_dict['rtc_frames_dropped'] = rtc_frames_dropped - if rtc_frames_per_second is not UNSET: - field_dict['rtc_frames_per_second'] = rtc_frames_per_second - if rtc_frames_received is not UNSET: - field_dict['rtc_frames_received'] = rtc_frames_received - if rtc_freeze_count is not UNSET: - field_dict['rtc_freeze_count'] = rtc_freeze_count - if rtc_jitter_sec is not UNSET: - field_dict['rtc_jitter_sec'] = rtc_jitter_sec - if rtc_keyframes_decoded is not UNSET: - field_dict['rtc_keyframes_decoded'] = rtc_keyframes_decoded - if rtc_total_freezes_duration_sec is not UNSET: - field_dict['rtc_total_freezes_duration_sec'] = rtc_total_freezes_duration_sec - - return field_dict - - @classmethod - def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON: - d = src_dict.copy() - rtc_frames_decoded = d.pop("rtc_frames_decoded", UNSET) - - rtc_frames_dropped = d.pop("rtc_frames_dropped", UNSET) - - rtc_frames_per_second = d.pop("rtc_frames_per_second", UNSET) - - rtc_frames_received = d.pop("rtc_frames_received", UNSET) - - rtc_freeze_count = d.pop("rtc_freeze_count", UNSET) - - rtc_jitter_sec = d.pop("rtc_jitter_sec", UNSET) - - rtc_keyframes_decoded = d.pop("rtc_keyframes_decoded", UNSET) - - rtc_total_freezes_duration_sec = d.pop("rtc_total_freezes_duration_sec", UNSET) - - - client_metrics = cls( - rtc_frames_decoded= rtc_frames_decoded, - rtc_frames_dropped= rtc_frames_dropped, - rtc_frames_per_second= rtc_frames_per_second, - rtc_frames_received= rtc_frames_received, - rtc_freeze_count= rtc_freeze_count, - rtc_jitter_sec= rtc_jitter_sec, - rtc_keyframes_decoded= rtc_keyframes_decoded, - rtc_total_freezes_duration_sec= rtc_total_freezes_duration_sec, - ) - - client_metrics.additional_properties = d - return client_metrics - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """ClientMetrics contains information regarding the state of the peer.""" # noqa: E501 + + rtc_frames_decoded: Union[Unset, int] = UNSET + rtc_frames_dropped: Union[Unset, int] = UNSET + rtc_frames_per_second: Union[Unset, int] = UNSET + rtc_frames_received: Union[Unset, int] = UNSET + rtc_freeze_count: Union[Unset, int] = UNSET + rtc_jitter_sec: Union[Unset, float] = UNSET + rtc_keyframes_decoded: Union[Unset, int] = UNSET + rtc_total_freezes_duration_sec: Union[Unset, float] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + rtc_frames_decoded = self.rtc_frames_decoded + rtc_frames_dropped = self.rtc_frames_dropped + rtc_frames_per_second = self.rtc_frames_per_second + rtc_frames_received = self.rtc_frames_received + rtc_freeze_count = self.rtc_freeze_count + rtc_jitter_sec = self.rtc_jitter_sec + rtc_keyframes_decoded = self.rtc_keyframes_decoded + rtc_total_freezes_duration_sec = self.rtc_total_freezes_duration_sec + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if rtc_frames_decoded is not UNSET: + field_dict["rtc_frames_decoded"] = rtc_frames_decoded + if rtc_frames_dropped is not UNSET: + field_dict["rtc_frames_dropped"] = rtc_frames_dropped + if rtc_frames_per_second is not UNSET: + field_dict["rtc_frames_per_second"] = rtc_frames_per_second + if rtc_frames_received is not UNSET: + field_dict["rtc_frames_received"] = rtc_frames_received + if rtc_freeze_count is not UNSET: + field_dict["rtc_freeze_count"] = rtc_freeze_count + if rtc_jitter_sec is not UNSET: + field_dict["rtc_jitter_sec"] = rtc_jitter_sec + if rtc_keyframes_decoded is not UNSET: + field_dict["rtc_keyframes_decoded"] = rtc_keyframes_decoded + if rtc_total_freezes_duration_sec is not UNSET: + field_dict[ + "rtc_total_freezes_duration_sec" + ] = rtc_total_freezes_duration_sec + + return field_dict + + @classmethod + def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US: + d = src_dict.copy() + rtc_frames_decoded = d.pop("rtc_frames_decoded", UNSET) + + rtc_frames_dropped = d.pop("rtc_frames_dropped", UNSET) + + rtc_frames_per_second = d.pop("rtc_frames_per_second", UNSET) + + rtc_frames_received = d.pop("rtc_frames_received", UNSET) + + rtc_freeze_count = d.pop("rtc_freeze_count", UNSET) + + rtc_jitter_sec = d.pop("rtc_jitter_sec", UNSET) + + rtc_keyframes_decoded = d.pop("rtc_keyframes_decoded", UNSET) + + rtc_total_freezes_duration_sec = d.pop("rtc_total_freezes_duration_sec", UNSET) + + client_metrics = cls( + rtc_frames_decoded=rtc_frames_decoded, + rtc_frames_dropped=rtc_frames_dropped, + rtc_frames_per_second=rtc_frames_per_second, + rtc_frames_received=rtc_frames_received, + rtc_freeze_count=rtc_freeze_count, + rtc_jitter_sec=rtc_jitter_sec, + rtc_keyframes_decoded=rtc_keyframes_decoded, + rtc_total_freezes_duration_sec=rtc_total_freezes_duration_sec, + ) + + client_metrics.additional_properties = d + return client_metrics + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/cluster.py b/kittycad/models/cluster.py index 294945275..62334c1ea 100644 --- a/kittycad/models/cluster.py +++ b/kittycad/models/cluster.py @@ -4,88 +4,89 @@ from ..types import UNSET, Unset -PC = TypeVar("PC", bound="Cluster") +KQ = TypeVar("KQ", bound="Cluster") + @attr.s(auto_attribs=True) class Cluster: - """ Cluster information. """ # noqa: E501 - addr: Union[Unset, str] = UNSET - auth_timeout: Union[Unset, int] = UNSET - cluster_port: Union[Unset, int] = UNSET - name: Union[Unset, str] = UNSET - tls_timeout: Union[Unset, int] = UNSET - urls: Union[Unset, List[str]] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - addr = self.addr - auth_timeout = self.auth_timeout - cluster_port = self.cluster_port - name = self.name - tls_timeout = self.tls_timeout - urls: Union[Unset, List[str]] = UNSET - if not isinstance(self.urls, Unset): - urls = self.urls - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if addr is not UNSET: - field_dict['addr'] = addr - if auth_timeout is not UNSET: - field_dict['auth_timeout'] = auth_timeout - if cluster_port is not UNSET: - field_dict['cluster_port'] = cluster_port - if name is not UNSET: - field_dict['name'] = name - if tls_timeout is not UNSET: - field_dict['tls_timeout'] = tls_timeout - if urls is not UNSET: - field_dict['urls'] = urls - - return field_dict - - @classmethod - def from_dict(cls: Type[PC], src_dict: Dict[str, Any]) -> PC: - d = src_dict.copy() - addr = d.pop("addr", UNSET) - - auth_timeout = d.pop("auth_timeout", UNSET) - - cluster_port = d.pop("cluster_port", UNSET) - - name = d.pop("name", UNSET) - - tls_timeout = d.pop("tls_timeout", UNSET) - - urls = cast(List[str], d.pop("urls", UNSET)) - - - cluster = cls( - addr= addr, - auth_timeout= auth_timeout, - cluster_port= cluster_port, - name= name, - tls_timeout= tls_timeout, - urls= urls, - ) - - cluster.additional_properties = d - return cluster - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Cluster information.""" # noqa: E501 + + addr: Union[Unset, str] = UNSET + auth_timeout: Union[Unset, int] = UNSET + cluster_port: Union[Unset, int] = UNSET + name: Union[Unset, str] = UNSET + tls_timeout: Union[Unset, int] = UNSET + urls: Union[Unset, List[str]] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + addr = self.addr + auth_timeout = self.auth_timeout + cluster_port = self.cluster_port + name = self.name + tls_timeout = self.tls_timeout + urls: Union[Unset, List[str]] = UNSET + if not isinstance(self.urls, Unset): + urls = self.urls + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if addr is not UNSET: + field_dict["addr"] = addr + if auth_timeout is not UNSET: + field_dict["auth_timeout"] = auth_timeout + if cluster_port is not UNSET: + field_dict["cluster_port"] = cluster_port + if name is not UNSET: + field_dict["name"] = name + if tls_timeout is not UNSET: + field_dict["tls_timeout"] = tls_timeout + if urls is not UNSET: + field_dict["urls"] = urls + + return field_dict + + @classmethod + def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ: + d = src_dict.copy() + addr = d.pop("addr", UNSET) + + auth_timeout = d.pop("auth_timeout", UNSET) + + cluster_port = d.pop("cluster_port", UNSET) + + name = d.pop("name", UNSET) + + tls_timeout = d.pop("tls_timeout", UNSET) + + urls = cast(List[str], d.pop("urls", UNSET)) + + cluster = cls( + addr=addr, + auth_timeout=auth_timeout, + cluster_port=cluster_port, + name=name, + tls_timeout=tls_timeout, + urls=urls, + ) + + cluster.additional_properties = d + return cluster + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/code_language.py b/kittycad/models/code_language.py index 29527e01d..43088c5c3 100644 --- a/kittycad/models/code_language.py +++ b/kittycad/models/code_language.py @@ -2,13 +2,14 @@ class CodeLanguage(str, Enum): - """ The language code is written in. """ # noqa: E501 - """# The `go` programming language. """ # noqa: E501 - GO = 'go' - """# The `python` programming language. """ # noqa: E501 - PYTHON = 'python' - """# The `node` programming language. """ # noqa: E501 - NODE = 'node' - - def __str__(self) -> str: - return str(self.value) + """The language code is written in.""" # noqa: E501 + + """# The `go` programming language. """ # noqa: E501 + GO = "go" + """# The `python` programming language. """ # noqa: E501 + PYTHON = "python" + """# The `node` programming language. """ # noqa: E501 + NODE = "node" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/code_output.py b/kittycad/models/code_output.py index 9aeccf7ee..ec5c21977 100644 --- a/kittycad/models/code_output.py +++ b/kittycad/models/code_output.py @@ -4,70 +4,74 @@ from ..types import UNSET, Unset -US = TypeVar("US", bound="CodeOutput") +FH = TypeVar("FH", bound="CodeOutput") + @attr.s(auto_attribs=True) class CodeOutput: - """ Output of the code being executed. """ # noqa: E501 - from ..models.output_file import OutputFile - output_files: Union[Unset, List[OutputFile]] = UNSET - stderr: Union[Unset, str] = UNSET - stdout: Union[Unset, str] = UNSET + """Output of the code being executed.""" # noqa: E501 + + from ..models.output_file import OutputFile + + output_files: Union[Unset, List[OutputFile]] = UNSET + stderr: Union[Unset, str] = UNSET + stdout: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + from ..models.output_file import OutputFile - def to_dict(self) -> Dict[str, Any]: - from ..models.output_file import OutputFile - output_files: Union[Unset, List[OutputFile]] = UNSET - if not isinstance(self.output_files, Unset): - output_files = self.output_files - stderr = self.stderr - stdout = self.stdout + output_files: Union[Unset, List[OutputFile]] = UNSET + if not isinstance(self.output_files, Unset): + output_files = self.output_files + stderr = self.stderr + stdout = self.stdout - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if output_files is not UNSET: - field_dict['output_files'] = output_files - if stderr is not UNSET: - field_dict['stderr'] = stderr - if stdout is not UNSET: - field_dict['stdout'] = stdout + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if output_files is not UNSET: + field_dict["output_files"] = output_files + if stderr is not UNSET: + field_dict["stderr"] = stderr + if stdout is not UNSET: + field_dict["stdout"] = stdout - return field_dict + return field_dict - @classmethod - def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US: - d = src_dict.copy() - from ..models.output_file import OutputFile - output_files = cast(List[OutputFile], d.pop("output_files", UNSET)) + @classmethod + def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH: + d = src_dict.copy() + from ..models.output_file import OutputFile - stderr = d.pop("stderr", UNSET) + output_files = cast(List[OutputFile], d.pop("output_files", UNSET)) - stdout = d.pop("stdout", UNSET) + stderr = d.pop("stderr", UNSET) + stdout = d.pop("stdout", UNSET) - code_output = cls( - output_files= output_files, - stderr= stderr, - stdout= stdout, - ) + code_output = cls( + output_files=output_files, + stderr=stderr, + stdout=stdout, + ) - code_output.additional_properties = d - return code_output + code_output.additional_properties = d + return code_output - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/color.py b/kittycad/models/color.py index ac8353639..8201f62d2 100644 --- a/kittycad/models/color.py +++ b/kittycad/models/color.py @@ -4,72 +4,73 @@ from ..types import UNSET, Unset -KQ = TypeVar("KQ", bound="Color") +NH = TypeVar("NH", bound="Color") + @attr.s(auto_attribs=True) class Color: - """ An RGBA color """ # noqa: E501 - a: Union[Unset, float] = UNSET - b: Union[Unset, float] = UNSET - g: Union[Unset, float] = UNSET - r: Union[Unset, float] = UNSET + """An RGBA color""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + a: Union[Unset, float] = UNSET + b: Union[Unset, float] = UNSET + g: Union[Unset, float] = UNSET + r: Union[Unset, float] = UNSET - def to_dict(self) -> Dict[str, Any]: - a = self.a - b = self.b - g = self.g - r = self.r + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if a is not UNSET: - field_dict['a'] = a - if b is not UNSET: - field_dict['b'] = b - if g is not UNSET: - field_dict['g'] = g - if r is not UNSET: - field_dict['r'] = r + def to_dict(self) -> Dict[str, Any]: + a = self.a + b = self.b + g = self.g + r = self.r - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if a is not UNSET: + field_dict["a"] = a + if b is not UNSET: + field_dict["b"] = b + if g is not UNSET: + field_dict["g"] = g + if r is not UNSET: + field_dict["r"] = r - @classmethod - def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ: - d = src_dict.copy() - a = d.pop("a", UNSET) + return field_dict - b = d.pop("b", UNSET) + @classmethod + def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH: + d = src_dict.copy() + a = d.pop("a", UNSET) - g = d.pop("g", UNSET) + b = d.pop("b", UNSET) - r = d.pop("r", UNSET) + g = d.pop("g", UNSET) + r = d.pop("r", UNSET) - color = cls( - a= a, - b= b, - g= g, - r= r, - ) + color = cls( + a=a, + b=b, + g=g, + r=r, + ) - color.additional_properties = d - return color + color.additional_properties = d + return color - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/connection.py b/kittycad/models/connection.py index a196e9236..b29744016 100644 --- a/kittycad/models/connection.py +++ b/kittycad/models/connection.py @@ -10,414 +10,415 @@ from ..models.leaf_node import LeafNode from ..types import UNSET, Unset -FH = TypeVar("FH", bound="Connection") +BB = TypeVar("BB", bound="Connection") + @attr.s(auto_attribs=True) class Connection: - """ Metadata about a pub-sub connection. - -This is mostly used for internal purposes and debugging. """ # noqa: E501 - auth_timeout: Union[Unset, int] = UNSET - cluster: Union[Unset, Cluster] = UNSET - config_load_time: Union[Unset, datetime.datetime] = UNSET - connections: Union[Unset, int] = UNSET - cores: Union[Unset, int] = UNSET - cpu: Union[Unset, float] = UNSET - gateway: Union[Unset, Gateway] = UNSET - git_commit: Union[Unset, str] = UNSET - go: Union[Unset, str] = UNSET - gomaxprocs: Union[Unset, int] = UNSET - host: Union[Unset, str] = UNSET - http_base_path: Union[Unset, str] = UNSET - http_host: Union[Unset, str] = UNSET - http_port: Union[Unset, int] = UNSET - http_req_stats: Union[Unset, Dict[str, int]] = UNSET - https_port: Union[Unset, int] = UNSET - in_bytes: Union[Unset, int] = UNSET - in_msgs: Union[Unset, int] = UNSET - jetstream: Union[Unset, Jetstream] = UNSET - leaf: Union[Unset, LeafNode] = UNSET - leafnodes: Union[Unset, int] = UNSET - max_connections: Union[Unset, int] = UNSET - max_control_line: Union[Unset, int] = UNSET - max_payload: Union[Unset, int] = UNSET - max_pending: Union[Unset, int] = UNSET - mem: Union[Unset, int] = UNSET - now: Union[Unset, datetime.datetime] = UNSET - out_bytes: Union[Unset, int] = UNSET - out_msgs: Union[Unset, int] = UNSET - ping_interval: Union[Unset, int] = UNSET - ping_max: Union[Unset, int] = UNSET - port: Union[Unset, int] = UNSET - proto: Union[Unset, int] = UNSET - remotes: Union[Unset, int] = UNSET - routes: Union[Unset, int] = UNSET - server_id: Union[Unset, str] = UNSET - server_name: Union[Unset, str] = UNSET - slow_consumers: Union[Unset, int] = UNSET - start: Union[Unset, datetime.datetime] = UNSET - subscriptions: Union[Unset, int] = UNSET - system_account: Union[Unset, str] = UNSET - tls_timeout: Union[Unset, int] = UNSET - total_connections: Union[Unset, int] = UNSET - uptime: Union[Unset, str] = UNSET - version: Union[Unset, str] = UNSET - write_deadline: Union[Unset, int] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - auth_timeout = self.auth_timeout - if not isinstance(self.cluster, Unset): - cluster = self.cluster - config_load_time: Union[Unset, str] = UNSET - if not isinstance(self.config_load_time, Unset): - config_load_time = self.config_load_time.isoformat() - connections = self.connections - cores = self.cores - cpu = self.cpu - if not isinstance(self.gateway, Unset): - gateway = self.gateway - git_commit = self.git_commit - go = self.go - gomaxprocs = self.gomaxprocs - host = self.host - http_base_path = self.http_base_path - http_host = self.http_host - http_port = self.http_port - http_req_stats = self.http_req_stats - - https_port = self.https_port - in_bytes = self.in_bytes - in_msgs = self.in_msgs - if not isinstance(self.jetstream, Unset): - jetstream = self.jetstream - if not isinstance(self.leaf, Unset): - leaf = self.leaf - leafnodes = self.leafnodes - max_connections = self.max_connections - max_control_line = self.max_control_line - max_payload = self.max_payload - max_pending = self.max_pending - mem = self.mem - now: Union[Unset, str] = UNSET - if not isinstance(self.now, Unset): - now = self.now.isoformat() - out_bytes = self.out_bytes - out_msgs = self.out_msgs - ping_interval = self.ping_interval - ping_max = self.ping_max - port = self.port - proto = self.proto - remotes = self.remotes - routes = self.routes - server_id = self.server_id - server_name = self.server_name - slow_consumers = self.slow_consumers - start: Union[Unset, str] = UNSET - if not isinstance(self.start, Unset): - start = self.start.isoformat() - subscriptions = self.subscriptions - system_account = self.system_account - tls_timeout = self.tls_timeout - total_connections = self.total_connections - uptime = self.uptime - version = self.version - write_deadline = self.write_deadline - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if auth_timeout is not UNSET: - field_dict['auth_timeout'] = auth_timeout - if cluster is not UNSET: - field_dict['cluster'] = cluster - if config_load_time is not UNSET: - field_dict['config_load_time'] = config_load_time - if connections is not UNSET: - field_dict['connections'] = connections - if cores is not UNSET: - field_dict['cores'] = cores - if cpu is not UNSET: - field_dict['cpu'] = cpu - if gateway is not UNSET: - field_dict['gateway'] = gateway - if git_commit is not UNSET: - field_dict['git_commit'] = git_commit - if go is not UNSET: - field_dict['go'] = go - if gomaxprocs is not UNSET: - field_dict['gomaxprocs'] = gomaxprocs - if host is not UNSET: - field_dict['host'] = host - if http_base_path is not UNSET: - field_dict['http_base_path'] = http_base_path - if http_host is not UNSET: - field_dict['http_host'] = http_host - if http_port is not UNSET: - field_dict['http_port'] = http_port - if http_req_stats is not UNSET: - field_dict['http_req_stats'] = http_req_stats - if https_port is not UNSET: - field_dict['https_port'] = https_port - if in_bytes is not UNSET: - field_dict['in_bytes'] = in_bytes - if in_msgs is not UNSET: - field_dict['in_msgs'] = in_msgs - if jetstream is not UNSET: - field_dict['jetstream'] = jetstream - if leaf is not UNSET: - field_dict['leaf'] = leaf - if leafnodes is not UNSET: - field_dict['leafnodes'] = leafnodes - if max_connections is not UNSET: - field_dict['max_connections'] = max_connections - if max_control_line is not UNSET: - field_dict['max_control_line'] = max_control_line - if max_payload is not UNSET: - field_dict['max_payload'] = max_payload - if max_pending is not UNSET: - field_dict['max_pending'] = max_pending - if mem is not UNSET: - field_dict['mem'] = mem - if now is not UNSET: - field_dict['now'] = now - if out_bytes is not UNSET: - field_dict['out_bytes'] = out_bytes - if out_msgs is not UNSET: - field_dict['out_msgs'] = out_msgs - if ping_interval is not UNSET: - field_dict['ping_interval'] = ping_interval - if ping_max is not UNSET: - field_dict['ping_max'] = ping_max - if port is not UNSET: - field_dict['port'] = port - if proto is not UNSET: - field_dict['proto'] = proto - if remotes is not UNSET: - field_dict['remotes'] = remotes - if routes is not UNSET: - field_dict['routes'] = routes - if server_id is not UNSET: - field_dict['server_id'] = server_id - if server_name is not UNSET: - field_dict['server_name'] = server_name - if slow_consumers is not UNSET: - field_dict['slow_consumers'] = slow_consumers - if start is not UNSET: - field_dict['start'] = start - if subscriptions is not UNSET: - field_dict['subscriptions'] = subscriptions - if system_account is not UNSET: - field_dict['system_account'] = system_account - if tls_timeout is not UNSET: - field_dict['tls_timeout'] = tls_timeout - if total_connections is not UNSET: - field_dict['total_connections'] = total_connections - if uptime is not UNSET: - field_dict['uptime'] = uptime - if version is not UNSET: - field_dict['version'] = version - if write_deadline is not UNSET: - field_dict['write_deadline'] = write_deadline - - return field_dict - - @classmethod - def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH: - d = src_dict.copy() - auth_timeout = d.pop("auth_timeout", UNSET) - - _cluster = d.pop("cluster", UNSET) - cluster: Union[Unset, Cluster] - if isinstance(_cluster, Unset): - cluster = UNSET - else: - cluster = _cluster # type: ignore[arg-type] - - _config_load_time = d.pop("config_load_time", UNSET) - config_load_time: Union[Unset, datetime.datetime] - if isinstance(_config_load_time, Unset): - config_load_time = UNSET - else: - config_load_time = isoparse(_config_load_time) - - connections = d.pop("connections", UNSET) - - cores = d.pop("cores", UNSET) - - cpu = d.pop("cpu", UNSET) - - _gateway = d.pop("gateway", UNSET) - gateway: Union[Unset, Gateway] - if isinstance(_gateway, Unset): - gateway = UNSET - else: - gateway = _gateway # type: ignore[arg-type] - - git_commit = d.pop("git_commit", UNSET) - - go = d.pop("go", UNSET) - - gomaxprocs = d.pop("gomaxprocs", UNSET) - - host = d.pop("host", UNSET) - - http_base_path = d.pop("http_base_path", UNSET) - - http_host = d.pop("http_host", UNSET) - - http_port = d.pop("http_port", UNSET) - - http_req_stats = d.pop("http_req_stats", UNSET) - - https_port = d.pop("https_port", UNSET) - - in_bytes = d.pop("in_bytes", UNSET) - - in_msgs = d.pop("in_msgs", UNSET) - - _jetstream = d.pop("jetstream", UNSET) - jetstream: Union[Unset, Jetstream] - if isinstance(_jetstream, Unset): - jetstream = UNSET - else: - jetstream = _jetstream # type: ignore[arg-type] - - _leaf = d.pop("leaf", UNSET) - leaf: Union[Unset, LeafNode] - if isinstance(_leaf, Unset): - leaf = UNSET - else: - leaf = _leaf # type: ignore[arg-type] - - leafnodes = d.pop("leafnodes", UNSET) - - max_connections = d.pop("max_connections", UNSET) - - max_control_line = d.pop("max_control_line", UNSET) - - max_payload = d.pop("max_payload", UNSET) - - max_pending = d.pop("max_pending", UNSET) - - mem = d.pop("mem", UNSET) - - _now = d.pop("now", UNSET) - now: Union[Unset, datetime.datetime] - if isinstance(_now, Unset): - now = UNSET - else: - now = isoparse(_now) - - out_bytes = d.pop("out_bytes", UNSET) + """Metadata about a pub-sub connection. + + This is mostly used for internal purposes and debugging.""" # noqa: E501 + + auth_timeout: Union[Unset, int] = UNSET + cluster: Union[Unset, Cluster] = UNSET + config_load_time: Union[Unset, datetime.datetime] = UNSET + connections: Union[Unset, int] = UNSET + cores: Union[Unset, int] = UNSET + cpu: Union[Unset, float] = UNSET + gateway: Union[Unset, Gateway] = UNSET + git_commit: Union[Unset, str] = UNSET + go: Union[Unset, str] = UNSET + gomaxprocs: Union[Unset, int] = UNSET + host: Union[Unset, str] = UNSET + http_base_path: Union[Unset, str] = UNSET + http_host: Union[Unset, str] = UNSET + http_port: Union[Unset, int] = UNSET + http_req_stats: Union[Unset, Dict[str, int]] = UNSET + https_port: Union[Unset, int] = UNSET + in_bytes: Union[Unset, int] = UNSET + in_msgs: Union[Unset, int] = UNSET + jetstream: Union[Unset, Jetstream] = UNSET + leaf: Union[Unset, LeafNode] = UNSET + leafnodes: Union[Unset, int] = UNSET + max_connections: Union[Unset, int] = UNSET + max_control_line: Union[Unset, int] = UNSET + max_payload: Union[Unset, int] = UNSET + max_pending: Union[Unset, int] = UNSET + mem: Union[Unset, int] = UNSET + now: Union[Unset, datetime.datetime] = UNSET + out_bytes: Union[Unset, int] = UNSET + out_msgs: Union[Unset, int] = UNSET + ping_interval: Union[Unset, int] = UNSET + ping_max: Union[Unset, int] = UNSET + port: Union[Unset, int] = UNSET + proto: Union[Unset, int] = UNSET + remotes: Union[Unset, int] = UNSET + routes: Union[Unset, int] = UNSET + server_id: Union[Unset, str] = UNSET + server_name: Union[Unset, str] = UNSET + slow_consumers: Union[Unset, int] = UNSET + start: Union[Unset, datetime.datetime] = UNSET + subscriptions: Union[Unset, int] = UNSET + system_account: Union[Unset, str] = UNSET + tls_timeout: Union[Unset, int] = UNSET + total_connections: Union[Unset, int] = UNSET + uptime: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + write_deadline: Union[Unset, int] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + auth_timeout = self.auth_timeout + if not isinstance(self.cluster, Unset): + cluster = self.cluster + config_load_time: Union[Unset, str] = UNSET + if not isinstance(self.config_load_time, Unset): + config_load_time = self.config_load_time.isoformat() + connections = self.connections + cores = self.cores + cpu = self.cpu + if not isinstance(self.gateway, Unset): + gateway = self.gateway + git_commit = self.git_commit + go = self.go + gomaxprocs = self.gomaxprocs + host = self.host + http_base_path = self.http_base_path + http_host = self.http_host + http_port = self.http_port + http_req_stats = self.http_req_stats + + https_port = self.https_port + in_bytes = self.in_bytes + in_msgs = self.in_msgs + if not isinstance(self.jetstream, Unset): + jetstream = self.jetstream + if not isinstance(self.leaf, Unset): + leaf = self.leaf + leafnodes = self.leafnodes + max_connections = self.max_connections + max_control_line = self.max_control_line + max_payload = self.max_payload + max_pending = self.max_pending + mem = self.mem + now: Union[Unset, str] = UNSET + if not isinstance(self.now, Unset): + now = self.now.isoformat() + out_bytes = self.out_bytes + out_msgs = self.out_msgs + ping_interval = self.ping_interval + ping_max = self.ping_max + port = self.port + proto = self.proto + remotes = self.remotes + routes = self.routes + server_id = self.server_id + server_name = self.server_name + slow_consumers = self.slow_consumers + start: Union[Unset, str] = UNSET + if not isinstance(self.start, Unset): + start = self.start.isoformat() + subscriptions = self.subscriptions + system_account = self.system_account + tls_timeout = self.tls_timeout + total_connections = self.total_connections + uptime = self.uptime + version = self.version + write_deadline = self.write_deadline + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if auth_timeout is not UNSET: + field_dict["auth_timeout"] = auth_timeout + if cluster is not UNSET: + field_dict["cluster"] = cluster + if config_load_time is not UNSET: + field_dict["config_load_time"] = config_load_time + if connections is not UNSET: + field_dict["connections"] = connections + if cores is not UNSET: + field_dict["cores"] = cores + if cpu is not UNSET: + field_dict["cpu"] = cpu + if gateway is not UNSET: + field_dict["gateway"] = gateway + if git_commit is not UNSET: + field_dict["git_commit"] = git_commit + if go is not UNSET: + field_dict["go"] = go + if gomaxprocs is not UNSET: + field_dict["gomaxprocs"] = gomaxprocs + if host is not UNSET: + field_dict["host"] = host + if http_base_path is not UNSET: + field_dict["http_base_path"] = http_base_path + if http_host is not UNSET: + field_dict["http_host"] = http_host + if http_port is not UNSET: + field_dict["http_port"] = http_port + if http_req_stats is not UNSET: + field_dict["http_req_stats"] = http_req_stats + if https_port is not UNSET: + field_dict["https_port"] = https_port + if in_bytes is not UNSET: + field_dict["in_bytes"] = in_bytes + if in_msgs is not UNSET: + field_dict["in_msgs"] = in_msgs + if jetstream is not UNSET: + field_dict["jetstream"] = jetstream + if leaf is not UNSET: + field_dict["leaf"] = leaf + if leafnodes is not UNSET: + field_dict["leafnodes"] = leafnodes + if max_connections is not UNSET: + field_dict["max_connections"] = max_connections + if max_control_line is not UNSET: + field_dict["max_control_line"] = max_control_line + if max_payload is not UNSET: + field_dict["max_payload"] = max_payload + if max_pending is not UNSET: + field_dict["max_pending"] = max_pending + if mem is not UNSET: + field_dict["mem"] = mem + if now is not UNSET: + field_dict["now"] = now + if out_bytes is not UNSET: + field_dict["out_bytes"] = out_bytes + if out_msgs is not UNSET: + field_dict["out_msgs"] = out_msgs + if ping_interval is not UNSET: + field_dict["ping_interval"] = ping_interval + if ping_max is not UNSET: + field_dict["ping_max"] = ping_max + if port is not UNSET: + field_dict["port"] = port + if proto is not UNSET: + field_dict["proto"] = proto + if remotes is not UNSET: + field_dict["remotes"] = remotes + if routes is not UNSET: + field_dict["routes"] = routes + if server_id is not UNSET: + field_dict["server_id"] = server_id + if server_name is not UNSET: + field_dict["server_name"] = server_name + if slow_consumers is not UNSET: + field_dict["slow_consumers"] = slow_consumers + if start is not UNSET: + field_dict["start"] = start + if subscriptions is not UNSET: + field_dict["subscriptions"] = subscriptions + if system_account is not UNSET: + field_dict["system_account"] = system_account + if tls_timeout is not UNSET: + field_dict["tls_timeout"] = tls_timeout + if total_connections is not UNSET: + field_dict["total_connections"] = total_connections + if uptime is not UNSET: + field_dict["uptime"] = uptime + if version is not UNSET: + field_dict["version"] = version + if write_deadline is not UNSET: + field_dict["write_deadline"] = write_deadline + + return field_dict + + @classmethod + def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB: + d = src_dict.copy() + auth_timeout = d.pop("auth_timeout", UNSET) + + _cluster = d.pop("cluster", UNSET) + cluster: Union[Unset, Cluster] + if isinstance(_cluster, Unset): + cluster = UNSET + else: + cluster = _cluster # type: ignore[arg-type] + + _config_load_time = d.pop("config_load_time", UNSET) + config_load_time: Union[Unset, datetime.datetime] + if isinstance(_config_load_time, Unset): + config_load_time = UNSET + else: + config_load_time = isoparse(_config_load_time) + + connections = d.pop("connections", UNSET) + + cores = d.pop("cores", UNSET) + + cpu = d.pop("cpu", UNSET) + + _gateway = d.pop("gateway", UNSET) + gateway: Union[Unset, Gateway] + if isinstance(_gateway, Unset): + gateway = UNSET + else: + gateway = _gateway # type: ignore[arg-type] + + git_commit = d.pop("git_commit", UNSET) + + go = d.pop("go", UNSET) + + gomaxprocs = d.pop("gomaxprocs", UNSET) + + host = d.pop("host", UNSET) + + http_base_path = d.pop("http_base_path", UNSET) + + http_host = d.pop("http_host", UNSET) + + http_port = d.pop("http_port", UNSET) + + http_req_stats = d.pop("http_req_stats", UNSET) + + https_port = d.pop("https_port", UNSET) + + in_bytes = d.pop("in_bytes", UNSET) + + in_msgs = d.pop("in_msgs", UNSET) + + _jetstream = d.pop("jetstream", UNSET) + jetstream: Union[Unset, Jetstream] + if isinstance(_jetstream, Unset): + jetstream = UNSET + else: + jetstream = _jetstream # type: ignore[arg-type] + + _leaf = d.pop("leaf", UNSET) + leaf: Union[Unset, LeafNode] + if isinstance(_leaf, Unset): + leaf = UNSET + else: + leaf = _leaf # type: ignore[arg-type] + + leafnodes = d.pop("leafnodes", UNSET) + + max_connections = d.pop("max_connections", UNSET) + + max_control_line = d.pop("max_control_line", UNSET) + + max_payload = d.pop("max_payload", UNSET) + + max_pending = d.pop("max_pending", UNSET) + + mem = d.pop("mem", UNSET) + + _now = d.pop("now", UNSET) + now: Union[Unset, datetime.datetime] + if isinstance(_now, Unset): + now = UNSET + else: + now = isoparse(_now) - out_msgs = d.pop("out_msgs", UNSET) + out_bytes = d.pop("out_bytes", UNSET) - ping_interval = d.pop("ping_interval", UNSET) + out_msgs = d.pop("out_msgs", UNSET) - ping_max = d.pop("ping_max", UNSET) + ping_interval = d.pop("ping_interval", UNSET) - port = d.pop("port", UNSET) + ping_max = d.pop("ping_max", UNSET) - proto = d.pop("proto", UNSET) + port = d.pop("port", UNSET) - remotes = d.pop("remotes", UNSET) + proto = d.pop("proto", UNSET) - routes = d.pop("routes", UNSET) + remotes = d.pop("remotes", UNSET) - server_id = d.pop("server_id", UNSET) + routes = d.pop("routes", UNSET) - server_name = d.pop("server_name", UNSET) + server_id = d.pop("server_id", UNSET) - slow_consumers = d.pop("slow_consumers", UNSET) + server_name = d.pop("server_name", UNSET) - _start = d.pop("start", UNSET) - start: Union[Unset, datetime.datetime] - if isinstance(_start, Unset): - start = UNSET - else: - start = isoparse(_start) + slow_consumers = d.pop("slow_consumers", UNSET) - subscriptions = d.pop("subscriptions", UNSET) + _start = d.pop("start", UNSET) + start: Union[Unset, datetime.datetime] + if isinstance(_start, Unset): + start = UNSET + else: + start = isoparse(_start) - system_account = d.pop("system_account", UNSET) + subscriptions = d.pop("subscriptions", UNSET) - tls_timeout = d.pop("tls_timeout", UNSET) + system_account = d.pop("system_account", UNSET) - total_connections = d.pop("total_connections", UNSET) + tls_timeout = d.pop("tls_timeout", UNSET) - uptime = d.pop("uptime", UNSET) + total_connections = d.pop("total_connections", UNSET) - version = d.pop("version", UNSET) + uptime = d.pop("uptime", UNSET) - write_deadline = d.pop("write_deadline", UNSET) + version = d.pop("version", UNSET) + write_deadline = d.pop("write_deadline", UNSET) - connection = cls( - auth_timeout= auth_timeout, - cluster= cluster, - config_load_time= config_load_time, - connections= connections, - cores= cores, - cpu= cpu, - gateway= gateway, - git_commit= git_commit, - go= go, - gomaxprocs= gomaxprocs, - host= host, - http_base_path= http_base_path, - http_host= http_host, - http_port= http_port, - http_req_stats= http_req_stats, - https_port= https_port, - in_bytes= in_bytes, - in_msgs= in_msgs, - jetstream= jetstream, - leaf= leaf, - leafnodes= leafnodes, - max_connections= max_connections, - max_control_line= max_control_line, - max_payload= max_payload, - max_pending= max_pending, - mem= mem, - now= now, - out_bytes= out_bytes, - out_msgs= out_msgs, - ping_interval= ping_interval, - ping_max= ping_max, - port= port, - proto= proto, - remotes= remotes, - routes= routes, - server_id= server_id, - server_name= server_name, - slow_consumers= slow_consumers, - start= start, - subscriptions= subscriptions, - system_account= system_account, - tls_timeout= tls_timeout, - total_connections= total_connections, - uptime= uptime, - version= version, - write_deadline= write_deadline, - ) - - connection.additional_properties = d - return connection - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + connection = cls( + auth_timeout=auth_timeout, + cluster=cluster, + config_load_time=config_load_time, + connections=connections, + cores=cores, + cpu=cpu, + gateway=gateway, + git_commit=git_commit, + go=go, + gomaxprocs=gomaxprocs, + host=host, + http_base_path=http_base_path, + http_host=http_host, + http_port=http_port, + http_req_stats=http_req_stats, + https_port=https_port, + in_bytes=in_bytes, + in_msgs=in_msgs, + jetstream=jetstream, + leaf=leaf, + leafnodes=leafnodes, + max_connections=max_connections, + max_control_line=max_control_line, + max_payload=max_payload, + max_pending=max_pending, + mem=mem, + now=now, + out_bytes=out_bytes, + out_msgs=out_msgs, + ping_interval=ping_interval, + ping_max=ping_max, + port=port, + proto=proto, + remotes=remotes, + routes=routes, + server_id=server_id, + server_name=server_name, + slow_consumers=slow_consumers, + start=start, + subscriptions=subscriptions, + system_account=system_account, + tls_timeout=tls_timeout, + total_connections=total_connections, + uptime=uptime, + version=version, + write_deadline=write_deadline, + ) + + connection.additional_properties = d + return connection + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/country_code.py b/kittycad/models/country_code.py index b3d1ed5f6..f7df3965d 100644 --- a/kittycad/models/country_code.py +++ b/kittycad/models/country_code.py @@ -1,4 +1,3 @@ class CountryCode(str): - - def __str__(self) -> str: - return self + def __str__(self) -> str: + return self diff --git a/kittycad/models/coupon.py b/kittycad/models/coupon.py index bd874f31a..f5fde4730 100644 --- a/kittycad/models/coupon.py +++ b/kittycad/models/coupon.py @@ -4,72 +4,73 @@ from ..types import UNSET, Unset -NH = TypeVar("NH", bound="Coupon") +PJ = TypeVar("PJ", bound="Coupon") + @attr.s(auto_attribs=True) class Coupon: - """ The resource representing a Coupon. """ # noqa: E501 - amount_off: Union[Unset, float] = UNSET - deleted: Union[Unset, bool] = False - id: Union[Unset, str] = UNSET - percent_off: Union[Unset, float] = UNSET + """The resource representing a Coupon.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + amount_off: Union[Unset, float] = UNSET + deleted: Union[Unset, bool] = False + id: Union[Unset, str] = UNSET + percent_off: Union[Unset, float] = UNSET - def to_dict(self) -> Dict[str, Any]: - amount_off = self.amount_off - deleted = self.deleted - id = self.id - percent_off = self.percent_off + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if amount_off is not UNSET: - field_dict['amount_off'] = amount_off - if deleted is not UNSET: - field_dict['deleted'] = deleted - if id is not UNSET: - field_dict['id'] = id - if percent_off is not UNSET: - field_dict['percent_off'] = percent_off + def to_dict(self) -> Dict[str, Any]: + amount_off = self.amount_off + deleted = self.deleted + id = self.id + percent_off = self.percent_off - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if amount_off is not UNSET: + field_dict["amount_off"] = amount_off + if deleted is not UNSET: + field_dict["deleted"] = deleted + if id is not UNSET: + field_dict["id"] = id + if percent_off is not UNSET: + field_dict["percent_off"] = percent_off - @classmethod - def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH: - d = src_dict.copy() - amount_off = d.pop("amount_off", UNSET) + return field_dict - deleted = d.pop("deleted", UNSET) + @classmethod + def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ: + d = src_dict.copy() + amount_off = d.pop("amount_off", UNSET) - id = d.pop("id", UNSET) + deleted = d.pop("deleted", UNSET) - percent_off = d.pop("percent_off", UNSET) + id = d.pop("id", UNSET) + percent_off = d.pop("percent_off", UNSET) - coupon = cls( - amount_off= amount_off, - deleted= deleted, - id= id, - percent_off= percent_off, - ) + coupon = cls( + amount_off=amount_off, + deleted=deleted, + id=id, + percent_off=percent_off, + ) - coupon.additional_properties = d - return coupon + coupon.additional_properties = d + return coupon - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/created_at_sort_mode.py b/kittycad/models/created_at_sort_mode.py index 1615f9355..c76588552 100644 --- a/kittycad/models/created_at_sort_mode.py +++ b/kittycad/models/created_at_sort_mode.py @@ -2,13 +2,14 @@ class CreatedAtSortMode(str, Enum): - """ Supported set of sort modes for scanning by created_at only. + """Supported set of sort modes for scanning by created_at only. -Currently, we only support scanning in ascending order. """ # noqa: E501 - """# Sort in increasing order of "created_at". """ # noqa: E501 - CREATED_AT_ASCENDING = 'created_at_ascending' - """# Sort in decreasing order of "created_at". """ # noqa: E501 - CREATED_AT_DESCENDING = 'created_at_descending' + Currently, we only support scanning in ascending order.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# Sort in increasing order of "created_at". """ # noqa: E501 + CREATED_AT_ASCENDING = "created_at_ascending" + """# Sort in decreasing order of "created_at". """ # noqa: E501 + CREATED_AT_DESCENDING = "created_at_descending" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/currency.py b/kittycad/models/currency.py index 4b097a874..1e0e1a589 100644 --- a/kittycad/models/currency.py +++ b/kittycad/models/currency.py @@ -1,4 +1,3 @@ class Currency(str): - - def __str__(self) -> str: - return self + def __str__(self) -> str: + return self diff --git a/kittycad/models/curve_get_control_points.py b/kittycad/models/curve_get_control_points.py index 6f2a8d018..ef1f01542 100644 --- a/kittycad/models/curve_get_control_points.py +++ b/kittycad/models/curve_get_control_points.py @@ -4,56 +4,60 @@ from ..types import UNSET, Unset -BB = TypeVar("BB", bound="CurveGetControlPoints") +TV = TypeVar("TV", bound="CurveGetControlPoints") + @attr.s(auto_attribs=True) class CurveGetControlPoints: - """ The response from the `CurveGetControlPoints` command. """ # noqa: E501 - from ..models.point3d import Point3d - control_points: Union[Unset, List[Point3d]] = UNSET + """The response from the `CurveGetControlPoints` command.""" # noqa: E501 + + from ..models.point3d import Point3d + + control_points: Union[Unset, List[Point3d]] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + from ..models.point3d import Point3d - def to_dict(self) -> Dict[str, Any]: - from ..models.point3d import Point3d - control_points: Union[Unset, List[Point3d]] = UNSET - if not isinstance(self.control_points, Unset): - control_points = self.control_points + control_points: Union[Unset, List[Point3d]] = UNSET + if not isinstance(self.control_points, Unset): + control_points = self.control_points - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if control_points is not UNSET: - field_dict['control_points'] = control_points + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if control_points is not UNSET: + field_dict["control_points"] = control_points - return field_dict + return field_dict - @classmethod - def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB: - d = src_dict.copy() - from ..models.point3d import Point3d - control_points = cast(List[Point3d], d.pop("control_points", UNSET)) + @classmethod + def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV: + d = src_dict.copy() + from ..models.point3d import Point3d + control_points = cast(List[Point3d], d.pop("control_points", UNSET)) - curve_get_control_points = cls( - control_points= control_points, - ) + curve_get_control_points = cls( + control_points=control_points, + ) - curve_get_control_points.additional_properties = d - return curve_get_control_points + curve_get_control_points.additional_properties = d + return curve_get_control_points - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/curve_get_end_points.py b/kittycad/models/curve_get_end_points.py index c41cea464..c80ba290f 100644 --- a/kittycad/models/curve_get_end_points.py +++ b/kittycad/models/curve_get_end_points.py @@ -5,70 +5,71 @@ from ..models.point3d import Point3d from ..types import UNSET, Unset -PJ = TypeVar("PJ", bound="CurveGetEndPoints") +CR = TypeVar("CR", bound="CurveGetEndPoints") + @attr.s(auto_attribs=True) class CurveGetEndPoints: - """ Endpoints of a curve """ # noqa: E501 - end: Union[Unset, Point3d] = UNSET - start: Union[Unset, Point3d] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.end, Unset): - end = self.end - if not isinstance(self.start, Unset): - start = self.start - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if end is not UNSET: - field_dict['end'] = end - if start is not UNSET: - field_dict['start'] = start - - return field_dict - - @classmethod - def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ: - d = src_dict.copy() - _end = d.pop("end", UNSET) - end: Union[Unset, Point3d] - if isinstance(_end, Unset): - end = UNSET - else: - end = _end # type: ignore[arg-type] - - _start = d.pop("start", UNSET) - start: Union[Unset, Point3d] - if isinstance(_start, Unset): - start = UNSET - else: - start = _start # type: ignore[arg-type] - - - curve_get_end_points = cls( - end= end, - start= start, - ) - - curve_get_end_points.additional_properties = d - return curve_get_end_points - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Endpoints of a curve""" # noqa: E501 + + end: Union[Unset, Point3d] = UNSET + start: Union[Unset, Point3d] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.end, Unset): + end = self.end + if not isinstance(self.start, Unset): + start = self.start + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if end is not UNSET: + field_dict["end"] = end + if start is not UNSET: + field_dict["start"] = start + + return field_dict + + @classmethod + def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR: + d = src_dict.copy() + _end = d.pop("end", UNSET) + end: Union[Unset, Point3d] + if isinstance(_end, Unset): + end = UNSET + else: + end = _end # type: ignore[arg-type] + + _start = d.pop("start", UNSET) + start: Union[Unset, Point3d] + if isinstance(_start, Unset): + start = UNSET + else: + start = _start # type: ignore[arg-type] + + curve_get_end_points = cls( + end=end, + start=start, + ) + + curve_get_end_points.additional_properties = d + return curve_get_end_points + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/curve_get_type.py b/kittycad/models/curve_get_type.py index 19bb75ea7..8503cad26 100644 --- a/kittycad/models/curve_get_type.py +++ b/kittycad/models/curve_get_type.py @@ -5,57 +5,58 @@ from ..models.curve_type import CurveType from ..types import UNSET, Unset -TV = TypeVar("TV", bound="CurveGetType") +CE = TypeVar("CE", bound="CurveGetType") + @attr.s(auto_attribs=True) class CurveGetType: - """ The response from the `CurveGetType` command. """ # noqa: E501 - curve_type: Union[Unset, CurveType] = UNSET + """The response from the `CurveGetType` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + curve_type: Union[Unset, CurveType] = UNSET - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.curve_type, Unset): - curve_type = self.curve_type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if curve_type is not UNSET: - field_dict['curve_type'] = curve_type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.curve_type, Unset): + curve_type = self.curve_type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if curve_type is not UNSET: + field_dict["curve_type"] = curve_type - @classmethod - def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV: - d = src_dict.copy() - _curve_type = d.pop("curve_type", UNSET) - curve_type: Union[Unset, CurveType] - if isinstance(_curve_type, Unset): - curve_type = UNSET - else: - curve_type = _curve_type # type: ignore[arg-type] + return field_dict + @classmethod + def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE: + d = src_dict.copy() + _curve_type = d.pop("curve_type", UNSET) + curve_type: Union[Unset, CurveType] + if isinstance(_curve_type, Unset): + curve_type = UNSET + else: + curve_type = _curve_type # type: ignore[arg-type] - curve_get_type = cls( - curve_type= curve_type, - ) + curve_get_type = cls( + curve_type=curve_type, + ) - curve_get_type.additional_properties = d - return curve_get_type + curve_get_type.additional_properties = d + return curve_get_type - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/curve_type.py b/kittycad/models/curve_type.py index 1e3a91539..2e7efc988 100644 --- a/kittycad/models/curve_type.py +++ b/kittycad/models/curve_type.py @@ -2,10 +2,11 @@ class CurveType(str, Enum): - """ The type of Curve (embedded within path) """ # noqa: E501 - LINE = 'line' - ARC = 'arc' - NURBS = 'nurbs' + """The type of Curve (embedded within path)""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + LINE = "line" + ARC = "arc" + NURBS = "nurbs" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/customer.py b/kittycad/models/customer.py index aba99c3d2..3fc2c1630 100644 --- a/kittycad/models/customer.py +++ b/kittycad/models/customer.py @@ -8,134 +8,135 @@ from ..models.new_address import NewAddress from ..types import UNSET, Unset -CR = TypeVar("CR", bound="Customer") +MS = TypeVar("MS", bound="Customer") + @attr.s(auto_attribs=True) class Customer: - """ The resource representing a payment "Customer". """ # noqa: E501 - address: Union[Unset, NewAddress] = UNSET - balance: Union[Unset, float] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - currency: Union[Unset, Currency] = UNSET - delinquent: Union[Unset, bool] = False - email: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - metadata: Union[Unset, Dict[str, str]] = UNSET - name: Union[Unset, str] = UNSET - phone: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.address, Unset): - address = self.address - balance = self.balance - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - if not isinstance(self.currency, Unset): - currency = self.currency - delinquent = self.delinquent - email = self.email - id = self.id - metadata = self.metadata - - name = self.name - phone = self.phone - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if address is not UNSET: - field_dict['address'] = address - if balance is not UNSET: - field_dict['balance'] = balance - if created_at is not UNSET: - field_dict['created_at'] = created_at - if currency is not UNSET: - field_dict['currency'] = currency - if delinquent is not UNSET: - field_dict['delinquent'] = delinquent - if email is not UNSET: - field_dict['email'] = email - if id is not UNSET: - field_dict['id'] = id - if metadata is not UNSET: - field_dict['metadata'] = metadata - if name is not UNSET: - field_dict['name'] = name - if phone is not UNSET: - field_dict['phone'] = phone - - return field_dict - - @classmethod - def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR: - d = src_dict.copy() - _address = d.pop("address", UNSET) - address: Union[Unset, NewAddress] - if isinstance(_address, Unset): - address = UNSET - else: - address = _address # type: ignore[arg-type] - - balance = d.pop("balance", UNSET) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - _currency = d.pop("currency", UNSET) - currency: Union[Unset, Currency] - if isinstance(_currency, Unset): - currency = UNSET - else: - currency = _currency # type: ignore[arg-type] - - delinquent = d.pop("delinquent", UNSET) - - email = d.pop("email", UNSET) - - id = d.pop("id", UNSET) - - metadata = d.pop("metadata", UNSET) - - name = d.pop("name", UNSET) - - phone = d.pop("phone", UNSET) - - - customer = cls( - address= address, - balance= balance, - created_at= created_at, - currency= currency, - delinquent= delinquent, - email= email, - id= id, - metadata= metadata, - name= name, - phone= phone, - ) - - customer.additional_properties = d - return customer - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """The resource representing a payment "Customer".""" # noqa: E501 + + address: Union[Unset, NewAddress] = UNSET + balance: Union[Unset, float] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + currency: Union[Unset, Currency] = UNSET + delinquent: Union[Unset, bool] = False + email: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + metadata: Union[Unset, Dict[str, str]] = UNSET + name: Union[Unset, str] = UNSET + phone: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.address, Unset): + address = self.address + balance = self.balance + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + if not isinstance(self.currency, Unset): + currency = self.currency + delinquent = self.delinquent + email = self.email + id = self.id + metadata = self.metadata + + name = self.name + phone = self.phone + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address is not UNSET: + field_dict["address"] = address + if balance is not UNSET: + field_dict["balance"] = balance + if created_at is not UNSET: + field_dict["created_at"] = created_at + if currency is not UNSET: + field_dict["currency"] = currency + if delinquent is not UNSET: + field_dict["delinquent"] = delinquent + if email is not UNSET: + field_dict["email"] = email + if id is not UNSET: + field_dict["id"] = id + if metadata is not UNSET: + field_dict["metadata"] = metadata + if name is not UNSET: + field_dict["name"] = name + if phone is not UNSET: + field_dict["phone"] = phone + + return field_dict + + @classmethod + def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS: + d = src_dict.copy() + _address = d.pop("address", UNSET) + address: Union[Unset, NewAddress] + if isinstance(_address, Unset): + address = UNSET + else: + address = _address # type: ignore[arg-type] + + balance = d.pop("balance", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _currency = d.pop("currency", UNSET) + currency: Union[Unset, Currency] + if isinstance(_currency, Unset): + currency = UNSET + else: + currency = _currency # type: ignore[arg-type] + + delinquent = d.pop("delinquent", UNSET) + + email = d.pop("email", UNSET) + + id = d.pop("id", UNSET) + + metadata = d.pop("metadata", UNSET) + + name = d.pop("name", UNSET) + + phone = d.pop("phone", UNSET) + + customer = cls( + address=address, + balance=balance, + created_at=created_at, + currency=currency, + delinquent=delinquent, + email=email, + id=id, + metadata=metadata, + name=name, + phone=phone, + ) + + customer.additional_properties = d + return customer + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/customer_balance.py b/kittycad/models/customer_balance.py index 60c7fb87e..9d947ee53 100644 --- a/kittycad/models/customer_balance.py +++ b/kittycad/models/customer_balance.py @@ -7,121 +7,127 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -CE = TypeVar("CE", bound="CustomerBalance") +LT = TypeVar("LT", bound="CustomerBalance") + @attr.s(auto_attribs=True) class CustomerBalance: - """ A balance for a user. - -This holds information about the financial balance for the user. """ # noqa: E501 - created_at: Union[Unset, datetime.datetime] = UNSET - id: Union[Unset, str] = UNSET - monthly_credits_remaining: Union[Unset, float] = UNSET - pre_pay_cash_remaining: Union[Unset, float] = UNSET - pre_pay_credits_remaining: Union[Unset, float] = UNSET - total_due: Union[Unset, float] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - id = self.id - monthly_credits_remaining = self.monthly_credits_remaining - pre_pay_cash_remaining = self.pre_pay_cash_remaining - pre_pay_credits_remaining = self.pre_pay_credits_remaining - total_due = self.total_due - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict['created_at'] = created_at - if id is not UNSET: - field_dict['id'] = id - if monthly_credits_remaining is not UNSET: - field_dict['monthly_credits_remaining'] = monthly_credits_remaining - if pre_pay_cash_remaining is not UNSET: - field_dict['pre_pay_cash_remaining'] = pre_pay_cash_remaining - if pre_pay_credits_remaining is not UNSET: - field_dict['pre_pay_credits_remaining'] = pre_pay_credits_remaining - if total_due is not UNSET: - field_dict['total_due'] = total_due - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE: - d = src_dict.copy() - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - monthly_credits_remaining = d.pop("monthly_credits_remaining", UNSET) - - pre_pay_cash_remaining = d.pop("pre_pay_cash_remaining", UNSET) - - pre_pay_credits_remaining = d.pop("pre_pay_credits_remaining", UNSET) - - total_due = d.pop("total_due", UNSET) - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - customer_balance = cls( - created_at= created_at, - id= id, - monthly_credits_remaining= monthly_credits_remaining, - pre_pay_cash_remaining= pre_pay_cash_remaining, - pre_pay_credits_remaining= pre_pay_credits_remaining, - total_due= total_due, - updated_at= updated_at, - user_id= user_id, - ) - - customer_balance.additional_properties = d - return customer_balance - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """A balance for a user. + + This holds information about the financial balance for the user.""" # noqa: E501 + + created_at: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + monthly_credits_remaining: Union[Unset, float] = UNSET + pre_pay_cash_remaining: Union[Unset, float] = UNSET + pre_pay_credits_remaining: Union[Unset, float] = UNSET + total_due: Union[Unset, float] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + id = self.id + monthly_credits_remaining = self.monthly_credits_remaining + pre_pay_cash_remaining = self.pre_pay_cash_remaining + pre_pay_credits_remaining = self.pre_pay_credits_remaining + total_due = self.total_due + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if id is not UNSET: + field_dict["id"] = id + if monthly_credits_remaining is not UNSET: + field_dict["monthly_credits_remaining"] = monthly_credits_remaining + if pre_pay_cash_remaining is not UNSET: + field_dict["pre_pay_cash_remaining"] = pre_pay_cash_remaining + if pre_pay_credits_remaining is not UNSET: + field_dict["pre_pay_credits_remaining"] = pre_pay_credits_remaining + if total_due is not UNSET: + field_dict["total_due"] = total_due + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT: + d = src_dict.copy() + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + monthly_credits_remaining = d.pop("monthly_credits_remaining", UNSET) + + pre_pay_cash_remaining = d.pop("pre_pay_cash_remaining", UNSET) + + pre_pay_credits_remaining = d.pop("pre_pay_credits_remaining", UNSET) + + total_due = d.pop("total_due", UNSET) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + customer_balance = cls( + created_at=created_at, + id=id, + monthly_credits_remaining=monthly_credits_remaining, + pre_pay_cash_remaining=pre_pay_cash_remaining, + pre_pay_credits_remaining=pre_pay_credits_remaining, + total_due=total_due, + updated_at=updated_at, + user_id=user_id, + ) + + customer_balance.additional_properties = d + return customer_balance + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/density.py b/kittycad/models/density.py index 7323a426e..abf125a89 100644 --- a/kittycad/models/density.py +++ b/kittycad/models/density.py @@ -5,64 +5,65 @@ from ..models.unit_density import UnitDensity from ..types import UNSET, Unset -MS = TypeVar("MS", bound="Density") +ED = TypeVar("ED", bound="Density") + @attr.s(auto_attribs=True) class Density: - """ The density response. """ # noqa: E501 - density: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitDensity] = UNSET + """The density response.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + density: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitDensity] = UNSET - def to_dict(self) -> Dict[str, Any]: - density = self.density - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if density is not UNSET: - field_dict['density'] = density - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit + def to_dict(self) -> Dict[str, Any]: + density = self.density + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if density is not UNSET: + field_dict["density"] = density + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit - @classmethod - def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS: - d = src_dict.copy() - density = d.pop("density", UNSET) + return field_dict - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitDensity] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED: + d = src_dict.copy() + density = d.pop("density", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitDensity] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - density = cls( - density= density, - output_unit= output_unit, - ) + density = cls( + density=density, + output_unit=output_unit, + ) - density.additional_properties = d - return density + density.additional_properties = d + return density - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/device_access_token_request_form.py b/kittycad/models/device_access_token_request_form.py index 72bd913e5..4f0e3e2a8 100644 --- a/kittycad/models/device_access_token_request_form.py +++ b/kittycad/models/device_access_token_request_form.py @@ -5,71 +5,72 @@ from ..models.o_auth2_grant_type import OAuth2GrantType from ..types import UNSET, Unset -LT = TypeVar("LT", bound="DeviceAccessTokenRequestForm") +YY = TypeVar("YY", bound="DeviceAccessTokenRequestForm") + @attr.s(auto_attribs=True) class DeviceAccessTokenRequestForm: - """ The form for a device access token request. """ # noqa: E501 - client_id: Union[Unset, str] = UNSET - device_code: Union[Unset, str] = UNSET - grant_type: Union[Unset, OAuth2GrantType] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - client_id = self.client_id - device_code = self.device_code - if not isinstance(self.grant_type, Unset): - grant_type = self.grant_type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if client_id is not UNSET: - field_dict['client_id'] = client_id - if device_code is not UNSET: - field_dict['device_code'] = device_code - if grant_type is not UNSET: - field_dict['grant_type'] = grant_type - - return field_dict - - @classmethod - def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT: - d = src_dict.copy() - client_id = d.pop("client_id", UNSET) - - device_code = d.pop("device_code", UNSET) - - _grant_type = d.pop("grant_type", UNSET) - grant_type: Union[Unset, OAuth2GrantType] - if isinstance(_grant_type, Unset): - grant_type = UNSET - else: - grant_type = _grant_type # type: ignore[arg-type] - - - device_access_token_request_form = cls( - client_id= client_id, - device_code= device_code, - grant_type= grant_type, - ) - - device_access_token_request_form.additional_properties = d - return device_access_token_request_form - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """The form for a device access token request.""" # noqa: E501 + + client_id: Union[Unset, str] = UNSET + device_code: Union[Unset, str] = UNSET + grant_type: Union[Unset, OAuth2GrantType] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + client_id = self.client_id + device_code = self.device_code + if not isinstance(self.grant_type, Unset): + grant_type = self.grant_type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if client_id is not UNSET: + field_dict["client_id"] = client_id + if device_code is not UNSET: + field_dict["device_code"] = device_code + if grant_type is not UNSET: + field_dict["grant_type"] = grant_type + + return field_dict + + @classmethod + def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY: + d = src_dict.copy() + client_id = d.pop("client_id", UNSET) + + device_code = d.pop("device_code", UNSET) + + _grant_type = d.pop("grant_type", UNSET) + grant_type: Union[Unset, OAuth2GrantType] + if isinstance(_grant_type, Unset): + grant_type = UNSET + else: + grant_type = _grant_type # type: ignore[arg-type] + + device_access_token_request_form = cls( + client_id=client_id, + device_code=device_code, + grant_type=grant_type, + ) + + device_access_token_request_form.additional_properties = d + return device_access_token_request_form + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/device_auth_request_form.py b/kittycad/models/device_auth_request_form.py index 27a4d0ceb..b48bba394 100644 --- a/kittycad/models/device_auth_request_form.py +++ b/kittycad/models/device_auth_request_form.py @@ -4,51 +4,52 @@ from ..types import UNSET, Unset -ED = TypeVar("ED", bound="DeviceAuthRequestForm") +DO = TypeVar("DO", bound="DeviceAuthRequestForm") + @attr.s(auto_attribs=True) class DeviceAuthRequestForm: - """ The request parameters for the OAuth 2.0 Device Authorization Grant flow. """ # noqa: E501 - client_id: Union[Unset, str] = UNSET + """The request parameters for the OAuth 2.0 Device Authorization Grant flow.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + client_id: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - client_id = self.client_id + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if client_id is not UNSET: - field_dict['client_id'] = client_id + def to_dict(self) -> Dict[str, Any]: + client_id = self.client_id - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if client_id is not UNSET: + field_dict["client_id"] = client_id - @classmethod - def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED: - d = src_dict.copy() - client_id = d.pop("client_id", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO: + d = src_dict.copy() + client_id = d.pop("client_id", UNSET) - device_auth_request_form = cls( - client_id= client_id, - ) + device_auth_request_form = cls( + client_id=client_id, + ) - device_auth_request_form.additional_properties = d - return device_auth_request_form + device_auth_request_form.additional_properties = d + return device_auth_request_form - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/device_auth_verify_params.py b/kittycad/models/device_auth_verify_params.py index eb21f0762..a0df797b1 100644 --- a/kittycad/models/device_auth_verify_params.py +++ b/kittycad/models/device_auth_verify_params.py @@ -4,51 +4,52 @@ from ..types import UNSET, Unset -YY = TypeVar("YY", bound="DeviceAuthVerifyParams") +FZ = TypeVar("FZ", bound="DeviceAuthVerifyParams") + @attr.s(auto_attribs=True) class DeviceAuthVerifyParams: - """ The request parameters to verify the `user_code` for the OAuth 2.0 Device Authorization Grant. """ # noqa: E501 - user_code: Union[Unset, str] = UNSET + """The request parameters to verify the `user_code` for the OAuth 2.0 Device Authorization Grant.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + user_code: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - user_code = self.user_code + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if user_code is not UNSET: - field_dict['user_code'] = user_code + def to_dict(self) -> Dict[str, Any]: + user_code = self.user_code - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if user_code is not UNSET: + field_dict["user_code"] = user_code - @classmethod - def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY: - d = src_dict.copy() - user_code = d.pop("user_code", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ: + d = src_dict.copy() + user_code = d.pop("user_code", UNSET) - device_auth_verify_params = cls( - user_code= user_code, - ) + device_auth_verify_params = cls( + user_code=user_code, + ) - device_auth_verify_params.additional_properties = d - return device_auth_verify_params + device_auth_verify_params.additional_properties = d + return device_auth_verify_params - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/direction.py b/kittycad/models/direction.py index 2d9b976d1..d1496b465 100644 --- a/kittycad/models/direction.py +++ b/kittycad/models/direction.py @@ -2,11 +2,12 @@ class Direction(str, Enum): - """ Specifies the sign of a co-ordinate axis. """ # noqa: E501 - """# Increasing numbers. """ # noqa: E501 - POSITIVE = 'positive' - """# Decreasing numbers. """ # noqa: E501 - NEGATIVE = 'negative' - - def __str__(self) -> str: - return str(self.value) + """Specifies the sign of a co-ordinate axis.""" # noqa: E501 + + """# Increasing numbers. """ # noqa: E501 + POSITIVE = "positive" + """# Decreasing numbers. """ # noqa: E501 + NEGATIVE = "negative" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/discount.py b/kittycad/models/discount.py index 6dfcee17d..cf90fb169 100644 --- a/kittycad/models/discount.py +++ b/kittycad/models/discount.py @@ -5,57 +5,58 @@ from ..models.coupon import Coupon from ..types import UNSET, Unset -DO = TypeVar("DO", bound="Discount") +GL = TypeVar("GL", bound="Discount") + @attr.s(auto_attribs=True) class Discount: - """ The resource representing a Discount. """ # noqa: E501 - coupon: Union[Unset, Coupon] = UNSET + """The resource representing a Discount.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + coupon: Union[Unset, Coupon] = UNSET - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coupon, Unset): - coupon = self.coupon + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coupon is not UNSET: - field_dict['coupon'] = coupon + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coupon, Unset): + coupon = self.coupon - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coupon is not UNSET: + field_dict["coupon"] = coupon - @classmethod - def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO: - d = src_dict.copy() - _coupon = d.pop("coupon", UNSET) - coupon: Union[Unset, Coupon] - if isinstance(_coupon, Unset): - coupon = UNSET - else: - coupon = _coupon # type: ignore[arg-type] + return field_dict + @classmethod + def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL: + d = src_dict.copy() + _coupon = d.pop("coupon", UNSET) + coupon: Union[Unset, Coupon] + if isinstance(_coupon, Unset): + coupon = UNSET + else: + coupon = _coupon # type: ignore[arg-type] - discount = cls( - coupon= coupon, - ) + discount = cls( + coupon=coupon, + ) - discount.additional_properties = d - return discount + discount.additional_properties = d + return discount - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/email_authentication_form.py b/kittycad/models/email_authentication_form.py index a6c6fe6db..558dee7a3 100644 --- a/kittycad/models/email_authentication_form.py +++ b/kittycad/models/email_authentication_form.py @@ -4,58 +4,59 @@ from ..types import UNSET, Unset -FZ = TypeVar("FZ", bound="EmailAuthenticationForm") +NN = TypeVar("NN", bound="EmailAuthenticationForm") + @attr.s(auto_attribs=True) class EmailAuthenticationForm: - """ The body of the form for email authentication. """ # noqa: E501 - callback_url: Union[Unset, str] = UNSET - email: Union[Unset, str] = UNSET + """The body of the form for email authentication.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + callback_url: Union[Unset, str] = UNSET + email: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - callback_url = self.callback_url - email = self.email + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if callback_url is not UNSET: - field_dict['callback_url'] = callback_url - if email is not UNSET: - field_dict['email'] = email + def to_dict(self) -> Dict[str, Any]: + callback_url = self.callback_url + email = self.email - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if callback_url is not UNSET: + field_dict["callback_url"] = callback_url + if email is not UNSET: + field_dict["email"] = email - @classmethod - def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ: - d = src_dict.copy() - callback_url = d.pop("callback_url", UNSET) + return field_dict - email = d.pop("email", UNSET) + @classmethod + def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN: + d = src_dict.copy() + callback_url = d.pop("callback_url", UNSET) + email = d.pop("email", UNSET) - email_authentication_form = cls( - callback_url= callback_url, - email= email, - ) + email_authentication_form = cls( + callback_url=callback_url, + email=email, + ) - email_authentication_form.additional_properties = d - return email_authentication_form + email_authentication_form.additional_properties = d + return email_authentication_form - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/entity_get_all_child_uuids.py b/kittycad/models/entity_get_all_child_uuids.py index 7dc0932cc..6e70fe70c 100644 --- a/kittycad/models/entity_get_all_child_uuids.py +++ b/kittycad/models/entity_get_all_child_uuids.py @@ -4,53 +4,54 @@ from ..types import UNSET, Unset -GL = TypeVar("GL", bound="EntityGetAllChildUuids") +OH = TypeVar("OH", bound="EntityGetAllChildUuids") + @attr.s(auto_attribs=True) class EntityGetAllChildUuids: - """ The response from the `EntityGetAllChildUuids` command. """ # noqa: E501 - entity_ids: Union[Unset, List[str]] = UNSET + """The response from the `EntityGetAllChildUuids` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + entity_ids: Union[Unset, List[str]] = UNSET - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict['entity_ids'] = entity_ids + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict["entity_ids"] = entity_ids - @classmethod - def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + return field_dict + @classmethod + def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - entity_get_all_child_uuids = cls( - entity_ids= entity_ids, - ) + entity_get_all_child_uuids = cls( + entity_ids=entity_ids, + ) - entity_get_all_child_uuids.additional_properties = d - return entity_get_all_child_uuids + entity_get_all_child_uuids.additional_properties = d + return entity_get_all_child_uuids - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/entity_get_child_uuid.py b/kittycad/models/entity_get_child_uuid.py index d562a84e2..47527fa28 100644 --- a/kittycad/models/entity_get_child_uuid.py +++ b/kittycad/models/entity_get_child_uuid.py @@ -4,51 +4,52 @@ from ..types import UNSET, Unset -NN = TypeVar("NN", bound="EntityGetChildUuid") +VI = TypeVar("VI", bound="EntityGetChildUuid") + @attr.s(auto_attribs=True) class EntityGetChildUuid: - """ The response from the `EntityGetChildUuid` command. """ # noqa: E501 - entity_id: Union[Unset, str] = UNSET + """The response from the `EntityGetChildUuid` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + entity_id: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict['entity_id'] = entity_id + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id - @classmethod - def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) - entity_get_child_uuid = cls( - entity_id= entity_id, - ) + entity_get_child_uuid = cls( + entity_id=entity_id, + ) - entity_get_child_uuid.additional_properties = d - return entity_get_child_uuid + entity_get_child_uuid.additional_properties = d + return entity_get_child_uuid - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/entity_get_num_children.py b/kittycad/models/entity_get_num_children.py index 034602fdd..b91d04e50 100644 --- a/kittycad/models/entity_get_num_children.py +++ b/kittycad/models/entity_get_num_children.py @@ -4,51 +4,52 @@ from ..types import UNSET, Unset -OH = TypeVar("OH", bound="EntityGetNumChildren") +ET = TypeVar("ET", bound="EntityGetNumChildren") + @attr.s(auto_attribs=True) class EntityGetNumChildren: - """ The response from the `EntityGetNumChildren` command. """ # noqa: E501 - num: Union[Unset, int] = UNSET + """The response from the `EntityGetNumChildren` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + num: Union[Unset, int] = UNSET - def to_dict(self) -> Dict[str, Any]: - num = self.num + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if num is not UNSET: - field_dict['num'] = num + def to_dict(self) -> Dict[str, Any]: + num = self.num - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if num is not UNSET: + field_dict["num"] = num - @classmethod - def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH: - d = src_dict.copy() - num = d.pop("num", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET: + d = src_dict.copy() + num = d.pop("num", UNSET) - entity_get_num_children = cls( - num= num, - ) + entity_get_num_children = cls( + num=num, + ) - entity_get_num_children.additional_properties = d - return entity_get_num_children + entity_get_num_children.additional_properties = d + return entity_get_num_children - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/entity_get_parent_id.py b/kittycad/models/entity_get_parent_id.py index b1c6a7655..09e579751 100644 --- a/kittycad/models/entity_get_parent_id.py +++ b/kittycad/models/entity_get_parent_id.py @@ -4,51 +4,52 @@ from ..types import UNSET, Unset -VI = TypeVar("VI", bound="EntityGetParentId") +QF = TypeVar("QF", bound="EntityGetParentId") + @attr.s(auto_attribs=True) class EntityGetParentId: - """ The response from the `EntityGetParentId` command. """ # noqa: E501 - entity_id: Union[Unset, str] = UNSET + """The response from the `EntityGetParentId` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + entity_id: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict['entity_id'] = entity_id + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id - @classmethod - def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) - entity_get_parent_id = cls( - entity_id= entity_id, - ) + entity_get_parent_id = cls( + entity_id=entity_id, + ) - entity_get_parent_id.additional_properties = d - return entity_get_parent_id + entity_get_parent_id.additional_properties = d + return entity_get_parent_id - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/entity_type.py b/kittycad/models/entity_type.py index ad4c3d69c..05fe5c865 100644 --- a/kittycad/models/entity_type.py +++ b/kittycad/models/entity_type.py @@ -2,16 +2,17 @@ class EntityType(str, Enum): - """ The type of entity """ # noqa: E501 - ENTITY = 'entity' - OBJECT = 'object' - PATH = 'path' - CURVE = 'curve' - SOLID2D = 'solid2d' - SOLID3D = 'solid3d' - EDGE = 'edge' - FACE = 'face' - PLANE = 'plane' + """The type of entity""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + ENTITY = "entity" + OBJECT = "object" + PATH = "path" + CURVE = "curve" + SOLID2D = "solid2d" + SOLID3D = "solid3d" + EDGE = "edge" + FACE = "face" + PLANE = "plane" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/environment.py b/kittycad/models/environment.py index 247118f7a..11163148f 100644 --- a/kittycad/models/environment.py +++ b/kittycad/models/environment.py @@ -2,13 +2,14 @@ class Environment(str, Enum): - """ The environment the server is running in. """ # noqa: E501 - """# The development environment. This is for running locally. """ # noqa: E501 - DEVELOPMENT = 'DEVELOPMENT' - """# The preview environment. This is when PRs are created and a service is deployed for testing. """ # noqa: E501 - PREVIEW = 'PREVIEW' - """# The production environment. """ # noqa: E501 - PRODUCTION = 'PRODUCTION' - - def __str__(self) -> str: - return str(self.value) + """The environment the server is running in.""" # noqa: E501 + + """# The development environment. This is for running locally. """ # noqa: E501 + DEVELOPMENT = "DEVELOPMENT" + """# The preview environment. This is when PRs are created and a service is deployed for testing. """ # noqa: E501 + PREVIEW = "PREVIEW" + """# The production environment. """ # noqa: E501 + PRODUCTION = "PRODUCTION" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/error.py b/kittycad/models/error.py index 8fec6aa40..0e1b3c520 100644 --- a/kittycad/models/error.py +++ b/kittycad/models/error.py @@ -4,65 +4,66 @@ from ..types import UNSET, Unset -ET = TypeVar("ET", bound="Error") +DI = TypeVar("DI", bound="Error") + @attr.s(auto_attribs=True) class Error: - """ Error information from a response. """ # noqa: E501 - error_code: Union[Unset, str] = UNSET - message: Union[Unset, str] = UNSET - request_id: Union[Unset, str] = UNSET + """Error information from a response.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + error_code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + request_id: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - error_code = self.error_code - message = self.message - request_id = self.request_id + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if error_code is not UNSET: - field_dict['error_code'] = error_code - if message is not UNSET: - field_dict['message'] = message - if request_id is not UNSET: - field_dict['request_id'] = request_id + def to_dict(self) -> Dict[str, Any]: + error_code = self.error_code + message = self.message + request_id = self.request_id - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if error_code is not UNSET: + field_dict["error_code"] = error_code + if message is not UNSET: + field_dict["message"] = message + if request_id is not UNSET: + field_dict["request_id"] = request_id - @classmethod - def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET: - d = src_dict.copy() - error_code = d.pop("error_code", UNSET) + return field_dict - message = d.pop("message", UNSET) + @classmethod + def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI: + d = src_dict.copy() + error_code = d.pop("error_code", UNSET) - request_id = d.pop("request_id", UNSET) + message = d.pop("message", UNSET) + request_id = d.pop("request_id", UNSET) - error = cls( - error_code= error_code, - message= message, - request_id= request_id, - ) + error = cls( + error_code=error_code, + message=message, + request_id=request_id, + ) - error.additional_properties = d - return error + error.additional_properties = d + return error - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/error_code.py b/kittycad/models/error_code.py index bf7dc4546..298238615 100644 --- a/kittycad/models/error_code.py +++ b/kittycad/models/error_code.py @@ -2,25 +2,26 @@ class ErrorCode(str, Enum): - """ The type of error sent by the KittyCAD API. """ # noqa: E501 - """# Graphics engine failed to complete request, consider retrying """ # noqa: E501 - INTERNAL_ENGINE = 'internal_engine' - """# API failed to complete request, consider retrying """ # noqa: E501 - INTERNAL_API = 'internal_api' - """# User requested something geometrically or graphically impossible. Don't retry this request, as it's inherently impossible. Instead, read the error message and change your request. """ # noqa: E501 - BAD_REQUEST = 'bad_request' - """# Client sent invalid JSON. """ # noqa: E501 - INVALID_JSON = 'invalid_json' - """# Client sent invalid BSON. """ # noqa: E501 - INVALID_BSON = 'invalid_bson' - """# Client sent a message which is not accepted over this protocol. """ # noqa: E501 - WRONG_PROTOCOL = 'wrong_protocol' - """# Problem sending data between client and KittyCAD API. """ # noqa: E501 - CONNECTION_PROBLEM = 'connection_problem' - """# Client sent a Websocket message type which the KittyCAD API does not handle. """ # noqa: E501 - MESSAGE_TYPE_NOT_ACCEPTED = 'message_type_not_accepted' - """# Client sent a Websocket message intended for WebRTC but it was configured as a WebRTC connection. """ # noqa: E501 - MESSAGE_TYPE_NOT_ACCEPTED_FOR_WEB_R_T_C = 'message_type_not_accepted_for_web_r_t_c' + """The type of error sent by the KittyCAD API.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# Graphics engine failed to complete request, consider retrying """ # noqa: E501 + INTERNAL_ENGINE = "internal_engine" + """# API failed to complete request, consider retrying """ # noqa: E501 + INTERNAL_API = "internal_api" + """# User requested something geometrically or graphically impossible. Don't retry this request, as it's inherently impossible. Instead, read the error message and change your request. """ # noqa: E501 + BAD_REQUEST = "bad_request" + """# Client sent invalid JSON. """ # noqa: E501 + INVALID_JSON = "invalid_json" + """# Client sent invalid BSON. """ # noqa: E501 + INVALID_BSON = "invalid_bson" + """# Client sent a message which is not accepted over this protocol. """ # noqa: E501 + WRONG_PROTOCOL = "wrong_protocol" + """# Problem sending data between client and KittyCAD API. """ # noqa: E501 + CONNECTION_PROBLEM = "connection_problem" + """# Client sent a Websocket message type which the KittyCAD API does not handle. """ # noqa: E501 + MESSAGE_TYPE_NOT_ACCEPTED = "message_type_not_accepted" + """# Client sent a Websocket message intended for WebRTC but it was configured as a WebRTC connection. """ # noqa: E501 + MESSAGE_TYPE_NOT_ACCEPTED_FOR_WEB_R_T_C = "message_type_not_accepted_for_web_r_t_c" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/export.py b/kittycad/models/export.py index c8639d305..caacdfcd2 100644 --- a/kittycad/models/export.py +++ b/kittycad/models/export.py @@ -4,56 +4,60 @@ from ..types import UNSET, Unset -QF = TypeVar("QF", bound="Export") +OJ = TypeVar("OJ", bound="Export") + @attr.s(auto_attribs=True) class Export: - """ The response from the `Export` endpoint. """ # noqa: E501 - from ..models.export_file import ExportFile - files: Union[Unset, List[ExportFile]] = UNSET + """The response from the `Export` endpoint.""" # noqa: E501 + + from ..models.export_file import ExportFile + + files: Union[Unset, List[ExportFile]] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + from ..models.export_file import ExportFile - def to_dict(self) -> Dict[str, Any]: - from ..models.export_file import ExportFile - files: Union[Unset, List[ExportFile]] = UNSET - if not isinstance(self.files, Unset): - files = self.files + files: Union[Unset, List[ExportFile]] = UNSET + if not isinstance(self.files, Unset): + files = self.files - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if files is not UNSET: - field_dict['files'] = files + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if files is not UNSET: + field_dict["files"] = files - return field_dict + return field_dict - @classmethod - def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF: - d = src_dict.copy() - from ..models.export_file import ExportFile - files = cast(List[ExportFile], d.pop("files", UNSET)) + @classmethod + def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ: + d = src_dict.copy() + from ..models.export_file import ExportFile + files = cast(List[ExportFile], d.pop("files", UNSET)) - export = cls( - files= files, - ) + export = cls( + files=files, + ) - export.additional_properties = d - return export + export.additional_properties = d + return export - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/export_file.py b/kittycad/models/export_file.py index 1fd130fe9..9a3c61bf7 100644 --- a/kittycad/models/export_file.py +++ b/kittycad/models/export_file.py @@ -5,65 +5,66 @@ from ..models.base64data import Base64Data from ..types import UNSET, Unset -DI = TypeVar("DI", bound="ExportFile") +UF = TypeVar("UF", bound="ExportFile") + @attr.s(auto_attribs=True) class ExportFile: - """ A file to be exported to the client. """ # noqa: E501 - contents: Union[Unset, Base64Data] = UNSET - name: Union[Unset, str] = UNSET + """A file to be exported to the client.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + contents: Union[Unset, Base64Data] = UNSET + name: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - contents: Union[Unset, str] = UNSET - if not isinstance(self.contents, Unset): - contents = self.contents.get_encoded() - name = self.name + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if contents is not UNSET: - field_dict['contents'] = contents - if name is not UNSET: - field_dict['name'] = name + def to_dict(self) -> Dict[str, Any]: + contents: Union[Unset, str] = UNSET + if not isinstance(self.contents, Unset): + contents = self.contents.get_encoded() + name = self.name - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contents is not UNSET: + field_dict["contents"] = contents + if name is not UNSET: + field_dict["name"] = name - @classmethod - def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI: - d = src_dict.copy() - _contents = d.pop("contents", UNSET) - contents: Union[Unset, Base64Data] - if isinstance(_contents, Unset): - contents = UNSET - else: - contents = Base64Data(bytes(_contents, 'utf-8')) + return field_dict - name = d.pop("name", UNSET) + @classmethod + def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF: + d = src_dict.copy() + _contents = d.pop("contents", UNSET) + contents: Union[Unset, Base64Data] + if isinstance(_contents, Unset): + contents = UNSET + else: + contents = Base64Data(bytes(_contents, "utf-8")) + name = d.pop("name", UNSET) - export_file = cls( - contents= contents, - name= name, - ) + export_file = cls( + contents=contents, + name=name, + ) - export_file.additional_properties = d - return export_file + export_file.additional_properties = d + return export_file - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/extended_user.py b/kittycad/models/extended_user.py index fd3594661..0d1ab6c61 100644 --- a/kittycad/models/extended_user.py +++ b/kittycad/models/extended_user.py @@ -4,181 +4,189 @@ import attr from dateutil.parser import isoparse +from ..models.uuid import Uuid from ..types import UNSET, Unset -OJ = TypeVar("OJ", bound="ExtendedUser") +YF = TypeVar("YF", bound="ExtendedUser") + @attr.s(auto_attribs=True) class ExtendedUser: - """ Extended user information. - -This is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Front """ # noqa: E501 - company: Union[Unset, str] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - discord: Union[Unset, str] = UNSET - email: Union[Unset, str] = UNSET - email_verified: Union[Unset, datetime.datetime] = UNSET - first_name: Union[Unset, str] = UNSET - front_id: Union[Unset, str] = UNSET - github: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - image: Union[Unset, str] = UNSET - last_name: Union[Unset, str] = UNSET - mailchimp_id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - phone: Union[Unset, str] = UNSET - stripe_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - company = self.company - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - discord = self.discord - email = self.email - email_verified: Union[Unset, str] = UNSET - if not isinstance(self.email_verified, Unset): - email_verified = self.email_verified.isoformat() - first_name = self.first_name - front_id = self.front_id - github = self.github - id = self.id - image = self.image - last_name = self.last_name - mailchimp_id = self.mailchimp_id - name = self.name - phone = self.phone - stripe_id = self.stripe_id - 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.update(self.additional_properties) - field_dict.update({}) - if company is not UNSET: - field_dict['company'] = company - if created_at is not UNSET: - field_dict['created_at'] = created_at - if discord is not UNSET: - field_dict['discord'] = discord - if email is not UNSET: - field_dict['email'] = email - if email_verified is not UNSET: - field_dict['email_verified'] = email_verified - if first_name is not UNSET: - field_dict['first_name'] = first_name - if front_id is not UNSET: - field_dict['front_id'] = front_id - if github is not UNSET: - field_dict['github'] = github - if id is not UNSET: - field_dict['id'] = id - if image is not UNSET: - field_dict['image'] = image - if last_name is not UNSET: - field_dict['last_name'] = last_name - if mailchimp_id is not UNSET: - field_dict['mailchimp_id'] = mailchimp_id - if name is not UNSET: - field_dict['name'] = name - if phone is not UNSET: - field_dict['phone'] = phone - if stripe_id is not UNSET: - field_dict['stripe_id'] = stripe_id - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ: - d = src_dict.copy() - company = d.pop("company", UNSET) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - discord = d.pop("discord", UNSET) - - email = d.pop("email", UNSET) - - _email_verified = d.pop("email_verified", UNSET) - email_verified: Union[Unset, datetime.datetime] - if isinstance(_email_verified, Unset): - email_verified = UNSET - else: - email_verified = isoparse(_email_verified) - - first_name = d.pop("first_name", UNSET) - - front_id = d.pop("front_id", UNSET) - - github = d.pop("github", UNSET) - - id = d.pop("id", UNSET) - - image = d.pop("image", UNSET) - - last_name = d.pop("last_name", UNSET) - - mailchimp_id = d.pop("mailchimp_id", UNSET) - - name = d.pop("name", UNSET) - - phone = d.pop("phone", UNSET) - - stripe_id = d.pop("stripe_id", UNSET) - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - - extended_user = cls( - company= company, - created_at= created_at, - discord= discord, - email= email, - email_verified= email_verified, - first_name= first_name, - front_id= front_id, - github= github, - id= id, - image= image, - last_name= last_name, - mailchimp_id= mailchimp_id, - name= name, - phone= phone, - stripe_id= stripe_id, - updated_at= updated_at, - ) - - extended_user.additional_properties = d - return extended_user - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Extended user information. + + This is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Front + """ # noqa: E501 + + company: Union[Unset, str] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + discord: Union[Unset, str] = UNSET + email: Union[Unset, str] = UNSET + email_verified: Union[Unset, datetime.datetime] = UNSET + first_name: Union[Unset, str] = UNSET + front_id: Union[Unset, str] = UNSET + github: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + image: Union[Unset, str] = UNSET + last_name: Union[Unset, str] = UNSET + mailchimp_id: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + phone: Union[Unset, str] = UNSET + stripe_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + company = self.company + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + discord = self.discord + email = self.email + email_verified: Union[Unset, str] = UNSET + if not isinstance(self.email_verified, Unset): + email_verified = self.email_verified.isoformat() + first_name = self.first_name + front_id = self.front_id + github = self.github + id = self.id + image = self.image + last_name = self.last_name + mailchimp_id = self.mailchimp_id + name = self.name + phone = self.phone + stripe_id = self.stripe_id + 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.update(self.additional_properties) + field_dict.update({}) + if company is not UNSET: + field_dict["company"] = company + if created_at is not UNSET: + field_dict["created_at"] = created_at + if discord is not UNSET: + field_dict["discord"] = discord + if email is not UNSET: + field_dict["email"] = email + if email_verified is not UNSET: + field_dict["email_verified"] = email_verified + if first_name is not UNSET: + field_dict["first_name"] = first_name + if front_id is not UNSET: + field_dict["front_id"] = front_id + if github is not UNSET: + field_dict["github"] = github + if id is not UNSET: + field_dict["id"] = id + if image is not UNSET: + field_dict["image"] = image + if last_name is not UNSET: + field_dict["last_name"] = last_name + if mailchimp_id is not UNSET: + field_dict["mailchimp_id"] = mailchimp_id + if name is not UNSET: + field_dict["name"] = name + if phone is not UNSET: + field_dict["phone"] = phone + if stripe_id is not UNSET: + field_dict["stripe_id"] = stripe_id + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF: + d = src_dict.copy() + company = d.pop("company", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + discord = d.pop("discord", UNSET) + + email = d.pop("email", UNSET) + + _email_verified = d.pop("email_verified", UNSET) + email_verified: Union[Unset, datetime.datetime] + if isinstance(_email_verified, Unset): + email_verified = UNSET + else: + email_verified = isoparse(_email_verified) + + first_name = d.pop("first_name", UNSET) + + front_id = d.pop("front_id", UNSET) + + github = d.pop("github", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + image = d.pop("image", UNSET) + + last_name = d.pop("last_name", UNSET) + + mailchimp_id = d.pop("mailchimp_id", UNSET) + + name = d.pop("name", UNSET) + + phone = d.pop("phone", UNSET) + + stripe_id = d.pop("stripe_id", UNSET) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + extended_user = cls( + company=company, + created_at=created_at, + discord=discord, + email=email, + email_verified=email_verified, + first_name=first_name, + front_id=front_id, + github=github, + id=id, + image=image, + last_name=last_name, + mailchimp_id=mailchimp_id, + name=name, + phone=phone, + stripe_id=stripe_id, + updated_at=updated_at, + ) + + extended_user.additional_properties = d + return extended_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/extended_user_results_page.py b/kittycad/models/extended_user_results_page.py index f24bfb40b..cf2f77ad4 100644 --- a/kittycad/models/extended_user_results_page.py +++ b/kittycad/models/extended_user_results_page.py @@ -4,63 +4,67 @@ from ..types import UNSET, Unset -UF = TypeVar("UF", bound="ExtendedUserResultsPage") +PY = TypeVar("PY", bound="ExtendedUserResultsPage") + @attr.s(auto_attribs=True) class ExtendedUserResultsPage: - """ A single page of results """ # noqa: E501 - from ..models.extended_user import ExtendedUser - items: Union[Unset, List[ExtendedUser]] = UNSET - next_page: Union[Unset, str] = UNSET + """A single page of results""" # noqa: E501 + + from ..models.extended_user import ExtendedUser + + items: Union[Unset, List[ExtendedUser]] = UNSET + next_page: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + from ..models.extended_user import ExtendedUser - def to_dict(self) -> Dict[str, Any]: - from ..models.extended_user import ExtendedUser - items: Union[Unset, List[ExtendedUser]] = UNSET - if not isinstance(self.items, Unset): - items = self.items - next_page = self.next_page + items: Union[Unset, List[ExtendedUser]] = UNSET + if not isinstance(self.items, Unset): + items = self.items + next_page = self.next_page - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if items is not UNSET: - field_dict['items'] = items - if next_page is not UNSET: - field_dict['next_page'] = next_page + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if items is not UNSET: + field_dict["items"] = items + if next_page is not UNSET: + field_dict["next_page"] = next_page - return field_dict + return field_dict - @classmethod - def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF: - d = src_dict.copy() - from ..models.extended_user import ExtendedUser - items = cast(List[ExtendedUser], d.pop("items", UNSET)) + @classmethod + def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY: + d = src_dict.copy() + from ..models.extended_user import ExtendedUser - next_page = d.pop("next_page", UNSET) + items = cast(List[ExtendedUser], d.pop("items", UNSET)) + next_page = d.pop("next_page", UNSET) - extended_user_results_page = cls( - items= items, - next_page= next_page, - ) + extended_user_results_page = cls( + items=items, + next_page=next_page, + ) - extended_user_results_page.additional_properties = d - return extended_user_results_page + extended_user_results_page.additional_properties = d + return extended_user_results_page - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/failure_web_socket_response.py b/kittycad/models/failure_web_socket_response.py index 341d41749..b68fecb0a 100644 --- a/kittycad/models/failure_web_socket_response.py +++ b/kittycad/models/failure_web_socket_response.py @@ -4,70 +4,74 @@ from ..types import UNSET, Unset -YF = TypeVar("YF", bound="FailureWebSocketResponse") +LK = TypeVar("LK", bound="FailureWebSocketResponse") + @attr.s(auto_attribs=True) class FailureWebSocketResponse: - """ Unsuccessful Websocket response. """ # noqa: E501 - from ..models.api_error import ApiError - errors: Union[Unset, List[ApiError]] = UNSET - request_id: Union[Unset, str] = UNSET - success: Union[Unset, bool] = False + """Unsuccessful Websocket response.""" # noqa: E501 + + from ..models.api_error import ApiError + + errors: Union[Unset, List[ApiError]] = UNSET + request_id: Union[Unset, str] = UNSET + success: Union[Unset, bool] = False + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + from ..models.api_error import ApiError - def to_dict(self) -> Dict[str, Any]: - from ..models.api_error import ApiError - errors: Union[Unset, List[ApiError]] = UNSET - if not isinstance(self.errors, Unset): - errors = self.errors - request_id = self.request_id - success = self.success + errors: Union[Unset, List[ApiError]] = UNSET + if not isinstance(self.errors, Unset): + errors = self.errors + request_id = self.request_id + success = self.success - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if errors is not UNSET: - field_dict['errors'] = errors - if request_id is not UNSET: - field_dict['request_id'] = request_id - if success is not UNSET: - field_dict['success'] = success + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + if request_id is not UNSET: + field_dict["request_id"] = request_id + if success is not UNSET: + field_dict["success"] = success - return field_dict + return field_dict - @classmethod - def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF: - d = src_dict.copy() - from ..models.api_error import ApiError - errors = cast(List[ApiError], d.pop("errors", UNSET)) + @classmethod + def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK: + d = src_dict.copy() + from ..models.api_error import ApiError - request_id = d.pop("request_id", UNSET) + errors = cast(List[ApiError], d.pop("errors", UNSET)) - success = d.pop("success", UNSET) + request_id = d.pop("request_id", UNSET) + success = d.pop("success", UNSET) - failure_web_socket_response = cls( - errors= errors, - request_id= request_id, - success= success, - ) + failure_web_socket_response = cls( + errors=errors, + request_id=request_id, + success=success, + ) - failure_web_socket_response.additional_properties = d - return failure_web_socket_response + failure_web_socket_response.additional_properties = d + return failure_web_socket_response - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/fbx_storage.py b/kittycad/models/fbx_storage.py index a90daf0ec..b3dc44cc4 100644 --- a/kittycad/models/fbx_storage.py +++ b/kittycad/models/fbx_storage.py @@ -2,11 +2,12 @@ class FbxStorage(str, Enum): - """ Describes the storage format of an FBX file. """ # noqa: E501 - """# ASCII FBX encoding. """ # noqa: E501 - ASCII = 'ascii' - """# Binary FBX encoding. """ # noqa: E501 - BINARY = 'binary' - - def __str__(self) -> str: - return str(self.value) + """Describes the storage format of an FBX file.""" # noqa: E501 + + """# ASCII FBX encoding. """ # noqa: E501 + ASCII = "ascii" + """# Binary FBX encoding. """ # noqa: E501 + BINARY = "binary" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/file_center_of_mass.py b/kittycad/models/file_center_of_mass.py index a2c7cafca..188548adc 100644 --- a/kittycad/models/file_center_of_mass.py +++ b/kittycad/models/file_center_of_mass.py @@ -11,178 +11,184 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -PY = TypeVar("PY", bound="FileCenterOfMass") +AR = TypeVar("AR", bound="FileCenterOfMass") + @attr.s(auto_attribs=True) class FileCenterOfMass: - """ A file center of mass result. """ # noqa: E501 - center_of_mass: Union[Unset, Point3d] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_unit: Union[Unset, UnitLength] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.center_of_mass, Unset): - center_of_mass = self.center_of_mass - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if center_of_mass is not UNSET: - field_dict['center_of_mass'] = center_of_mass - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if src_format is not UNSET: - field_dict['src_format'] = src_format - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY: - d = src_dict.copy() - _center_of_mass = d.pop("center_of_mass", UNSET) - center_of_mass: Union[Unset, Point3d] - if isinstance(_center_of_mass, Unset): - center_of_mass = UNSET - else: - center_of_mass = _center_of_mass # type: ignore[arg-type] - - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitLength] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - file_center_of_mass = cls( - center_of_mass= center_of_mass, - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - output_unit= output_unit, - src_format= src_format, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - file_center_of_mass.additional_properties = d - return file_center_of_mass - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """A file center of mass result.""" # noqa: E501 + + center_of_mass: Union[Unset, Point3d] = UNSET + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitLength] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.center_of_mass, Unset): + center_of_mass = self.center_of_mass + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if center_of_mass is not UNSET: + field_dict["center_of_mass"] = center_of_mass + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if src_format is not UNSET: + field_dict["src_format"] = src_format + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR: + d = src_dict.copy() + _center_of_mass = d.pop("center_of_mass", UNSET) + center_of_mass: Union[Unset, Point3d] + if isinstance(_center_of_mass, Unset): + center_of_mass = UNSET + else: + center_of_mass = _center_of_mass # type: ignore[arg-type] + + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitLength] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + file_center_of_mass = cls( + center_of_mass=center_of_mass, + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + output_unit=output_unit, + src_format=src_format, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + file_center_of_mass.additional_properties = d + return file_center_of_mass + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/file_conversion.py b/kittycad/models/file_conversion.py index bc667cf88..475be868e 100644 --- a/kittycad/models/file_conversion.py +++ b/kittycad/models/file_conversion.py @@ -13,210 +13,216 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -LK = TypeVar("LK", bound="FileConversion") +WB = TypeVar("WB", bound="FileConversion") + @attr.s(auto_attribs=True) class FileConversion: - """ A file conversion. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_format: Union[Unset, FileExportFormat] = UNSET - output_format_options: Union[Unset, OutputFormat] = UNSET - outputs: Union[Unset, Dict[str, Base64Data]] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - src_format_options: Union[Unset, InputFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - if not isinstance(self.output_format, Unset): - output_format = self.output_format - if not isinstance(self.output_format_options, Unset): - output_format_options = self.output_format_options - outputs: Union[Unset, Dict[str, str]] = UNSET - if not isinstance(self.outputs, Unset): - new_dict: Dict[str, str] = {} - for key, value in self.outputs.items(): - new_dict[key] = value.get_encoded() - outputs = new_dict - if not isinstance(self.src_format, Unset): - src_format = self.src_format - if not isinstance(self.src_format_options, Unset): - src_format_options = self.src_format_options - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if output_format is not UNSET: - field_dict['output_format'] = output_format - if output_format_options is not UNSET: - field_dict['output_format_options'] = output_format_options - if outputs is not UNSET: - field_dict['outputs'] = outputs - if src_format is not UNSET: - field_dict['src_format'] = src_format - if src_format_options is not UNSET: - field_dict['src_format_options'] = src_format_options - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - _output_format = d.pop("output_format", UNSET) - output_format: Union[Unset, FileExportFormat] - if isinstance(_output_format, Unset): - output_format = UNSET - else: - output_format = _output_format # type: ignore[arg-type] - - _output_format_options = d.pop("output_format_options", UNSET) - output_format_options: Union[Unset, OutputFormat] - if isinstance(_output_format_options, Unset): - output_format_options = UNSET - else: - output_format_options = _output_format_options # type: ignore[arg-type] - - _outputs = d.pop("outputs", UNSET) - if isinstance(_outputs, Unset): - outputs = UNSET - else: - new_map: Dict[str, Base64Data] = {} - for k, v in _outputs.items(): - new_map[k] = Base64Data(bytes(v, 'utf-8')) - outputs = new_map # type: ignore - - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] - - _src_format_options = d.pop("src_format_options", UNSET) - src_format_options: Union[Unset, InputFormat] - if isinstance(_src_format_options, Unset): - src_format_options = UNSET - else: - src_format_options = _src_format_options # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - file_conversion = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - output_format= output_format, - output_format_options= output_format_options, - outputs= outputs, - src_format= src_format, - src_format_options= src_format_options, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - file_conversion.additional_properties = d - return file_conversion - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """A file conversion.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_format: Union[Unset, FileExportFormat] = UNSET + output_format_options: Union[Unset, OutputFormat] = UNSET + outputs: Union[Unset, Dict[str, Base64Data]] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + src_format_options: Union[Unset, InputFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + if not isinstance(self.output_format, Unset): + output_format = self.output_format + if not isinstance(self.output_format_options, Unset): + output_format_options = self.output_format_options + outputs: Union[Unset, Dict[str, str]] = UNSET + if not isinstance(self.outputs, Unset): + new_dict: Dict[str, str] = {} + for key, value in self.outputs.items(): + new_dict[key] = value.get_encoded() + outputs = new_dict + if not isinstance(self.src_format, Unset): + src_format = self.src_format + if not isinstance(self.src_format_options, Unset): + src_format_options = self.src_format_options + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if output_format is not UNSET: + field_dict["output_format"] = output_format + if output_format_options is not UNSET: + field_dict["output_format_options"] = output_format_options + if outputs is not UNSET: + field_dict["outputs"] = outputs + if src_format is not UNSET: + field_dict["src_format"] = src_format + if src_format_options is not UNSET: + field_dict["src_format_options"] = src_format_options + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + _output_format = d.pop("output_format", UNSET) + output_format: Union[Unset, FileExportFormat] + if isinstance(_output_format, Unset): + output_format = UNSET + else: + output_format = _output_format # type: ignore[arg-type] + + _output_format_options = d.pop("output_format_options", UNSET) + output_format_options: Union[Unset, OutputFormat] + if isinstance(_output_format_options, Unset): + output_format_options = UNSET + else: + output_format_options = _output_format_options # type: ignore[arg-type] + + _outputs = d.pop("outputs", UNSET) + if isinstance(_outputs, Unset): + outputs = UNSET + else: + new_map: Dict[str, Base64Data] = {} + for k, v in _outputs.items(): + new_map[k] = Base64Data(bytes(v, "utf-8")) + outputs = new_map # type: ignore + + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] + + _src_format_options = d.pop("src_format_options", UNSET) + src_format_options: Union[Unset, InputFormat] + if isinstance(_src_format_options, Unset): + src_format_options = UNSET + else: + src_format_options = _src_format_options # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + file_conversion = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + output_format=output_format, + output_format_options=output_format_options, + outputs=outputs, + src_format=src_format, + src_format_options=src_format_options, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + file_conversion.additional_properties = d + return file_conversion + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/file_density.py b/kittycad/models/file_density.py index 5a3118796..22bb0ad01 100644 --- a/kittycad/models/file_density.py +++ b/kittycad/models/file_density.py @@ -11,192 +11,198 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -AR = TypeVar("AR", bound="FileDensity") +KK = TypeVar("KK", bound="FileDensity") + @attr.s(auto_attribs=True) class FileDensity: - """ A file density result. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - density: Union[Unset, float] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - material_mass: Union[Unset, float] = UNSET - material_mass_unit: Union[Unset, UnitMass] = UNSET - output_unit: Union[Unset, UnitDensity] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - density = self.density - error = self.error - id = self.id - material_mass = self.material_mass - if not isinstance(self.material_mass_unit, Unset): - material_mass_unit = self.material_mass_unit - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if density is not UNSET: - field_dict['density'] = density - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if material_mass is not UNSET: - field_dict['material_mass'] = material_mass - if material_mass_unit is not UNSET: - field_dict['material_mass_unit'] = material_mass_unit - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if src_format is not UNSET: - field_dict['src_format'] = src_format - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - density = d.pop("density", UNSET) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - material_mass = d.pop("material_mass", UNSET) - - _material_mass_unit = d.pop("material_mass_unit", UNSET) - material_mass_unit: Union[Unset, UnitMass] - if isinstance(_material_mass_unit, Unset): - material_mass_unit = UNSET - else: - material_mass_unit = _material_mass_unit # type: ignore[arg-type] - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitDensity] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - file_density = cls( - completed_at= completed_at, - created_at= created_at, - density= density, - error= error, - id= id, - material_mass= material_mass, - material_mass_unit= material_mass_unit, - output_unit= output_unit, - src_format= src_format, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - file_density.additional_properties = d - return file_density - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """A file density result.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + density: Union[Unset, float] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + material_mass: Union[Unset, float] = UNSET + material_mass_unit: Union[Unset, UnitMass] = UNSET + output_unit: Union[Unset, UnitDensity] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + density = self.density + error = self.error + id = self.id + material_mass = self.material_mass + if not isinstance(self.material_mass_unit, Unset): + material_mass_unit = self.material_mass_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if density is not UNSET: + field_dict["density"] = density + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if material_mass is not UNSET: + field_dict["material_mass"] = material_mass + if material_mass_unit is not UNSET: + field_dict["material_mass_unit"] = material_mass_unit + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if src_format is not UNSET: + field_dict["src_format"] = src_format + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + density = d.pop("density", UNSET) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + material_mass = d.pop("material_mass", UNSET) + + _material_mass_unit = d.pop("material_mass_unit", UNSET) + material_mass_unit: Union[Unset, UnitMass] + if isinstance(_material_mass_unit, Unset): + material_mass_unit = UNSET + else: + material_mass_unit = _material_mass_unit # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitDensity] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + file_density = cls( + completed_at=completed_at, + created_at=created_at, + density=density, + error=error, + id=id, + material_mass=material_mass, + material_mass_unit=material_mass_unit, + output_unit=output_unit, + src_format=src_format, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + file_density.additional_properties = d + return file_density + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/file_export_format.py b/kittycad/models/file_export_format.py index 6fbb8fe52..d1eee8886 100644 --- a/kittycad/models/file_export_format.py +++ b/kittycad/models/file_export_format.py @@ -2,31 +2,32 @@ class FileExportFormat(str, Enum): - """ The valid types of output file formats. """ # noqa: E501 - """# Autodesk Filmbox (FBX) format. """ # noqa: E501 - FBX = 'fbx' - """# Binary glTF 2.0. + """The valid types of output file formats.""" # noqa: E501 + + """# Autodesk Filmbox (FBX) format. """ # noqa: E501 + FBX = "fbx" + """# Binary glTF 2.0. This is a single binary with .glb extension. -This is better if you want a compressed format as opposed to the human readable glTF that lacks compression. """ # noqa: E501 - GLB = 'glb' - """# glTF 2.0. Embedded glTF 2.0 (pretty printed). +This is better if you want a compressed format as opposed to the human readable glTF that lacks compression. """ # noqa: E501 + GLB = "glb" + """# glTF 2.0. Embedded glTF 2.0 (pretty printed). Single JSON file with .gltf extension binary data encoded as base64 data URIs. The JSON contents are pretty printed. -It is human readable, single file, and you can view the diff easily in a git commit. """ # noqa: E501 - GLTF = 'gltf' - """# The OBJ file format. It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not. """ # noqa: E501 - OBJ = 'obj' - """# The PLY file format. """ # noqa: E501 - PLY = 'ply' - """# The STEP file format. """ # noqa: E501 - STEP = 'step' - """# The STL file format. """ # noqa: E501 - STL = 'stl' - - def __str__(self) -> str: - return str(self.value) +It is human readable, single file, and you can view the diff easily in a git commit. """ # noqa: E501 + GLTF = "gltf" + """# The OBJ file format. It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not. """ # noqa: E501 + OBJ = "obj" + """# The PLY file format. """ # noqa: E501 + PLY = "ply" + """# The STEP file format. """ # noqa: E501 + STEP = "step" + """# The STL file format. """ # noqa: E501 + STL = "stl" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/file_import_format.py b/kittycad/models/file_import_format.py index 377b0a773..92ae78571 100644 --- a/kittycad/models/file_import_format.py +++ b/kittycad/models/file_import_format.py @@ -2,21 +2,22 @@ class FileImportFormat(str, Enum): - """ The valid types of source file formats. """ # noqa: E501 - """# Autodesk Filmbox (FBX) format. """ # noqa: E501 - FBX = 'fbx' - """# glTF 2.0. """ # noqa: E501 - GLTF = 'gltf' - """# The OBJ file format. It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not. """ # noqa: E501 - OBJ = 'obj' - """# The PLY file format. """ # noqa: E501 - PLY = 'ply' - """# SolidWorks part (SLDPRT) format. """ # noqa: E501 - SLDPRT = 'sldprt' - """# The STEP file format. """ # noqa: E501 - STEP = 'step' - """# The STL file format. """ # noqa: E501 - STL = 'stl' + """The valid types of source file formats.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# Autodesk Filmbox (FBX) format. """ # noqa: E501 + FBX = "fbx" + """# glTF 2.0. """ # noqa: E501 + GLTF = "gltf" + """# The OBJ file format. It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not. """ # noqa: E501 + OBJ = "obj" + """# The PLY file format. """ # noqa: E501 + PLY = "ply" + """# SolidWorks part (SLDPRT) format. """ # noqa: E501 + SLDPRT = "sldprt" + """# The STEP file format. """ # noqa: E501 + STEP = "step" + """# The STL file format. """ # noqa: E501 + STL = "stl" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/file_mass.py b/kittycad/models/file_mass.py index 4e0c66faa..d2859bd3f 100644 --- a/kittycad/models/file_mass.py +++ b/kittycad/models/file_mass.py @@ -11,192 +11,198 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -WB = TypeVar("WB", bound="FileMass") +HC = TypeVar("HC", bound="FileMass") + @attr.s(auto_attribs=True) class FileMass: - """ A file mass result. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - mass: Union[Unset, float] = UNSET - material_density: Union[Unset, float] = UNSET - material_density_unit: Union[Unset, UnitDensity] = UNSET - output_unit: Union[Unset, UnitMass] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - mass = self.mass - material_density = self.material_density - if not isinstance(self.material_density_unit, Unset): - material_density_unit = self.material_density_unit - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if mass is not UNSET: - field_dict['mass'] = mass - if material_density is not UNSET: - field_dict['material_density'] = material_density - if material_density_unit is not UNSET: - field_dict['material_density_unit'] = material_density_unit - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if src_format is not UNSET: - field_dict['src_format'] = src_format - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - mass = d.pop("mass", UNSET) - - material_density = d.pop("material_density", UNSET) - - _material_density_unit = d.pop("material_density_unit", UNSET) - material_density_unit: Union[Unset, UnitDensity] - if isinstance(_material_density_unit, Unset): - material_density_unit = UNSET - else: - material_density_unit = _material_density_unit # type: ignore[arg-type] - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitMass] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - file_mass = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - mass= mass, - material_density= material_density, - material_density_unit= material_density_unit, - output_unit= output_unit, - src_format= src_format, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - file_mass.additional_properties = d - return file_mass - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """A file mass result.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + mass: Union[Unset, float] = UNSET + material_density: Union[Unset, float] = UNSET + material_density_unit: Union[Unset, UnitDensity] = UNSET + output_unit: Union[Unset, UnitMass] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + mass = self.mass + material_density = self.material_density + if not isinstance(self.material_density_unit, Unset): + material_density_unit = self.material_density_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if mass is not UNSET: + field_dict["mass"] = mass + if material_density is not UNSET: + field_dict["material_density"] = material_density + if material_density_unit is not UNSET: + field_dict["material_density_unit"] = material_density_unit + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if src_format is not UNSET: + field_dict["src_format"] = src_format + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + mass = d.pop("mass", UNSET) + + material_density = d.pop("material_density", UNSET) + + _material_density_unit = d.pop("material_density_unit", UNSET) + material_density_unit: Union[Unset, UnitDensity] + if isinstance(_material_density_unit, Unset): + material_density_unit = UNSET + else: + material_density_unit = _material_density_unit # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitMass] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + file_mass = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + mass=mass, + material_density=material_density, + material_density_unit=material_density_unit, + output_unit=output_unit, + src_format=src_format, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + file_mass.additional_properties = d + return file_mass + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/file_surface_area.py b/kittycad/models/file_surface_area.py index 4b914f942..30e580001 100644 --- a/kittycad/models/file_surface_area.py +++ b/kittycad/models/file_surface_area.py @@ -10,172 +10,178 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -KK = TypeVar("KK", bound="FileSurfaceArea") +FM = TypeVar("FM", bound="FileSurfaceArea") + @attr.s(auto_attribs=True) class FileSurfaceArea: - """ A file surface area result. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_unit: Union[Unset, UnitArea] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - surface_area: Union[Unset, float] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - surface_area = self.surface_area - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if src_format is not UNSET: - field_dict['src_format'] = src_format - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if surface_area is not UNSET: - field_dict['surface_area'] = surface_area - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitArea] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - surface_area = d.pop("surface_area", UNSET) - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - file_surface_area = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - output_unit= output_unit, - src_format= src_format, - started_at= started_at, - status= status, - surface_area= surface_area, - updated_at= updated_at, - user_id= user_id, - ) - - file_surface_area.additional_properties = d - return file_surface_area - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """A file surface area result.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitArea] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + surface_area: Union[Unset, float] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + surface_area = self.surface_area + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if src_format is not UNSET: + field_dict["src_format"] = src_format + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if surface_area is not UNSET: + field_dict["surface_area"] = surface_area + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitArea] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + surface_area = d.pop("surface_area", UNSET) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + file_surface_area = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + output_unit=output_unit, + src_format=src_format, + started_at=started_at, + status=status, + surface_area=surface_area, + updated_at=updated_at, + user_id=user_id, + ) + + file_surface_area.additional_properties = d + return file_surface_area + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/file_system_metadata.py b/kittycad/models/file_system_metadata.py index 70a6494ba..eeb7c5b28 100644 --- a/kittycad/models/file_system_metadata.py +++ b/kittycad/models/file_system_metadata.py @@ -4,53 +4,54 @@ from ..types import UNSET, Unset -HC = TypeVar("HC", bound="FileSystemMetadata") +PV = TypeVar("PV", bound="FileSystemMetadata") + @attr.s(auto_attribs=True) class FileSystemMetadata: - """ Metadata about our file system. + """Metadata about our file system. -This is mostly used for internal purposes and debugging. """ # noqa: E501 - ok: Union[Unset, bool] = False + This is mostly used for internal purposes and debugging.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + ok: Union[Unset, bool] = False - def to_dict(self) -> Dict[str, Any]: - ok = self.ok + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if ok is not UNSET: - field_dict['ok'] = ok + def to_dict(self) -> Dict[str, Any]: + ok = self.ok - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if ok is not UNSET: + field_dict["ok"] = ok - @classmethod - def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC: - d = src_dict.copy() - ok = d.pop("ok", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV: + d = src_dict.copy() + ok = d.pop("ok", UNSET) - file_system_metadata = cls( - ok= ok, - ) + file_system_metadata = cls( + ok=ok, + ) - file_system_metadata.additional_properties = d - return file_system_metadata + file_system_metadata.additional_properties = d + return file_system_metadata - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/file_volume.py b/kittycad/models/file_volume.py index 6edabb6f8..841780914 100644 --- a/kittycad/models/file_volume.py +++ b/kittycad/models/file_volume.py @@ -10,172 +10,178 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -FM = TypeVar("FM", bound="FileVolume") +QI = TypeVar("QI", bound="FileVolume") + @attr.s(auto_attribs=True) class FileVolume: - """ A file volume result. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_unit: Union[Unset, UnitVolume] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - volume: Union[Unset, float] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - volume = self.volume - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if src_format is not UNSET: - field_dict['src_format'] = src_format - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - if volume is not UNSET: - field_dict['volume'] = volume - - return field_dict - - @classmethod - def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitVolume] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - volume = d.pop("volume", UNSET) - - - file_volume = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - output_unit= output_unit, - src_format= src_format, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - volume= volume, - ) - - file_volume.additional_properties = d - return file_volume - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """A file volume result.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitVolume] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + volume: Union[Unset, float] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + volume = self.volume + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if src_format is not UNSET: + field_dict["src_format"] = src_format + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + if volume is not UNSET: + field_dict["volume"] = volume + + return field_dict + + @classmethod + def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitVolume] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + volume = d.pop("volume", UNSET) + + file_volume = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + output_unit=output_unit, + src_format=src_format, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + volume=volume, + ) + + file_volume.additional_properties = d + return file_volume + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/gateway.py b/kittycad/models/gateway.py index 40f35dc0f..48dc34d9f 100644 --- a/kittycad/models/gateway.py +++ b/kittycad/models/gateway.py @@ -4,79 +4,80 @@ from ..types import UNSET, Unset -PV = TypeVar("PV", bound="Gateway") +TP = TypeVar("TP", bound="Gateway") + @attr.s(auto_attribs=True) class Gateway: - """ Gateway information. """ # noqa: E501 - auth_timeout: Union[Unset, int] = UNSET - host: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - port: Union[Unset, int] = UNSET - tls_timeout: Union[Unset, int] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - auth_timeout = self.auth_timeout - host = self.host - name = self.name - port = self.port - tls_timeout = self.tls_timeout - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if auth_timeout is not UNSET: - field_dict['auth_timeout'] = auth_timeout - if host is not UNSET: - field_dict['host'] = host - if name is not UNSET: - field_dict['name'] = name - if port is not UNSET: - field_dict['port'] = port - if tls_timeout is not UNSET: - field_dict['tls_timeout'] = tls_timeout - - return field_dict - - @classmethod - def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV: - d = src_dict.copy() - auth_timeout = d.pop("auth_timeout", UNSET) - - host = d.pop("host", UNSET) - - name = d.pop("name", UNSET) - - port = d.pop("port", UNSET) - - tls_timeout = d.pop("tls_timeout", UNSET) - - - gateway = cls( - auth_timeout= auth_timeout, - host= host, - name= name, - port= port, - tls_timeout= tls_timeout, - ) - - gateway.additional_properties = d - return gateway - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Gateway information.""" # noqa: E501 + + auth_timeout: Union[Unset, int] = UNSET + host: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + port: Union[Unset, int] = UNSET + tls_timeout: Union[Unset, int] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + auth_timeout = self.auth_timeout + host = self.host + name = self.name + port = self.port + tls_timeout = self.tls_timeout + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if auth_timeout is not UNSET: + field_dict["auth_timeout"] = auth_timeout + if host is not UNSET: + field_dict["host"] = host + if name is not UNSET: + field_dict["name"] = name + if port is not UNSET: + field_dict["port"] = port + if tls_timeout is not UNSET: + field_dict["tls_timeout"] = tls_timeout + + return field_dict + + @classmethod + def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP: + d = src_dict.copy() + auth_timeout = d.pop("auth_timeout", UNSET) + + host = d.pop("host", UNSET) + + name = d.pop("name", UNSET) + + port = d.pop("port", UNSET) + + tls_timeout = d.pop("tls_timeout", UNSET) + + gateway = cls( + auth_timeout=auth_timeout, + host=host, + name=name, + port=port, + tls_timeout=tls_timeout, + ) + + gateway.additional_properties = d + return gateway + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/get_entity_type.py b/kittycad/models/get_entity_type.py index 0365736a7..23b84df82 100644 --- a/kittycad/models/get_entity_type.py +++ b/kittycad/models/get_entity_type.py @@ -5,57 +5,58 @@ from ..models.entity_type import EntityType from ..types import UNSET, Unset -QI = TypeVar("QI", bound="GetEntityType") +CF = TypeVar("CF", bound="GetEntityType") + @attr.s(auto_attribs=True) class GetEntityType: - """ The response from the `GetEntityType` command. """ # noqa: E501 - entity_type: Union[Unset, EntityType] = UNSET + """The response from the `GetEntityType` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + entity_type: Union[Unset, EntityType] = UNSET - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.entity_type, Unset): - entity_type = self.entity_type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_type is not UNSET: - field_dict['entity_type'] = entity_type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.entity_type, Unset): + entity_type = self.entity_type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_type is not UNSET: + field_dict["entity_type"] = entity_type - @classmethod - def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI: - d = src_dict.copy() - _entity_type = d.pop("entity_type", UNSET) - entity_type: Union[Unset, EntityType] - if isinstance(_entity_type, Unset): - entity_type = UNSET - else: - entity_type = _entity_type # type: ignore[arg-type] + return field_dict + @classmethod + def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF: + d = src_dict.copy() + _entity_type = d.pop("entity_type", UNSET) + entity_type: Union[Unset, EntityType] + if isinstance(_entity_type, Unset): + entity_type = UNSET + else: + entity_type = _entity_type # type: ignore[arg-type] - get_entity_type = cls( - entity_type= entity_type, - ) + get_entity_type = cls( + entity_type=entity_type, + ) - get_entity_type.additional_properties = d - return get_entity_type + get_entity_type.additional_properties = d + return get_entity_type - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/get_sketch_mode_plane.py b/kittycad/models/get_sketch_mode_plane.py index 13f09725b..614ff526f 100644 --- a/kittycad/models/get_sketch_mode_plane.py +++ b/kittycad/models/get_sketch_mode_plane.py @@ -5,83 +5,84 @@ from ..models.point3d import Point3d from ..types import UNSET, Unset -TP = TypeVar("TP", bound="GetSketchModePlane") +OM = TypeVar("OM", bound="GetSketchModePlane") + @attr.s(auto_attribs=True) class GetSketchModePlane: - """ The plane for sketch mode. """ # noqa: E501 - x_axis: Union[Unset, Point3d] = UNSET - y_axis: Union[Unset, Point3d] = UNSET - z_axis: Union[Unset, Point3d] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.x_axis, Unset): - x_axis = self.x_axis - if not isinstance(self.y_axis, Unset): - y_axis = self.y_axis - if not isinstance(self.z_axis, Unset): - z_axis = self.z_axis - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if x_axis is not UNSET: - field_dict['x_axis'] = x_axis - if y_axis is not UNSET: - field_dict['y_axis'] = y_axis - if z_axis is not UNSET: - field_dict['z_axis'] = z_axis - - return field_dict - - @classmethod - def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP: - d = src_dict.copy() - _x_axis = d.pop("x_axis", UNSET) - x_axis: Union[Unset, Point3d] - if isinstance(_x_axis, Unset): - x_axis = UNSET - else: - x_axis = _x_axis # type: ignore[arg-type] - - _y_axis = d.pop("y_axis", UNSET) - y_axis: Union[Unset, Point3d] - if isinstance(_y_axis, Unset): - y_axis = UNSET - else: - y_axis = _y_axis # type: ignore[arg-type] - - _z_axis = d.pop("z_axis", UNSET) - z_axis: Union[Unset, Point3d] - if isinstance(_z_axis, Unset): - z_axis = UNSET - else: - z_axis = _z_axis # type: ignore[arg-type] - - - get_sketch_mode_plane = cls( - x_axis= x_axis, - y_axis= y_axis, - z_axis= z_axis, - ) - - get_sketch_mode_plane.additional_properties = d - return get_sketch_mode_plane - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """The plane for sketch mode.""" # noqa: E501 + + x_axis: Union[Unset, Point3d] = UNSET + y_axis: Union[Unset, Point3d] = UNSET + z_axis: Union[Unset, Point3d] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.x_axis, Unset): + x_axis = self.x_axis + if not isinstance(self.y_axis, Unset): + y_axis = self.y_axis + if not isinstance(self.z_axis, Unset): + z_axis = self.z_axis + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if x_axis is not UNSET: + field_dict["x_axis"] = x_axis + if y_axis is not UNSET: + field_dict["y_axis"] = y_axis + if z_axis is not UNSET: + field_dict["z_axis"] = z_axis + + return field_dict + + @classmethod + def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM: + d = src_dict.copy() + _x_axis = d.pop("x_axis", UNSET) + x_axis: Union[Unset, Point3d] + if isinstance(_x_axis, Unset): + x_axis = UNSET + else: + x_axis = _x_axis # type: ignore[arg-type] + + _y_axis = d.pop("y_axis", UNSET) + y_axis: Union[Unset, Point3d] + if isinstance(_y_axis, Unset): + y_axis = UNSET + else: + y_axis = _y_axis # type: ignore[arg-type] + + _z_axis = d.pop("z_axis", UNSET) + z_axis: Union[Unset, Point3d] + if isinstance(_z_axis, Unset): + z_axis = UNSET + else: + z_axis = _z_axis # type: ignore[arg-type] + + get_sketch_mode_plane = cls( + x_axis=x_axis, + y_axis=y_axis, + z_axis=z_axis, + ) + + get_sketch_mode_plane.additional_properties = d + return get_sketch_mode_plane + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/gltf_presentation.py b/kittycad/models/gltf_presentation.py index 17ea6e1c4..95c38a630 100644 --- a/kittycad/models/gltf_presentation.py +++ b/kittycad/models/gltf_presentation.py @@ -2,13 +2,14 @@ class GltfPresentation(str, Enum): - """ Describes the presentation style of the glTF JSON. """ # noqa: E501 - """# Condense the JSON into the smallest possible size. """ # noqa: E501 - COMPACT = 'compact' - """# Expand the JSON into a more human readable format. + """Describes the presentation style of the glTF JSON.""" # noqa: E501 -This is the default setting. """ # noqa: E501 - PRETTY = 'pretty' + """# Condense the JSON into the smallest possible size. """ # noqa: E501 + COMPACT = "compact" + """# Expand the JSON into a more human readable format. - def __str__(self) -> str: - return str(self.value) +This is the default setting. """ # noqa: E501 + PRETTY = "pretty" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/gltf_storage.py b/kittycad/models/gltf_storage.py index d0756149e..525b7320b 100644 --- a/kittycad/models/gltf_storage.py +++ b/kittycad/models/gltf_storage.py @@ -2,21 +2,22 @@ class GltfStorage(str, Enum): - """ Describes the storage format of a glTF 2.0 scene. """ # noqa: E501 - """# Binary glTF 2.0. + """Describes the storage format of a glTF 2.0 scene.""" # noqa: E501 -This is a single binary with .glb extension. """ # noqa: E501 - BINARY = 'binary' - """# Standard glTF 2.0. + """# Binary glTF 2.0. -This is a JSON file with .gltf extension paired with a separate binary blob file with .bin extension. """ # noqa: E501 - STANDARD = 'standard' - """# Embedded glTF 2.0. +This is a single binary with .glb extension. """ # noqa: E501 + BINARY = "binary" + """# Standard glTF 2.0. + +This is a JSON file with .gltf extension paired with a separate binary blob file with .bin extension. """ # noqa: E501 + STANDARD = "standard" + """# Embedded glTF 2.0. Single JSON file with .gltf extension binary data encoded as base64 data URIs. -This is the default setting. """ # noqa: E501 - EMBEDDED = 'embedded' +This is the default setting. """ # noqa: E501 + EMBEDDED = "embedded" - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/highlight_set_entity.py b/kittycad/models/highlight_set_entity.py index faeed9515..450165231 100644 --- a/kittycad/models/highlight_set_entity.py +++ b/kittycad/models/highlight_set_entity.py @@ -4,58 +4,59 @@ from ..types import UNSET, Unset -CF = TypeVar("CF", bound="HighlightSetEntity") +EN = TypeVar("EN", bound="HighlightSetEntity") + @attr.s(auto_attribs=True) class HighlightSetEntity: - """ The response from the `HighlightSetEntity` command. """ # noqa: E501 - entity_id: Union[Unset, str] = UNSET - sequence: Union[Unset, int] = UNSET + """The response from the `HighlightSetEntity` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + entity_id: Union[Unset, str] = UNSET + sequence: Union[Unset, int] = UNSET - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id - sequence = self.sequence + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict['entity_id'] = entity_id - if sequence is not UNSET: - field_dict['sequence'] = sequence + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + sequence = self.sequence - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + if sequence is not UNSET: + field_dict["sequence"] = sequence - @classmethod - def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) + return field_dict - sequence = d.pop("sequence", UNSET) + @classmethod + def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) + sequence = d.pop("sequence", UNSET) - highlight_set_entity = cls( - entity_id= entity_id, - sequence= sequence, - ) + highlight_set_entity = cls( + entity_id=entity_id, + sequence=sequence, + ) - highlight_set_entity.additional_properties = d - return highlight_set_entity + highlight_set_entity.additional_properties = d + return highlight_set_entity - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/ice_server.py b/kittycad/models/ice_server.py index c338fc8bb..522d1e881 100644 --- a/kittycad/models/ice_server.py +++ b/kittycad/models/ice_server.py @@ -4,67 +4,68 @@ from ..types import UNSET, Unset -OM = TypeVar("OM", bound="IceServer") +RS = TypeVar("RS", bound="IceServer") + @attr.s(auto_attribs=True) class IceServer: - """ Representation of an ICE server used for STUN/TURN Used to initiate WebRTC connections based on """ # noqa: E501 - credential: Union[Unset, str] = UNSET - urls: Union[Unset, List[str]] = UNSET - username: Union[Unset, str] = UNSET + """Representation of an ICE server used for STUN/TURN Used to initiate WebRTC connections based on """ # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + credential: Union[Unset, str] = UNSET + urls: Union[Unset, List[str]] = UNSET + username: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - credential = self.credential - urls: Union[Unset, List[str]] = UNSET - if not isinstance(self.urls, Unset): - urls = self.urls - username = self.username + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if credential is not UNSET: - field_dict['credential'] = credential - if urls is not UNSET: - field_dict['urls'] = urls - if username is not UNSET: - field_dict['username'] = username + def to_dict(self) -> Dict[str, Any]: + credential = self.credential + urls: Union[Unset, List[str]] = UNSET + if not isinstance(self.urls, Unset): + urls = self.urls + username = self.username - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if credential is not UNSET: + field_dict["credential"] = credential + if urls is not UNSET: + field_dict["urls"] = urls + if username is not UNSET: + field_dict["username"] = username - @classmethod - def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM: - d = src_dict.copy() - credential = d.pop("credential", UNSET) + return field_dict - urls = cast(List[str], d.pop("urls", UNSET)) + @classmethod + def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS: + d = src_dict.copy() + credential = d.pop("credential", UNSET) - username = d.pop("username", UNSET) + urls = cast(List[str], d.pop("urls", UNSET)) + username = d.pop("username", UNSET) - ice_server = cls( - credential= credential, - urls= urls, - username= username, - ) + ice_server = cls( + credential=credential, + urls=urls, + username=username, + ) - ice_server.additional_properties = d - return ice_server + ice_server.additional_properties = d + return ice_server - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/image_format.py b/kittycad/models/image_format.py index bb1690104..01671688a 100644 --- a/kittycad/models/image_format.py +++ b/kittycad/models/image_format.py @@ -2,11 +2,12 @@ class ImageFormat(str, Enum): - """ Enum containing the variety of image formats snapshots may be exported to. """ # noqa: E501 - """# .png format """ # noqa: E501 - PNG = 'png' - """# .jpeg format """ # noqa: E501 - JPEG = 'jpeg' - - def __str__(self) -> str: - return str(self.value) + """Enum containing the variety of image formats snapshots may be exported to.""" # noqa: E501 + + """# .png format """ # noqa: E501 + PNG = "png" + """# .jpeg format """ # noqa: E501 + JPEG = "jpeg" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/import_file.py b/kittycad/models/import_file.py index 28006f1fe..1907af321 100644 --- a/kittycad/models/import_file.py +++ b/kittycad/models/import_file.py @@ -4,60 +4,61 @@ from ..types import UNSET, Unset -EN = TypeVar("EN", bound="ImportFile") +LR = TypeVar("LR", bound="ImportFile") + @attr.s(auto_attribs=True) class ImportFile: - """ File to import into the current model """ # noqa: E501 - data: Union[Unset, List[int]] = UNSET - path: Union[Unset, str] = UNSET + """File to import into the current model""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + data: Union[Unset, List[int]] = UNSET + path: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - data: Union[Unset, List[int]] = UNSET - if not isinstance(self.data, Unset): - data = self.data - path = self.path + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - if path is not UNSET: - field_dict['path'] = path + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[int]] = UNSET + if not isinstance(self.data, Unset): + data = self.data + path = self.path - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + if path is not UNSET: + field_dict["path"] = path - @classmethod - def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN: - d = src_dict.copy() - data = cast(List[int], d.pop("data", UNSET)) + return field_dict - path = d.pop("path", UNSET) + @classmethod + def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR: + d = src_dict.copy() + data = cast(List[int], d.pop("data", UNSET)) + path = d.pop("path", UNSET) - import_file = cls( - data= data, - path= path, - ) + import_file = cls( + data=data, + path=path, + ) - import_file.additional_properties = d - return import_file + import_file.additional_properties = d + return import_file - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/import_files.py b/kittycad/models/import_files.py index 427db1e5c..39d44ef1d 100644 --- a/kittycad/models/import_files.py +++ b/kittycad/models/import_files.py @@ -4,51 +4,52 @@ from ..types import UNSET, Unset -RS = TypeVar("RS", bound="ImportFiles") +MP = TypeVar("MP", bound="ImportFiles") + @attr.s(auto_attribs=True) class ImportFiles: - """ Data from importing the files """ # noqa: E501 - object_id: Union[Unset, str] = UNSET + """Data from importing the files""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + object_id: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - object_id = self.object_id + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if object_id is not UNSET: - field_dict['object_id'] = object_id + def to_dict(self) -> Dict[str, Any]: + object_id = self.object_id - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if object_id is not UNSET: + field_dict["object_id"] = object_id - @classmethod - def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS: - d = src_dict.copy() - object_id = d.pop("object_id", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP: + d = src_dict.copy() + object_id = d.pop("object_id", UNSET) - import_files = cls( - object_id= object_id, - ) + import_files = cls( + object_id=object_id, + ) - import_files.additional_properties = d - return import_files + import_files.additional_properties = d + return import_files - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/input_format.py b/kittycad/models/input_format.py index 3b02fc60b..2b6b79ca4 100644 --- a/kittycad/models/input_format.py +++ b/kittycad/models/input_format.py @@ -6,436 +6,432 @@ from ..models.unit_length import UnitLength from ..types import UNSET, Unset -LR = TypeVar("LR", bound="fbx") +WF = TypeVar("WF", bound="fbx") + @attr.s(auto_attribs=True) class fbx: - """ Autodesk Filmbox (FBX) format. """ # noqa: E501 - type: str = "fbx" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Autodesk Filmbox (FBX) format.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - type = self.type + type: str = "fbx" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + type = self.type - @classmethod - def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR: - d = src_dict.copy() - type = d.pop("type", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + return field_dict - fbx = cls( - type= type, - ) + @classmethod + def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF: + d = src_dict.copy() + type = d.pop("type", UNSET) - fbx.additional_properties = d - return fbx + fbx = cls( + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + fbx.additional_properties = d + return fbx - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +RO = TypeVar("RO", bound="gltf") -MP = TypeVar("MP", bound="gltf") @attr.s(auto_attribs=True) class gltf: - """ Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb). """ # noqa: E501 - type: str = "gltf" + """Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb).""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + type: str = "gltf" - def to_dict(self) -> Dict[str, Any]: - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP: - d = src_dict.copy() - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO: + d = src_dict.copy() + type = d.pop("type", UNSET) - gltf = cls( - type= type, - ) + gltf = cls( + type=type, + ) - gltf.additional_properties = d - return gltf + gltf.additional_properties = d + return gltf - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +DN = TypeVar("DN", bound="obj") -WF = TypeVar("WF", bound="obj") - @attr.s(auto_attribs=True) class obj: - """ Wavefront OBJ format. """ # noqa: E501 - coords: Union[Unset, System] = UNSET - type: str = "obj" - units: Union[Unset, UnitLength] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Wavefront OBJ format.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coords, Unset): - coords = self.coords - type = self.type - if not isinstance(self.units, Unset): - units = self.units + coords: Union[Unset, System] = UNSET + type: str = "obj" + units: Union[Unset, UnitLength] = UNSET - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coords is not UNSET: - field_dict['coords'] = coords - field_dict['type'] = type - if units is not UNSET: - field_dict['units'] = units + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + type = self.type + if not isinstance(self.units, Unset): + units = self.units - @classmethod - def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF: - d = src_dict.copy() - _coords = d.pop("coords", UNSET) - coords: Union[Unset, System] - if isinstance(_coords, Unset): - coords = UNSET - else: - coords = _coords # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict["coords"] = coords + field_dict["type"] = type + if units is not UNSET: + field_dict["units"] = units - type = d.pop("type", UNSET) + return field_dict - _units = d.pop("units", UNSET) - units: Union[Unset, UnitLength] - if isinstance(_units, Unset): - units = UNSET - else: - units = _units # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] + type = d.pop("type", UNSET) - obj = cls( - coords= coords, - type= type, - units= units, - ) + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] - obj.additional_properties = d - return obj + obj = cls( + coords=coords, + type=type, + units=units, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + obj.additional_properties = d + return obj - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +BA = TypeVar("BA", bound="ply") -RO = TypeVar("RO", bound="ply") @attr.s(auto_attribs=True) class ply: - """ The PLY Polygon File Format. """ # noqa: E501 - coords: Union[Unset, System] = UNSET - type: str = "ply" - units: Union[Unset, UnitLength] = UNSET + """The PLY Polygon File Format.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + coords: Union[Unset, System] = UNSET + type: str = "ply" + units: Union[Unset, UnitLength] = UNSET - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coords, Unset): - coords = self.coords - type = self.type - if not isinstance(self.units, Unset): - units = self.units + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coords is not UNSET: - field_dict['coords'] = coords - field_dict['type'] = type - if units is not UNSET: - field_dict['units'] = units + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + type = self.type + if not isinstance(self.units, Unset): + units = self.units - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict["coords"] = coords + field_dict["type"] = type + if units is not UNSET: + field_dict["units"] = units - @classmethod - def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO: - d = src_dict.copy() - _coords = d.pop("coords", UNSET) - coords: Union[Unset, System] - if isinstance(_coords, Unset): - coords = UNSET - else: - coords = _coords # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] - _units = d.pop("units", UNSET) - units: Union[Unset, UnitLength] - if isinstance(_units, Unset): - units = UNSET - else: - units = _units # type: ignore[arg-type] + type = d.pop("type", UNSET) + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] - ply = cls( - coords= coords, - type= type, - units= units, - ) + ply = cls( + coords=coords, + type=type, + units=units, + ) - ply.additional_properties = d - return ply + ply.additional_properties = d + return ply - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +OR = TypeVar("OR", bound="sldprt") -DN = TypeVar("DN", bound="sldprt") - @attr.s(auto_attribs=True) class sldprt: - """ SolidWorks part (SLDPRT) format. """ # noqa: E501 - type: str = "sldprt" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """SolidWorks part (SLDPRT) format.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - type = self.type + type: str = "sldprt" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + type = self.type - @classmethod - def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN: - d = src_dict.copy() - type = d.pop("type", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + return field_dict - sldprt = cls( - type= type, - ) + @classmethod + def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR: + d = src_dict.copy() + type = d.pop("type", UNSET) - sldprt.additional_properties = d - return sldprt + sldprt = cls( + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + sldprt.additional_properties = d + return sldprt - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +CB = TypeVar("CB", bound="step") -BA = TypeVar("BA", bound="step") @attr.s(auto_attribs=True) class step: - """ ISO 10303-21 (STEP) format. """ # noqa: E501 - type: str = "step" + """ISO 10303-21 (STEP) format.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + type: str = "step" - def to_dict(self) -> Dict[str, Any]: - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA: - d = src_dict.copy() - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB: + d = src_dict.copy() + type = d.pop("type", UNSET) - step = cls( - type= type, - ) + step = cls( + type=type, + ) - step.additional_properties = d - return step + step.additional_properties = d + return step - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +LC = TypeVar("LC", bound="stl") -OR = TypeVar("OR", bound="stl") - @attr.s(auto_attribs=True) class stl: - """ *ST**ereo**L**ithography format. """ # noqa: E501 - coords: Union[Unset, System] = UNSET - type: str = "stl" - units: Union[Unset, UnitLength] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coords, Unset): - coords = self.coords - type = self.type - if not isinstance(self.units, Unset): - units = self.units - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coords is not UNSET: - field_dict['coords'] = coords - field_dict['type'] = type - if units is not UNSET: - field_dict['units'] = units - - return field_dict - - @classmethod - def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR: - d = src_dict.copy() - _coords = d.pop("coords", UNSET) - coords: Union[Unset, System] - if isinstance(_coords, Unset): - coords = UNSET - else: - coords = _coords # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - _units = d.pop("units", UNSET) - units: Union[Unset, UnitLength] - if isinstance(_units, Unset): - units = UNSET - else: - units = _units # type: ignore[arg-type] - - - stl = cls( - coords= coords, - type= type, - units= units, - ) - - stl.additional_properties = d - return stl - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """*ST**ereo**L**ithography format.""" # noqa: E501 + + coords: Union[Unset, System] = UNSET + type: str = "stl" + units: Union[Unset, UnitLength] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + type = self.type + if not isinstance(self.units, Unset): + units = self.units + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict["coords"] = coords + field_dict["type"] = type + if units is not UNSET: + field_dict["units"] = units + + return field_dict + + @classmethod + def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] + + stl = cls( + coords=coords, + type=type, + units=units, + ) + + stl.additional_properties = d + return stl + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + InputFormat = Union[fbx, gltf, obj, ply, sldprt, step, stl] diff --git a/kittycad/models/invoice.py b/kittycad/models/invoice.py index 1fc13d410..ca21e2c3d 100644 --- a/kittycad/models/invoice.py +++ b/kittycad/models/invoice.py @@ -8,249 +8,256 @@ from ..models.invoice_status import InvoiceStatus from ..types import UNSET, Unset -CB = TypeVar("CB", bound="Invoice") +TO = TypeVar("TO", bound="Invoice") + @attr.s(auto_attribs=True) class Invoice: - """ An invoice. """ # noqa: E501 - amount_due: Union[Unset, float] = UNSET - amount_paid: Union[Unset, float] = UNSET - amount_remaining: Union[Unset, float] = UNSET - attempt_count: Union[Unset, int] = UNSET - attempted: Union[Unset, bool] = False - created_at: Union[Unset, datetime.datetime] = UNSET - currency: Union[Unset, Currency] = UNSET - customer_email: Union[Unset, str] = UNSET - customer_id: Union[Unset, str] = UNSET - default_payment_method: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - from ..models.discount import Discount - discounts: Union[Unset, List[Discount]] = UNSET - id: Union[Unset, str] = UNSET - from ..models.invoice_line_item import InvoiceLineItem - lines: Union[Unset, List[InvoiceLineItem]] = UNSET - metadata: Union[Unset, Dict[str, str]] = UNSET - number: Union[Unset, str] = UNSET - paid: Union[Unset, bool] = False - pdf: Union[Unset, str] = UNSET - receipt_number: Union[Unset, str] = UNSET - statement_descriptor: Union[Unset, str] = UNSET - status: Union[Unset, InvoiceStatus] = UNSET - subtotal: Union[Unset, float] = UNSET - tax: Union[Unset, float] = UNSET - total: Union[Unset, float] = UNSET - url: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - amount_due = self.amount_due - amount_paid = self.amount_paid - amount_remaining = self.amount_remaining - attempt_count = self.attempt_count - attempted = self.attempted - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - if not isinstance(self.currency, Unset): - currency = self.currency - customer_email = self.customer_email - customer_id = self.customer_id - default_payment_method = self.default_payment_method - description = self.description - from ..models.discount import Discount - discounts: Union[Unset, List[Discount]] = UNSET - if not isinstance(self.discounts, Unset): - discounts = self.discounts - id = self.id - from ..models.invoice_line_item import InvoiceLineItem - lines: Union[Unset, List[InvoiceLineItem]] = UNSET - if not isinstance(self.lines, Unset): - lines = self.lines - metadata = self.metadata - - number = self.number - paid = self.paid - pdf = self.pdf - receipt_number = self.receipt_number - statement_descriptor = self.statement_descriptor - if not isinstance(self.status, Unset): - status = self.status - subtotal = self.subtotal - tax = self.tax - total = self.total - url = self.url - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if amount_due is not UNSET: - field_dict['amount_due'] = amount_due - if amount_paid is not UNSET: - field_dict['amount_paid'] = amount_paid - if amount_remaining is not UNSET: - field_dict['amount_remaining'] = amount_remaining - if attempt_count is not UNSET: - field_dict['attempt_count'] = attempt_count - if attempted is not UNSET: - field_dict['attempted'] = attempted - if created_at is not UNSET: - field_dict['created_at'] = created_at - if currency is not UNSET: - field_dict['currency'] = currency - if customer_email is not UNSET: - field_dict['customer_email'] = customer_email - if customer_id is not UNSET: - field_dict['customer_id'] = customer_id - if default_payment_method is not UNSET: - field_dict['default_payment_method'] = default_payment_method - if description is not UNSET: - field_dict['description'] = description - if discounts is not UNSET: - field_dict['discounts'] = discounts - if id is not UNSET: - field_dict['id'] = id - if lines is not UNSET: - field_dict['lines'] = lines - if metadata is not UNSET: - field_dict['metadata'] = metadata - if number is not UNSET: - field_dict['number'] = number - if paid is not UNSET: - field_dict['paid'] = paid - if pdf is not UNSET: - field_dict['pdf'] = pdf - if receipt_number is not UNSET: - field_dict['receipt_number'] = receipt_number - if statement_descriptor is not UNSET: - field_dict['statement_descriptor'] = statement_descriptor - if status is not UNSET: - field_dict['status'] = status - if subtotal is not UNSET: - field_dict['subtotal'] = subtotal - if tax is not UNSET: - field_dict['tax'] = tax - if total is not UNSET: - field_dict['total'] = total - if url is not UNSET: - field_dict['url'] = url - - return field_dict - - @classmethod - def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB: - d = src_dict.copy() - amount_due = d.pop("amount_due", UNSET) - - amount_paid = d.pop("amount_paid", UNSET) - - amount_remaining = d.pop("amount_remaining", UNSET) - - attempt_count = d.pop("attempt_count", UNSET) - - attempted = d.pop("attempted", UNSET) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - _currency = d.pop("currency", UNSET) - currency: Union[Unset, Currency] - if isinstance(_currency, Unset): - currency = UNSET - else: - currency = _currency # type: ignore[arg-type] - - customer_email = d.pop("customer_email", UNSET) - - customer_id = d.pop("customer_id", UNSET) - - default_payment_method = d.pop("default_payment_method", UNSET) - - description = d.pop("description", UNSET) - - from ..models.discount import Discount - discounts = cast(List[Discount], d.pop("discounts", UNSET)) - - id = d.pop("id", UNSET) - - from ..models.invoice_line_item import InvoiceLineItem - lines = cast(List[InvoiceLineItem], d.pop("lines", UNSET)) - - metadata = d.pop("metadata", UNSET) - - number = d.pop("number", UNSET) - - paid = d.pop("paid", UNSET) - - pdf = d.pop("pdf", UNSET) - - receipt_number = d.pop("receipt_number", UNSET) - - statement_descriptor = d.pop("statement_descriptor", UNSET) - - _status = d.pop("status", UNSET) - status: Union[Unset, InvoiceStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - subtotal = d.pop("subtotal", UNSET) - - tax = d.pop("tax", UNSET) - - total = d.pop("total", UNSET) - - url = d.pop("url", UNSET) - - - invoice = cls( - amount_due= amount_due, - amount_paid= amount_paid, - amount_remaining= amount_remaining, - attempt_count= attempt_count, - attempted= attempted, - created_at= created_at, - currency= currency, - customer_email= customer_email, - customer_id= customer_id, - default_payment_method= default_payment_method, - description= description, - discounts= discounts, - id= id, - lines= lines, - metadata= metadata, - number= number, - paid= paid, - pdf= pdf, - receipt_number= receipt_number, - statement_descriptor= statement_descriptor, - status= status, - subtotal= subtotal, - tax= tax, - total= total, - url= url, - ) + """An invoice.""" # noqa: E501 + + amount_due: Union[Unset, float] = UNSET + amount_paid: Union[Unset, float] = UNSET + amount_remaining: Union[Unset, float] = UNSET + attempt_count: Union[Unset, int] = UNSET + attempted: Union[Unset, bool] = False + created_at: Union[Unset, datetime.datetime] = UNSET + currency: Union[Unset, Currency] = UNSET + customer_email: Union[Unset, str] = UNSET + customer_id: Union[Unset, str] = UNSET + default_payment_method: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + from ..models.discount import Discount + + discounts: Union[Unset, List[Discount]] = UNSET + id: Union[Unset, str] = UNSET + from ..models.invoice_line_item import InvoiceLineItem + + lines: Union[Unset, List[InvoiceLineItem]] = UNSET + metadata: Union[Unset, Dict[str, str]] = UNSET + number: Union[Unset, str] = UNSET + paid: Union[Unset, bool] = False + pdf: Union[Unset, str] = UNSET + receipt_number: Union[Unset, str] = UNSET + statement_descriptor: Union[Unset, str] = UNSET + status: Union[Unset, InvoiceStatus] = UNSET + subtotal: Union[Unset, float] = UNSET + tax: Union[Unset, float] = UNSET + total: Union[Unset, float] = UNSET + url: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + amount_due = self.amount_due + amount_paid = self.amount_paid + amount_remaining = self.amount_remaining + attempt_count = self.attempt_count + attempted = self.attempted + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + if not isinstance(self.currency, Unset): + currency = self.currency + customer_email = self.customer_email + customer_id = self.customer_id + default_payment_method = self.default_payment_method + description = self.description + from ..models.discount import Discount + + discounts: Union[Unset, List[Discount]] = UNSET + if not isinstance(self.discounts, Unset): + discounts = self.discounts + id = self.id + from ..models.invoice_line_item import InvoiceLineItem + + lines: Union[Unset, List[InvoiceLineItem]] = UNSET + if not isinstance(self.lines, Unset): + lines = self.lines + metadata = self.metadata + + number = self.number + paid = self.paid + pdf = self.pdf + receipt_number = self.receipt_number + statement_descriptor = self.statement_descriptor + if not isinstance(self.status, Unset): + status = self.status + subtotal = self.subtotal + tax = self.tax + total = self.total + url = self.url + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if amount_due is not UNSET: + field_dict["amount_due"] = amount_due + if amount_paid is not UNSET: + field_dict["amount_paid"] = amount_paid + if amount_remaining is not UNSET: + field_dict["amount_remaining"] = amount_remaining + if attempt_count is not UNSET: + field_dict["attempt_count"] = attempt_count + if attempted is not UNSET: + field_dict["attempted"] = attempted + if created_at is not UNSET: + field_dict["created_at"] = created_at + if currency is not UNSET: + field_dict["currency"] = currency + if customer_email is not UNSET: + field_dict["customer_email"] = customer_email + if customer_id is not UNSET: + field_dict["customer_id"] = customer_id + if default_payment_method is not UNSET: + field_dict["default_payment_method"] = default_payment_method + if description is not UNSET: + field_dict["description"] = description + if discounts is not UNSET: + field_dict["discounts"] = discounts + if id is not UNSET: + field_dict["id"] = id + if lines is not UNSET: + field_dict["lines"] = lines + if metadata is not UNSET: + field_dict["metadata"] = metadata + if number is not UNSET: + field_dict["number"] = number + if paid is not UNSET: + field_dict["paid"] = paid + if pdf is not UNSET: + field_dict["pdf"] = pdf + if receipt_number is not UNSET: + field_dict["receipt_number"] = receipt_number + if statement_descriptor is not UNSET: + field_dict["statement_descriptor"] = statement_descriptor + if status is not UNSET: + field_dict["status"] = status + if subtotal is not UNSET: + field_dict["subtotal"] = subtotal + if tax is not UNSET: + field_dict["tax"] = tax + if total is not UNSET: + field_dict["total"] = total + if url is not UNSET: + field_dict["url"] = url + + return field_dict + + @classmethod + def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO: + d = src_dict.copy() + amount_due = d.pop("amount_due", UNSET) + + amount_paid = d.pop("amount_paid", UNSET) + + amount_remaining = d.pop("amount_remaining", UNSET) + + attempt_count = d.pop("attempt_count", UNSET) + + attempted = d.pop("attempted", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _currency = d.pop("currency", UNSET) + currency: Union[Unset, Currency] + if isinstance(_currency, Unset): + currency = UNSET + else: + currency = _currency # type: ignore[arg-type] + + customer_email = d.pop("customer_email", UNSET) + + customer_id = d.pop("customer_id", UNSET) + + default_payment_method = d.pop("default_payment_method", UNSET) + + description = d.pop("description", UNSET) + + from ..models.discount import Discount + + discounts = cast(List[Discount], d.pop("discounts", UNSET)) + + id = d.pop("id", UNSET) + + from ..models.invoice_line_item import InvoiceLineItem + + lines = cast(List[InvoiceLineItem], d.pop("lines", UNSET)) + + metadata = d.pop("metadata", UNSET) + + number = d.pop("number", UNSET) + + paid = d.pop("paid", UNSET) + + pdf = d.pop("pdf", UNSET) + + receipt_number = d.pop("receipt_number", UNSET) + + statement_descriptor = d.pop("statement_descriptor", UNSET) + + _status = d.pop("status", UNSET) + status: Union[Unset, InvoiceStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + subtotal = d.pop("subtotal", UNSET) + + tax = d.pop("tax", UNSET) + + total = d.pop("total", UNSET) + + url = d.pop("url", UNSET) + + invoice = cls( + amount_due=amount_due, + amount_paid=amount_paid, + amount_remaining=amount_remaining, + attempt_count=attempt_count, + attempted=attempted, + created_at=created_at, + currency=currency, + customer_email=customer_email, + customer_id=customer_id, + default_payment_method=default_payment_method, + description=description, + discounts=discounts, + id=id, + lines=lines, + metadata=metadata, + number=number, + paid=paid, + pdf=pdf, + receipt_number=receipt_number, + statement_descriptor=statement_descriptor, + status=status, + subtotal=subtotal, + tax=tax, + total=total, + url=url, + ) - invoice.additional_properties = d - return invoice + invoice.additional_properties = d + return invoice - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/invoice_line_item.py b/kittycad/models/invoice_line_item.py index cdc637272..688f8b166 100644 --- a/kittycad/models/invoice_line_item.py +++ b/kittycad/models/invoice_line_item.py @@ -5,93 +5,93 @@ from ..models.currency import Currency from ..types import UNSET, Unset -LC = TypeVar("LC", bound="InvoiceLineItem") +ZP = TypeVar("ZP", bound="InvoiceLineItem") + @attr.s(auto_attribs=True) class InvoiceLineItem: - """ An invoice line item. """ # noqa: E501 - amount: Union[Unset, float] = UNSET - currency: Union[Unset, Currency] = UNSET - description: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - invoice_item: Union[Unset, str] = UNSET - metadata: Union[Unset, Dict[str, str]] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - amount = self.amount - if not isinstance(self.currency, Unset): - currency = self.currency - description = self.description - id = self.id - invoice_item = self.invoice_item - metadata = self.metadata - - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if amount is not UNSET: - field_dict['amount'] = amount - if currency is not UNSET: - field_dict['currency'] = currency - if description is not UNSET: - field_dict['description'] = description - if id is not UNSET: - field_dict['id'] = id - if invoice_item is not UNSET: - field_dict['invoice_item'] = invoice_item - if metadata is not UNSET: - field_dict['metadata'] = metadata - - return field_dict - - @classmethod - def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC: - d = src_dict.copy() - amount = d.pop("amount", UNSET) - - _currency = d.pop("currency", UNSET) - currency: Union[Unset, Currency] - if isinstance(_currency, Unset): - currency = UNSET - else: - currency = _currency # type: ignore[arg-type] - - description = d.pop("description", UNSET) - - id = d.pop("id", UNSET) - - invoice_item = d.pop("invoice_item", UNSET) - - metadata = d.pop("metadata", UNSET) - - - invoice_line_item = cls( - amount= amount, - currency= currency, - description= description, - id= id, - invoice_item= invoice_item, - metadata= metadata, - ) - - invoice_line_item.additional_properties = d - return invoice_line_item - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """An invoice line item.""" # noqa: E501 + + amount: Union[Unset, float] = UNSET + currency: Union[Unset, Currency] = UNSET + description: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + invoice_item: Union[Unset, str] = UNSET + metadata: Union[Unset, Dict[str, str]] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + amount = self.amount + if not isinstance(self.currency, Unset): + currency = self.currency + description = self.description + id = self.id + invoice_item = self.invoice_item + metadata = self.metadata + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if amount is not UNSET: + field_dict["amount"] = amount + if currency is not UNSET: + field_dict["currency"] = currency + if description is not UNSET: + field_dict["description"] = description + if id is not UNSET: + field_dict["id"] = id + if invoice_item is not UNSET: + field_dict["invoice_item"] = invoice_item + if metadata is not UNSET: + field_dict["metadata"] = metadata + + return field_dict + + @classmethod + def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP: + d = src_dict.copy() + amount = d.pop("amount", UNSET) + + _currency = d.pop("currency", UNSET) + currency: Union[Unset, Currency] + if isinstance(_currency, Unset): + currency = UNSET + else: + currency = _currency # type: ignore[arg-type] + + description = d.pop("description", UNSET) + + id = d.pop("id", UNSET) + + invoice_item = d.pop("invoice_item", UNSET) + + metadata = d.pop("metadata", UNSET) + + invoice_line_item = cls( + amount=amount, + currency=currency, + description=description, + id=id, + invoice_item=invoice_item, + metadata=metadata, + ) + + invoice_line_item.additional_properties = d + return invoice_line_item + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/invoice_status.py b/kittycad/models/invoice_status.py index efb0e687a..56117a214 100644 --- a/kittycad/models/invoice_status.py +++ b/kittycad/models/invoice_status.py @@ -2,19 +2,20 @@ class InvoiceStatus(str, Enum): - """ An enum representing the possible values of an `Invoice`'s `status` field. """ # noqa: E501 - """# Deleted. """ # noqa: E501 - DELETED = 'deleted' - """# Draft. """ # noqa: E501 - DRAFT = 'draft' - """# Open. """ # noqa: E501 - OPEN = 'open' - """# Paid. """ # noqa: E501 - PAID = 'paid' - """# Uncollectible. """ # noqa: E501 - UNCOLLECTIBLE = 'uncollectible' - """# Void. """ # noqa: E501 - VOID = 'void' + """An enum representing the possible values of an `Invoice`'s `status` field.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# Deleted. """ # noqa: E501 + DELETED = "deleted" + """# Draft. """ # noqa: E501 + DRAFT = "draft" + """# Open. """ # noqa: E501 + OPEN = "open" + """# Paid. """ # noqa: E501 + PAID = "paid" + """# Uncollectible. """ # noqa: E501 + UNCOLLECTIBLE = "uncollectible" + """# Void. """ # noqa: E501 + VOID = "void" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/jetstream.py b/kittycad/models/jetstream.py index e2b7dc192..fb4395b86 100644 --- a/kittycad/models/jetstream.py +++ b/kittycad/models/jetstream.py @@ -7,83 +7,84 @@ from ..models.meta_cluster_info import MetaClusterInfo from ..types import UNSET, Unset -TO = TypeVar("TO", bound="Jetstream") +EO = TypeVar("EO", bound="Jetstream") + @attr.s(auto_attribs=True) class Jetstream: - """ Jetstream information. """ # noqa: E501 - config: Union[Unset, JetstreamConfig] = UNSET - meta: Union[Unset, MetaClusterInfo] = UNSET - stats: Union[Unset, JetstreamStats] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.config, Unset): - config = self.config - if not isinstance(self.meta, Unset): - meta = self.meta - if not isinstance(self.stats, Unset): - stats = self.stats - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if config is not UNSET: - field_dict['config'] = config - if meta is not UNSET: - field_dict['meta'] = meta - if stats is not UNSET: - field_dict['stats'] = stats - - return field_dict - - @classmethod - def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO: - d = src_dict.copy() - _config = d.pop("config", UNSET) - config: Union[Unset, JetstreamConfig] - if isinstance(_config, Unset): - config = UNSET - else: - config = _config # type: ignore[arg-type] - - _meta = d.pop("meta", UNSET) - meta: Union[Unset, MetaClusterInfo] - if isinstance(_meta, Unset): - meta = UNSET - else: - meta = _meta # type: ignore[arg-type] - - _stats = d.pop("stats", UNSET) - stats: Union[Unset, JetstreamStats] - if isinstance(_stats, Unset): - stats = UNSET - else: - stats = _stats # type: ignore[arg-type] - - - jetstream = cls( - config= config, - meta= meta, - stats= stats, - ) - - jetstream.additional_properties = d - return jetstream - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Jetstream information.""" # noqa: E501 + + config: Union[Unset, JetstreamConfig] = UNSET + meta: Union[Unset, MetaClusterInfo] = UNSET + stats: Union[Unset, JetstreamStats] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.config, Unset): + config = self.config + if not isinstance(self.meta, Unset): + meta = self.meta + if not isinstance(self.stats, Unset): + stats = self.stats + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if config is not UNSET: + field_dict["config"] = config + if meta is not UNSET: + field_dict["meta"] = meta + if stats is not UNSET: + field_dict["stats"] = stats + + return field_dict + + @classmethod + def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO: + d = src_dict.copy() + _config = d.pop("config", UNSET) + config: Union[Unset, JetstreamConfig] + if isinstance(_config, Unset): + config = UNSET + else: + config = _config # type: ignore[arg-type] + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, MetaClusterInfo] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = _meta # type: ignore[arg-type] + + _stats = d.pop("stats", UNSET) + stats: Union[Unset, JetstreamStats] + if isinstance(_stats, Unset): + stats = UNSET + else: + stats = _stats # type: ignore[arg-type] + + jetstream = cls( + config=config, + meta=meta, + stats=stats, + ) + + jetstream.additional_properties = d + return jetstream + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/jetstream_api_stats.py b/kittycad/models/jetstream_api_stats.py index 675fb3327..1cc205d77 100644 --- a/kittycad/models/jetstream_api_stats.py +++ b/kittycad/models/jetstream_api_stats.py @@ -4,65 +4,66 @@ from ..types import UNSET, Unset -ZP = TypeVar("ZP", bound="JetstreamApiStats") +NY = TypeVar("NY", bound="JetstreamApiStats") + @attr.s(auto_attribs=True) class JetstreamApiStats: - """ Jetstream API statistics. """ # noqa: E501 - errors: Union[Unset, int] = UNSET - inflight: Union[Unset, int] = UNSET - total: Union[Unset, int] = UNSET + """Jetstream API statistics.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + errors: Union[Unset, int] = UNSET + inflight: Union[Unset, int] = UNSET + total: Union[Unset, int] = UNSET - def to_dict(self) -> Dict[str, Any]: - errors = self.errors - inflight = self.inflight - total = self.total + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if errors is not UNSET: - field_dict['errors'] = errors - if inflight is not UNSET: - field_dict['inflight'] = inflight - if total is not UNSET: - field_dict['total'] = total + def to_dict(self) -> Dict[str, Any]: + errors = self.errors + inflight = self.inflight + total = self.total - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + if inflight is not UNSET: + field_dict["inflight"] = inflight + if total is not UNSET: + field_dict["total"] = total - @classmethod - def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP: - d = src_dict.copy() - errors = d.pop("errors", UNSET) + return field_dict - inflight = d.pop("inflight", UNSET) + @classmethod + def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY: + d = src_dict.copy() + errors = d.pop("errors", UNSET) - total = d.pop("total", UNSET) + inflight = d.pop("inflight", UNSET) + total = d.pop("total", UNSET) - jetstream_api_stats = cls( - errors= errors, - inflight= inflight, - total= total, - ) + jetstream_api_stats = cls( + errors=errors, + inflight=inflight, + total=total, + ) - jetstream_api_stats.additional_properties = d - return jetstream_api_stats + jetstream_api_stats.additional_properties = d + return jetstream_api_stats - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/jetstream_config.py b/kittycad/models/jetstream_config.py index 3f8cde520..c127769f5 100644 --- a/kittycad/models/jetstream_config.py +++ b/kittycad/models/jetstream_config.py @@ -4,72 +4,73 @@ from ..types import UNSET, Unset -EO = TypeVar("EO", bound="JetstreamConfig") +QO = TypeVar("QO", bound="JetstreamConfig") + @attr.s(auto_attribs=True) class JetstreamConfig: - """ Jetstream configuration. """ # noqa: E501 - domain: Union[Unset, str] = UNSET - max_memory: Union[Unset, int] = UNSET - max_storage: Union[Unset, int] = UNSET - store_dir: Union[Unset, str] = UNSET + """Jetstream configuration.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + domain: Union[Unset, str] = UNSET + max_memory: Union[Unset, int] = UNSET + max_storage: Union[Unset, int] = UNSET + store_dir: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - domain = self.domain - max_memory = self.max_memory - max_storage = self.max_storage - store_dir = self.store_dir + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if domain is not UNSET: - field_dict['domain'] = domain - if max_memory is not UNSET: - field_dict['max_memory'] = max_memory - if max_storage is not UNSET: - field_dict['max_storage'] = max_storage - if store_dir is not UNSET: - field_dict['store_dir'] = store_dir + def to_dict(self) -> Dict[str, Any]: + domain = self.domain + max_memory = self.max_memory + max_storage = self.max_storage + store_dir = self.store_dir - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if domain is not UNSET: + field_dict["domain"] = domain + if max_memory is not UNSET: + field_dict["max_memory"] = max_memory + if max_storage is not UNSET: + field_dict["max_storage"] = max_storage + if store_dir is not UNSET: + field_dict["store_dir"] = store_dir - @classmethod - def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO: - d = src_dict.copy() - domain = d.pop("domain", UNSET) + return field_dict - max_memory = d.pop("max_memory", UNSET) + @classmethod + def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO: + d = src_dict.copy() + domain = d.pop("domain", UNSET) - max_storage = d.pop("max_storage", UNSET) + max_memory = d.pop("max_memory", UNSET) - store_dir = d.pop("store_dir", UNSET) + max_storage = d.pop("max_storage", UNSET) + store_dir = d.pop("store_dir", UNSET) - jetstream_config = cls( - domain= domain, - max_memory= max_memory, - max_storage= max_storage, - store_dir= store_dir, - ) + jetstream_config = cls( + domain=domain, + max_memory=max_memory, + max_storage=max_storage, + store_dir=store_dir, + ) - jetstream_config.additional_properties = d - return jetstream_config + jetstream_config.additional_properties = d + return jetstream_config - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/jetstream_stats.py b/kittycad/models/jetstream_stats.py index 4fc13ab4c..7eded3cb8 100644 --- a/kittycad/models/jetstream_stats.py +++ b/kittycad/models/jetstream_stats.py @@ -5,99 +5,100 @@ from ..models.jetstream_api_stats import JetstreamApiStats from ..types import UNSET, Unset -NY = TypeVar("NY", bound="JetstreamStats") +KX = TypeVar("KX", bound="JetstreamStats") + @attr.s(auto_attribs=True) class JetstreamStats: - """ Jetstream statistics. """ # noqa: E501 - accounts: Union[Unset, int] = UNSET - api: Union[Unset, JetstreamApiStats] = UNSET - ha_assets: Union[Unset, int] = UNSET - memory: Union[Unset, int] = UNSET - reserved_memory: Union[Unset, int] = UNSET - reserved_store: Union[Unset, int] = UNSET - store: Union[Unset, int] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - accounts = self.accounts - if not isinstance(self.api, Unset): - api = self.api - ha_assets = self.ha_assets - memory = self.memory - reserved_memory = self.reserved_memory - reserved_store = self.reserved_store - store = self.store - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if accounts is not UNSET: - field_dict['accounts'] = accounts - if api is not UNSET: - field_dict['api'] = api - if ha_assets is not UNSET: - field_dict['ha_assets'] = ha_assets - if memory is not UNSET: - field_dict['memory'] = memory - if reserved_memory is not UNSET: - field_dict['reserved_memory'] = reserved_memory - if reserved_store is not UNSET: - field_dict['reserved_store'] = reserved_store - if store is not UNSET: - field_dict['store'] = store - - return field_dict - - @classmethod - def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY: - d = src_dict.copy() - accounts = d.pop("accounts", UNSET) - - _api = d.pop("api", UNSET) - api: Union[Unset, JetstreamApiStats] - if isinstance(_api, Unset): - api = UNSET - else: - api = _api # type: ignore[arg-type] - - ha_assets = d.pop("ha_assets", UNSET) - - memory = d.pop("memory", UNSET) - - reserved_memory = d.pop("reserved_memory", UNSET) - - reserved_store = d.pop("reserved_store", UNSET) - - store = d.pop("store", UNSET) - - - jetstream_stats = cls( - accounts= accounts, - api= api, - ha_assets= ha_assets, - memory= memory, - reserved_memory= reserved_memory, - reserved_store= reserved_store, - store= store, - ) - - jetstream_stats.additional_properties = d - return jetstream_stats - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Jetstream statistics.""" # noqa: E501 + + accounts: Union[Unset, int] = UNSET + api: Union[Unset, JetstreamApiStats] = UNSET + ha_assets: Union[Unset, int] = UNSET + memory: Union[Unset, int] = UNSET + reserved_memory: Union[Unset, int] = UNSET + reserved_store: Union[Unset, int] = UNSET + store: Union[Unset, int] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + accounts = self.accounts + if not isinstance(self.api, Unset): + api = self.api + ha_assets = self.ha_assets + memory = self.memory + reserved_memory = self.reserved_memory + reserved_store = self.reserved_store + store = self.store + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if accounts is not UNSET: + field_dict["accounts"] = accounts + if api is not UNSET: + field_dict["api"] = api + if ha_assets is not UNSET: + field_dict["ha_assets"] = ha_assets + if memory is not UNSET: + field_dict["memory"] = memory + if reserved_memory is not UNSET: + field_dict["reserved_memory"] = reserved_memory + if reserved_store is not UNSET: + field_dict["reserved_store"] = reserved_store + if store is not UNSET: + field_dict["store"] = store + + return field_dict + + @classmethod + def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX: + d = src_dict.copy() + accounts = d.pop("accounts", UNSET) + + _api = d.pop("api", UNSET) + api: Union[Unset, JetstreamApiStats] + if isinstance(_api, Unset): + api = UNSET + else: + api = _api # type: ignore[arg-type] + + ha_assets = d.pop("ha_assets", UNSET) + + memory = d.pop("memory", UNSET) + + reserved_memory = d.pop("reserved_memory", UNSET) + + reserved_store = d.pop("reserved_store", UNSET) + + store = d.pop("store", UNSET) + + jetstream_stats = cls( + accounts=accounts, + api=api, + ha_assets=ha_assets, + memory=memory, + reserved_memory=reserved_memory, + reserved_store=reserved_store, + store=store, + ) + + jetstream_stats.additional_properties = d + return jetstream_stats + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/leaf_node.py b/kittycad/models/leaf_node.py index 620feefa1..911d5f851 100644 --- a/kittycad/models/leaf_node.py +++ b/kittycad/models/leaf_node.py @@ -4,72 +4,73 @@ from ..types import UNSET, Unset -QO = TypeVar("QO", bound="LeafNode") +IZ = TypeVar("IZ", bound="LeafNode") + @attr.s(auto_attribs=True) class LeafNode: - """ Leaf node information. """ # noqa: E501 - auth_timeout: Union[Unset, int] = UNSET - host: Union[Unset, str] = UNSET - port: Union[Unset, int] = UNSET - tls_timeout: Union[Unset, int] = UNSET + """Leaf node information.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + auth_timeout: Union[Unset, int] = UNSET + host: Union[Unset, str] = UNSET + port: Union[Unset, int] = UNSET + tls_timeout: Union[Unset, int] = UNSET - def to_dict(self) -> Dict[str, Any]: - auth_timeout = self.auth_timeout - host = self.host - port = self.port - tls_timeout = self.tls_timeout + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if auth_timeout is not UNSET: - field_dict['auth_timeout'] = auth_timeout - if host is not UNSET: - field_dict['host'] = host - if port is not UNSET: - field_dict['port'] = port - if tls_timeout is not UNSET: - field_dict['tls_timeout'] = tls_timeout + def to_dict(self) -> Dict[str, Any]: + auth_timeout = self.auth_timeout + host = self.host + port = self.port + tls_timeout = self.tls_timeout - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if auth_timeout is not UNSET: + field_dict["auth_timeout"] = auth_timeout + if host is not UNSET: + field_dict["host"] = host + if port is not UNSET: + field_dict["port"] = port + if tls_timeout is not UNSET: + field_dict["tls_timeout"] = tls_timeout - @classmethod - def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO: - d = src_dict.copy() - auth_timeout = d.pop("auth_timeout", UNSET) + return field_dict - host = d.pop("host", UNSET) + @classmethod + def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ: + d = src_dict.copy() + auth_timeout = d.pop("auth_timeout", UNSET) - port = d.pop("port", UNSET) + host = d.pop("host", UNSET) - tls_timeout = d.pop("tls_timeout", UNSET) + port = d.pop("port", UNSET) + tls_timeout = d.pop("tls_timeout", UNSET) - leaf_node = cls( - auth_timeout= auth_timeout, - host= host, - port= port, - tls_timeout= tls_timeout, - ) + leaf_node = cls( + auth_timeout=auth_timeout, + host=host, + port=port, + tls_timeout=tls_timeout, + ) - leaf_node.additional_properties = d - return leaf_node + leaf_node.additional_properties = d + return leaf_node - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/mass.py b/kittycad/models/mass.py index 0fdad2c79..08262cc0d 100644 --- a/kittycad/models/mass.py +++ b/kittycad/models/mass.py @@ -5,64 +5,65 @@ from ..models.unit_mass import UnitMass from ..types import UNSET, Unset -KX = TypeVar("KX", bound="Mass") +WO = TypeVar("WO", bound="Mass") + @attr.s(auto_attribs=True) class Mass: - """ The mass response. """ # noqa: E501 - mass: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitMass] = UNSET + """The mass response.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + mass: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitMass] = UNSET - def to_dict(self) -> Dict[str, Any]: - mass = self.mass - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if mass is not UNSET: - field_dict['mass'] = mass - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit + def to_dict(self) -> Dict[str, Any]: + mass = self.mass + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if mass is not UNSET: + field_dict["mass"] = mass + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit - @classmethod - def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX: - d = src_dict.copy() - mass = d.pop("mass", UNSET) + return field_dict - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitMass] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO: + d = src_dict.copy() + mass = d.pop("mass", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitMass] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - mass = cls( - mass= mass, - output_unit= output_unit, - ) + mass = cls( + mass=mass, + output_unit=output_unit, + ) - mass.additional_properties = d - return mass + mass.additional_properties = d + return mass - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/meta_cluster_info.py b/kittycad/models/meta_cluster_info.py index 585814c31..93a2e9b2f 100644 --- a/kittycad/models/meta_cluster_info.py +++ b/kittycad/models/meta_cluster_info.py @@ -4,65 +4,66 @@ from ..types import UNSET, Unset -IZ = TypeVar("IZ", bound="MetaClusterInfo") +NK = TypeVar("NK", bound="MetaClusterInfo") + @attr.s(auto_attribs=True) class MetaClusterInfo: - """ Jetstream statistics. """ # noqa: E501 - cluster_size: Union[Unset, int] = UNSET - leader: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET + """Jetstream statistics.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + cluster_size: Union[Unset, int] = UNSET + leader: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - cluster_size = self.cluster_size - leader = self.leader - name = self.name + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if cluster_size is not UNSET: - field_dict['cluster_size'] = cluster_size - if leader is not UNSET: - field_dict['leader'] = leader - if name is not UNSET: - field_dict['name'] = name + def to_dict(self) -> Dict[str, Any]: + cluster_size = self.cluster_size + leader = self.leader + name = self.name - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cluster_size is not UNSET: + field_dict["cluster_size"] = cluster_size + if leader is not UNSET: + field_dict["leader"] = leader + if name is not UNSET: + field_dict["name"] = name - @classmethod - def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ: - d = src_dict.copy() - cluster_size = d.pop("cluster_size", UNSET) + return field_dict - leader = d.pop("leader", UNSET) + @classmethod + def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK: + d = src_dict.copy() + cluster_size = d.pop("cluster_size", UNSET) - name = d.pop("name", UNSET) + leader = d.pop("leader", UNSET) + name = d.pop("name", UNSET) - meta_cluster_info = cls( - cluster_size= cluster_size, - leader= leader, - name= name, - ) + meta_cluster_info = cls( + cluster_size=cluster_size, + leader=leader, + name=name, + ) - meta_cluster_info.additional_properties = d - return meta_cluster_info + meta_cluster_info.additional_properties = d + return meta_cluster_info - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/metadata.py b/kittycad/models/metadata.py index 8fa3c143f..fdbc9035b 100644 --- a/kittycad/models/metadata.py +++ b/kittycad/models/metadata.py @@ -8,105 +8,106 @@ from ..models.file_system_metadata import FileSystemMetadata from ..types import UNSET, Unset -WO = TypeVar("WO", bound="Metadata") +UQ = TypeVar("UQ", bound="Metadata") + @attr.s(auto_attribs=True) class Metadata: - """ Metadata about our currently running server. - -This is mostly used for internal purposes and debugging. """ # noqa: E501 - cache: Union[Unset, CacheMetadata] = UNSET - environment: Union[Unset, Environment] = UNSET - fs: Union[Unset, FileSystemMetadata] = UNSET - git_hash: Union[Unset, str] = UNSET - pubsub: Union[Unset, Connection] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.cache, Unset): - cache = self.cache - if not isinstance(self.environment, Unset): - environment = self.environment - if not isinstance(self.fs, Unset): - fs = self.fs - git_hash = self.git_hash - if not isinstance(self.pubsub, Unset): - pubsub = self.pubsub - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if cache is not UNSET: - field_dict['cache'] = cache - if environment is not UNSET: - field_dict['environment'] = environment - if fs is not UNSET: - field_dict['fs'] = fs - if git_hash is not UNSET: - field_dict['git_hash'] = git_hash - if pubsub is not UNSET: - field_dict['pubsub'] = pubsub - - return field_dict - - @classmethod - def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO: - d = src_dict.copy() - _cache = d.pop("cache", UNSET) - cache: Union[Unset, CacheMetadata] - if isinstance(_cache, Unset): - cache = UNSET - else: - cache = _cache # type: ignore[arg-type] - - _environment = d.pop("environment", UNSET) - environment: Union[Unset, Environment] - if isinstance(_environment, Unset): - environment = UNSET - else: - environment = _environment # type: ignore[arg-type] - - _fs = d.pop("fs", UNSET) - fs: Union[Unset, FileSystemMetadata] - if isinstance(_fs, Unset): - fs = UNSET - else: - fs = _fs # type: ignore[arg-type] - - git_hash = d.pop("git_hash", UNSET) - - _pubsub = d.pop("pubsub", UNSET) - pubsub: Union[Unset, Connection] - if isinstance(_pubsub, Unset): - pubsub = UNSET - else: - pubsub = _pubsub # type: ignore[arg-type] - - - metadata = cls( - cache= cache, - environment= environment, - fs= fs, - git_hash= git_hash, - pubsub= pubsub, - ) - - metadata.additional_properties = d - return metadata - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Metadata about our currently running server. + + This is mostly used for internal purposes and debugging.""" # noqa: E501 + + cache: Union[Unset, CacheMetadata] = UNSET + environment: Union[Unset, Environment] = UNSET + fs: Union[Unset, FileSystemMetadata] = UNSET + git_hash: Union[Unset, str] = UNSET + pubsub: Union[Unset, Connection] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.cache, Unset): + cache = self.cache + if not isinstance(self.environment, Unset): + environment = self.environment + if not isinstance(self.fs, Unset): + fs = self.fs + git_hash = self.git_hash + if not isinstance(self.pubsub, Unset): + pubsub = self.pubsub + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cache is not UNSET: + field_dict["cache"] = cache + if environment is not UNSET: + field_dict["environment"] = environment + if fs is not UNSET: + field_dict["fs"] = fs + if git_hash is not UNSET: + field_dict["git_hash"] = git_hash + if pubsub is not UNSET: + field_dict["pubsub"] = pubsub + + return field_dict + + @classmethod + def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ: + d = src_dict.copy() + _cache = d.pop("cache", UNSET) + cache: Union[Unset, CacheMetadata] + if isinstance(_cache, Unset): + cache = UNSET + else: + cache = _cache # type: ignore[arg-type] + + _environment = d.pop("environment", UNSET) + environment: Union[Unset, Environment] + if isinstance(_environment, Unset): + environment = UNSET + else: + environment = _environment # type: ignore[arg-type] + + _fs = d.pop("fs", UNSET) + fs: Union[Unset, FileSystemMetadata] + if isinstance(_fs, Unset): + fs = UNSET + else: + fs = _fs # type: ignore[arg-type] + + git_hash = d.pop("git_hash", UNSET) + + _pubsub = d.pop("pubsub", UNSET) + pubsub: Union[Unset, Connection] + if isinstance(_pubsub, Unset): + pubsub = UNSET + else: + pubsub = _pubsub # type: ignore[arg-type] + + metadata = cls( + cache=cache, + environment=environment, + fs=fs, + git_hash=git_hash, + pubsub=pubsub, + ) + + metadata.additional_properties = d + return metadata + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/method.py b/kittycad/models/method.py index 666a8900f..02c0b186a 100644 --- a/kittycad/models/method.py +++ b/kittycad/models/method.py @@ -2,31 +2,33 @@ class Method(str, Enum): - """ The Request Method (VERB) + """The Request Method (VERB) -This type also contains constants for a number of common HTTP methods such as GET, POST, etc. + This type also contains constants for a number of common HTTP methods such as GET, POST, etc. -Currently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions. """ # noqa: E501 - """# The `OPTIONS` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.2.1). """ # noqa: E501 - OPTIONS = 'OPTIONS' - """# The `GET` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1). """ # noqa: E501 - GET = 'GET' - """# The `POST` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1). """ # noqa: E501 - POST = 'POST' - """# The `PUT` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1). """ # noqa: E501 - PUT = 'PUT' - """# The `DELETE` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.5). """ # noqa: E501 - DELETE = 'DELETE' - """# The `HEAD` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.2). """ # noqa: E501 - HEAD = 'HEAD' - """# The `TRACE` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3). """ # noqa: E501 - TRACE = 'TRACE' - """# The `CONNECT` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.6). """ # noqa: E501 - CONNECT = 'CONNECT' - """# The `PATCH` method as defined in [RFC 5789](https://tools.ietf.org/html/rfc5789). """ # noqa: E501 - PATCH = 'PATCH' - """# A catch all. """ # noqa: E501 - EXTENSION = 'EXTENSION' + Currently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions. + """ # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# The `OPTIONS` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.2.1). """ # noqa: E501 + OPTIONS = "OPTIONS" + """# The `GET` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1). """ # noqa: E501 + GET = "GET" + """# The `POST` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1). """ # noqa: E501 + POST = "POST" + """# The `PUT` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1). """ # noqa: E501 + PUT = "PUT" + """# The `DELETE` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.5). """ # noqa: E501 + DELETE = "DELETE" + """# The `HEAD` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.2). """ # noqa: E501 + HEAD = "HEAD" + """# The `TRACE` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3). """ # noqa: E501 + TRACE = "TRACE" + """# The `CONNECT` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.6). """ # noqa: E501 + CONNECT = "CONNECT" + """# The `PATCH` method as defined in [RFC 5789](https://tools.ietf.org/html/rfc5789). """ # noqa: E501 + PATCH = "PATCH" + """# A catch all. """ # noqa: E501 + EXTENSION = "EXTENSION" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/modeling_cmd.py b/kittycad/models/modeling_cmd.py index 429ae22aa..141c19c6b 100644 --- a/kittycad/models/modeling_cmd.py +++ b/kittycad/models/modeling_cmd.py @@ -7,6 +7,7 @@ from ..models.camera_drag_interaction_type import CameraDragInteractionType from ..models.color import Color from ..models.image_format import ImageFormat +from ..models.input_format import InputFormat from ..models.modeling_cmd_id import ModelingCmdId from ..models.output_format import OutputFormat from ..models.path_segment import PathSegment @@ -21,4765 +22,4785 @@ from ..models.unit_volume import UnitVolume from ..types import UNSET, Unset -NK = TypeVar("NK", bound="start_path") +QE = TypeVar("QE", bound="start_path") + @attr.s(auto_attribs=True) class start_path: - """ Start a path. """ # noqa: E501 - type: str = "start_path" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Start a path.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - type = self.type + type: str = "start_path" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + type = self.type - @classmethod - def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK: - d = src_dict.copy() - type = d.pop("type", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + return field_dict - start_path = cls( - type= type, - ) + @classmethod + def from_dict(cls: Type[QE], src_dict: Dict[str, Any]) -> QE: + d = src_dict.copy() + type = d.pop("type", UNSET) - start_path.additional_properties = d - return start_path + start_path = cls( + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + start_path.additional_properties = d + return start_path - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +XH = TypeVar("XH", bound="move_path_pen") -UQ = TypeVar("UQ", bound="move_path_pen") @attr.s(auto_attribs=True) class move_path_pen: - """ Move the path's "pen". """ # noqa: E501 - path: Union[Unset, ModelingCmdId] = UNSET - to: Union[Unset, Point3d] = UNSET - type: str = "move_path_pen" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Move the path's "pen".""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.path, Unset): - path = self.path - if not isinstance(self.to, Unset): - to = self.to - type = self.type + path: Union[Unset, ModelingCmdId] = UNSET + to: Union[Unset, Point3d] = UNSET + type: str = "move_path_pen" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if path is not UNSET: - field_dict['path'] = path - if to is not UNSET: - field_dict['to'] = to - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.path, Unset): + path = self.path + if not isinstance(self.to, Unset): + to = self.to + type = self.type - @classmethod - def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ: - d = src_dict.copy() - _path = d.pop("path", UNSET) - path: Union[Unset, ModelingCmdId] - if isinstance(_path, Unset): - path = UNSET - else: - path = _path # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if path is not UNSET: + field_dict["path"] = path + if to is not UNSET: + field_dict["to"] = to + field_dict["type"] = type - _to = d.pop("to", UNSET) - to: Union[Unset, Point3d] - if isinstance(_to, Unset): - to = UNSET - else: - to = _to # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[XH], src_dict: Dict[str, Any]) -> XH: + d = src_dict.copy() + _path = d.pop("path", UNSET) + path: Union[Unset, ModelingCmdId] + if isinstance(_path, Unset): + path = UNSET + else: + path = _path # type: ignore[arg-type] + _to = d.pop("to", UNSET) + to: Union[Unset, Point3d] + if isinstance(_to, Unset): + to = UNSET + else: + to = _to # type: ignore[arg-type] - move_path_pen = cls( - path= path, - to= to, - type= type, - ) + type = d.pop("type", UNSET) - move_path_pen.additional_properties = d - return move_path_pen + move_path_pen = cls( + path=path, + to=to, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + move_path_pen.additional_properties = d + return move_path_pen - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +KT = TypeVar("KT", bound="extend_path") -QE = TypeVar("QE", bound="extend_path") @attr.s(auto_attribs=True) class extend_path: - """ Extend a path by adding a new segment which starts at the path's "pen". If no "pen" location has been set before (via `MovePen`), then the pen is at the origin. """ # noqa: E501 - path: Union[Unset, ModelingCmdId] = UNSET - segment: Union[Unset, PathSegment] = UNSET - type: str = "extend_path" + """Extend a path by adding a new segment which starts at the path's "pen". If no "pen" location has been set before (via `MovePen`), then the pen is at the origin.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + path: Union[Unset, ModelingCmdId] = UNSET + segment: Union[Unset, PathSegment] = UNSET + type: str = "extend_path" - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.path, Unset): - path = self.path - if not isinstance(self.segment, Unset): - segment = self.segment - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if path is not UNSET: - field_dict['path'] = path - if segment is not UNSET: - field_dict['segment'] = segment - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.path, Unset): + path = self.path + if not isinstance(self.segment, Unset): + segment = self.segment + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if path is not UNSET: + field_dict["path"] = path + if segment is not UNSET: + field_dict["segment"] = segment + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[QE], src_dict: Dict[str, Any]) -> QE: - d = src_dict.copy() - _path = d.pop("path", UNSET) - path: Union[Unset, ModelingCmdId] - if isinstance(_path, Unset): - path = UNSET - else: - path = _path # type: ignore[arg-type] + return field_dict - _segment = d.pop("segment", UNSET) - segment: Union[Unset, PathSegment] - if isinstance(_segment, Unset): - segment = UNSET - else: - segment = _segment # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[KT], src_dict: Dict[str, Any]) -> KT: + d = src_dict.copy() + _path = d.pop("path", UNSET) + path: Union[Unset, ModelingCmdId] + if isinstance(_path, Unset): + path = UNSET + else: + path = _path # type: ignore[arg-type] - type = d.pop("type", UNSET) + _segment = d.pop("segment", UNSET) + segment: Union[Unset, PathSegment] + if isinstance(_segment, Unset): + segment = UNSET + else: + segment = _segment # type: ignore[arg-type] + type = d.pop("type", UNSET) - extend_path = cls( - path= path, - segment= segment, - type= type, - ) + extend_path = cls( + path=path, + segment=segment, + type=type, + ) - extend_path.additional_properties = d - return extend_path + extend_path.additional_properties = d + return extend_path - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +BV = TypeVar("BV", bound="extrude") -XH = TypeVar("XH", bound="extrude") - @attr.s(auto_attribs=True) class extrude: - """ Extrude a 2D solid. """ # noqa: E501 - cap: Union[Unset, bool] = False - distance: Union[Unset, float] = UNSET - target: Union[Unset, ModelingCmdId] = UNSET - type: str = "extrude" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Extrude a 2D solid.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - cap = self.cap - distance = self.distance - if not isinstance(self.target, Unset): - target = self.target - type = self.type + cap: Union[Unset, bool] = False + distance: Union[Unset, float] = UNSET + target: Union[Unset, ModelingCmdId] = UNSET + type: str = "extrude" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if cap is not UNSET: - field_dict['cap'] = cap - if distance is not UNSET: - field_dict['distance'] = distance - if target is not UNSET: - field_dict['target'] = target - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + cap = self.cap + distance = self.distance + if not isinstance(self.target, Unset): + target = self.target + type = self.type - @classmethod - def from_dict(cls: Type[XH], src_dict: Dict[str, Any]) -> XH: - d = src_dict.copy() - cap = d.pop("cap", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cap is not UNSET: + field_dict["cap"] = cap + if distance is not UNSET: + field_dict["distance"] = distance + if target is not UNSET: + field_dict["target"] = target + field_dict["type"] = type - distance = d.pop("distance", UNSET) + return field_dict - _target = d.pop("target", UNSET) - target: Union[Unset, ModelingCmdId] - if isinstance(_target, Unset): - target = UNSET - else: - target = _target # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[BV], src_dict: Dict[str, Any]) -> BV: + d = src_dict.copy() + cap = d.pop("cap", UNSET) - type = d.pop("type", UNSET) + distance = d.pop("distance", UNSET) + _target = d.pop("target", UNSET) + target: Union[Unset, ModelingCmdId] + if isinstance(_target, Unset): + target = UNSET + else: + target = _target # type: ignore[arg-type] - extrude = cls( - cap= cap, - distance= distance, - target= target, - type= type, - ) + type = d.pop("type", UNSET) - extrude.additional_properties = d - return extrude + extrude = cls( + cap=cap, + distance=distance, + target=target, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + extrude.additional_properties = d + return extrude - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +GU = TypeVar("GU", bound="close_path") -KT = TypeVar("KT", bound="close_path") @attr.s(auto_attribs=True) class close_path: - """ Closes a path, converting it to a 2D solid. """ # noqa: E501 - path_id: Union[Unset, str] = UNSET - type: str = "close_path" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Closes a path, converting it to a 2D solid.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - path_id = self.path_id - type = self.type + path_id: Union[Unset, str] = UNSET + type: str = "close_path" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if path_id is not UNSET: - field_dict['path_id'] = path_id - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + path_id = self.path_id + type = self.type - @classmethod - def from_dict(cls: Type[KT], src_dict: Dict[str, Any]) -> KT: - d = src_dict.copy() - path_id = d.pop("path_id", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if path_id is not UNSET: + field_dict["path_id"] = path_id + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[GU], src_dict: Dict[str, Any]) -> GU: + d = src_dict.copy() + path_id = d.pop("path_id", UNSET) - close_path = cls( - path_id= path_id, - type= type, - ) + type = d.pop("type", UNSET) - close_path.additional_properties = d - return close_path + close_path = cls( + path_id=path_id, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + close_path.additional_properties = d + return close_path - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +SS = TypeVar("SS", bound="camera_drag_start") -BV = TypeVar("BV", bound="camera_drag_start") @attr.s(auto_attribs=True) class camera_drag_start: - """ Camera drag started. """ # noqa: E501 - interaction: Union[Unset, CameraDragInteractionType] = UNSET - type: str = "camera_drag_start" - window: Union[Unset, Point2d] = UNSET + """Camera drag started.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + interaction: Union[Unset, CameraDragInteractionType] = UNSET + type: str = "camera_drag_start" + window: Union[Unset, Point2d] = UNSET - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.interaction, Unset): - interaction = self.interaction - type = self.type - if not isinstance(self.window, Unset): - window = self.window + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if interaction is not UNSET: - field_dict['interaction'] = interaction - field_dict['type'] = type - if window is not UNSET: - field_dict['window'] = window + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.interaction, Unset): + interaction = self.interaction + type = self.type + if not isinstance(self.window, Unset): + window = self.window - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if interaction is not UNSET: + field_dict["interaction"] = interaction + field_dict["type"] = type + if window is not UNSET: + field_dict["window"] = window - @classmethod - def from_dict(cls: Type[BV], src_dict: Dict[str, Any]) -> BV: - d = src_dict.copy() - _interaction = d.pop("interaction", UNSET) - interaction: Union[Unset, CameraDragInteractionType] - if isinstance(_interaction, Unset): - interaction = UNSET - else: - interaction = _interaction # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[SS], src_dict: Dict[str, Any]) -> SS: + d = src_dict.copy() + _interaction = d.pop("interaction", UNSET) + interaction: Union[Unset, CameraDragInteractionType] + if isinstance(_interaction, Unset): + interaction = UNSET + else: + interaction = _interaction # type: ignore[arg-type] - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] + type = d.pop("type", UNSET) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - camera_drag_start = cls( - interaction= interaction, - type= type, - window= window, - ) + camera_drag_start = cls( + interaction=interaction, + type=type, + window=window, + ) - camera_drag_start.additional_properties = d - return camera_drag_start + camera_drag_start.additional_properties = d + return camera_drag_start - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +UP = TypeVar("UP", bound="camera_drag_move") -GU = TypeVar("GU", bound="camera_drag_move") - @attr.s(auto_attribs=True) class camera_drag_move: - """ Camera drag continued. """ # noqa: E501 - interaction: Union[Unset, CameraDragInteractionType] = UNSET - sequence: Union[Unset, int] = UNSET - type: str = "camera_drag_move" - window: Union[Unset, Point2d] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Camera drag continued.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.interaction, Unset): - interaction = self.interaction - sequence = self.sequence - type = self.type - if not isinstance(self.window, Unset): - window = self.window + interaction: Union[Unset, CameraDragInteractionType] = UNSET + sequence: Union[Unset, int] = UNSET + type: str = "camera_drag_move" + window: Union[Unset, Point2d] = UNSET - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if interaction is not UNSET: - field_dict['interaction'] = interaction - if sequence is not UNSET: - field_dict['sequence'] = sequence - field_dict['type'] = type - if window is not UNSET: - field_dict['window'] = window + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.interaction, Unset): + interaction = self.interaction + sequence = self.sequence + type = self.type + if not isinstance(self.window, Unset): + window = self.window - @classmethod - def from_dict(cls: Type[GU], src_dict: Dict[str, Any]) -> GU: - d = src_dict.copy() - _interaction = d.pop("interaction", UNSET) - interaction: Union[Unset, CameraDragInteractionType] - if isinstance(_interaction, Unset): - interaction = UNSET - else: - interaction = _interaction # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if interaction is not UNSET: + field_dict["interaction"] = interaction + if sequence is not UNSET: + field_dict["sequence"] = sequence + field_dict["type"] = type + if window is not UNSET: + field_dict["window"] = window - sequence = d.pop("sequence", UNSET) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[UP], src_dict: Dict[str, Any]) -> UP: + d = src_dict.copy() + _interaction = d.pop("interaction", UNSET) + interaction: Union[Unset, CameraDragInteractionType] + if isinstance(_interaction, Unset): + interaction = UNSET + else: + interaction = _interaction # type: ignore[arg-type] - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] + sequence = d.pop("sequence", UNSET) + type = d.pop("type", UNSET) - camera_drag_move = cls( - interaction= interaction, - sequence= sequence, - type= type, - window= window, - ) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - camera_drag_move.additional_properties = d - return camera_drag_move + camera_drag_move = cls( + interaction=interaction, + sequence=sequence, + type=type, + window=window, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + camera_drag_move.additional_properties = d + return camera_drag_move - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +AZ = TypeVar("AZ", bound="camera_drag_end") -SS = TypeVar("SS", bound="camera_drag_end") @attr.s(auto_attribs=True) class camera_drag_end: - """ Camera drag ended. """ # noqa: E501 - interaction: Union[Unset, CameraDragInteractionType] = UNSET - type: str = "camera_drag_end" - window: Union[Unset, Point2d] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Camera drag ended.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.interaction, Unset): - interaction = self.interaction - type = self.type - if not isinstance(self.window, Unset): - window = self.window + interaction: Union[Unset, CameraDragInteractionType] = UNSET + type: str = "camera_drag_end" + window: Union[Unset, Point2d] = UNSET - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if interaction is not UNSET: - field_dict['interaction'] = interaction - field_dict['type'] = type - if window is not UNSET: - field_dict['window'] = window + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.interaction, Unset): + interaction = self.interaction + type = self.type + if not isinstance(self.window, Unset): + window = self.window - @classmethod - def from_dict(cls: Type[SS], src_dict: Dict[str, Any]) -> SS: - d = src_dict.copy() - _interaction = d.pop("interaction", UNSET) - interaction: Union[Unset, CameraDragInteractionType] - if isinstance(_interaction, Unset): - interaction = UNSET - else: - interaction = _interaction # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if interaction is not UNSET: + field_dict["interaction"] = interaction + field_dict["type"] = type + if window is not UNSET: + field_dict["window"] = window - type = d.pop("type", UNSET) + return field_dict - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[AZ], src_dict: Dict[str, Any]) -> AZ: + d = src_dict.copy() + _interaction = d.pop("interaction", UNSET) + interaction: Union[Unset, CameraDragInteractionType] + if isinstance(_interaction, Unset): + interaction = UNSET + else: + interaction = _interaction # type: ignore[arg-type] + type = d.pop("type", UNSET) - camera_drag_end = cls( - interaction= interaction, - type= type, - window= window, - ) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - camera_drag_end.additional_properties = d - return camera_drag_end + camera_drag_end = cls( + interaction=interaction, + type=type, + window=window, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + camera_drag_end.additional_properties = d + return camera_drag_end - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +DJ = TypeVar("DJ", bound="default_camera_look_at") -UP = TypeVar("UP", bound="default_camera_look_at") @attr.s(auto_attribs=True) class default_camera_look_at: - """ Change what the default camera is looking at. """ # noqa: E501 - center: Union[Unset, Point3d] = UNSET - type: str = "default_camera_look_at" - up: Union[Unset, Point3d] = UNSET - vantage: Union[Unset, Point3d] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.center, Unset): - center = self.center - type = self.type - if not isinstance(self.up, Unset): - up = self.up - if not isinstance(self.vantage, Unset): - vantage = self.vantage - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if center is not UNSET: - field_dict['center'] = center - field_dict['type'] = type - if up is not UNSET: - field_dict['up'] = up - if vantage is not UNSET: - field_dict['vantage'] = vantage - - return field_dict - - @classmethod - def from_dict(cls: Type[UP], src_dict: Dict[str, Any]) -> UP: - d = src_dict.copy() - _center = d.pop("center", UNSET) - center: Union[Unset, Point3d] - if isinstance(_center, Unset): - center = UNSET - else: - center = _center # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - _up = d.pop("up", UNSET) - up: Union[Unset, Point3d] - if isinstance(_up, Unset): - up = UNSET - else: - up = _up # type: ignore[arg-type] - - _vantage = d.pop("vantage", UNSET) - vantage: Union[Unset, Point3d] - if isinstance(_vantage, Unset): - vantage = UNSET - else: - vantage = _vantage # type: ignore[arg-type] - - - default_camera_look_at = cls( - center= center, - type= type, - up= up, - vantage= vantage, - ) - - default_camera_look_at.additional_properties = d - return default_camera_look_at - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - - - -AZ = TypeVar("AZ", bound="default_camera_zoom") + """Change what the default camera is looking at.""" # noqa: E501 + + center: Union[Unset, Point3d] = UNSET + type: str = "default_camera_look_at" + up: Union[Unset, Point3d] = UNSET + vantage: Union[Unset, Point3d] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.center, Unset): + center = self.center + type = self.type + if not isinstance(self.up, Unset): + up = self.up + if not isinstance(self.vantage, Unset): + vantage = self.vantage + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if center is not UNSET: + field_dict["center"] = center + field_dict["type"] = type + if up is not UNSET: + field_dict["up"] = up + if vantage is not UNSET: + field_dict["vantage"] = vantage + + return field_dict + + @classmethod + def from_dict(cls: Type[DJ], src_dict: Dict[str, Any]) -> DJ: + d = src_dict.copy() + _center = d.pop("center", UNSET) + center: Union[Unset, Point3d] + if isinstance(_center, Unset): + center = UNSET + else: + center = _center # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + _up = d.pop("up", UNSET) + up: Union[Unset, Point3d] + if isinstance(_up, Unset): + up = UNSET + else: + up = _up # type: ignore[arg-type] + + _vantage = d.pop("vantage", UNSET) + vantage: Union[Unset, Point3d] + if isinstance(_vantage, Unset): + vantage = UNSET + else: + vantage = _vantage # type: ignore[arg-type] + + default_camera_look_at = cls( + center=center, + type=type, + up=up, + vantage=vantage, + ) + + default_camera_look_at.additional_properties = d + return default_camera_look_at + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +WJ = TypeVar("WJ", bound="default_camera_zoom") + @attr.s(auto_attribs=True) class default_camera_zoom: - """ Adjust zoom of the default camera. """ # noqa: E501 - magnitude: Union[Unset, float] = UNSET - type: str = "default_camera_zoom" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Adjust zoom of the default camera.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - magnitude = self.magnitude - type = self.type + magnitude: Union[Unset, float] = UNSET + type: str = "default_camera_zoom" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if magnitude is not UNSET: - field_dict['magnitude'] = magnitude - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + magnitude = self.magnitude + type = self.type - @classmethod - def from_dict(cls: Type[AZ], src_dict: Dict[str, Any]) -> AZ: - d = src_dict.copy() - magnitude = d.pop("magnitude", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if magnitude is not UNSET: + field_dict["magnitude"] = magnitude + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[WJ], src_dict: Dict[str, Any]) -> WJ: + d = src_dict.copy() + magnitude = d.pop("magnitude", UNSET) - default_camera_zoom = cls( - magnitude= magnitude, - type= type, - ) + type = d.pop("type", UNSET) - default_camera_zoom.additional_properties = d - return default_camera_zoom + default_camera_zoom = cls( + magnitude=magnitude, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + default_camera_zoom.additional_properties = d + return default_camera_zoom - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +TR = TypeVar("TR", bound="default_camera_enable_sketch_mode") -DJ = TypeVar("DJ", bound="default_camera_enable_sketch_mode") @attr.s(auto_attribs=True) class default_camera_enable_sketch_mode: - """ Enable sketch mode, where users can sketch 2D geometry. Users choose a plane to sketch on. """ # noqa: E501 - animated: Union[Unset, bool] = False - distance_to_plane: Union[Unset, float] = UNSET - origin: Union[Unset, Point3d] = UNSET - ortho: Union[Unset, bool] = False - type: str = "default_camera_enable_sketch_mode" - x_axis: Union[Unset, Point3d] = UNSET - y_axis: Union[Unset, Point3d] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - animated = self.animated - distance_to_plane = self.distance_to_plane - if not isinstance(self.origin, Unset): - origin = self.origin - ortho = self.ortho - type = self.type - if not isinstance(self.x_axis, Unset): - x_axis = self.x_axis - if not isinstance(self.y_axis, Unset): - y_axis = self.y_axis - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if animated is not UNSET: - field_dict['animated'] = animated - if distance_to_plane is not UNSET: - field_dict['distance_to_plane'] = distance_to_plane - if origin is not UNSET: - field_dict['origin'] = origin - if ortho is not UNSET: - field_dict['ortho'] = ortho - field_dict['type'] = type - if x_axis is not UNSET: - field_dict['x_axis'] = x_axis - if y_axis is not UNSET: - field_dict['y_axis'] = y_axis - - return field_dict - - @classmethod - def from_dict(cls: Type[DJ], src_dict: Dict[str, Any]) -> DJ: - d = src_dict.copy() - animated = d.pop("animated", UNSET) - - distance_to_plane = d.pop("distance_to_plane", UNSET) - - _origin = d.pop("origin", UNSET) - origin: Union[Unset, Point3d] - if isinstance(_origin, Unset): - origin = UNSET - else: - origin = _origin # type: ignore[arg-type] - - ortho = d.pop("ortho", UNSET) - - type = d.pop("type", UNSET) - - _x_axis = d.pop("x_axis", UNSET) - x_axis: Union[Unset, Point3d] - if isinstance(_x_axis, Unset): - x_axis = UNSET - else: - x_axis = _x_axis # type: ignore[arg-type] - - _y_axis = d.pop("y_axis", UNSET) - y_axis: Union[Unset, Point3d] - if isinstance(_y_axis, Unset): - y_axis = UNSET - else: - y_axis = _y_axis # type: ignore[arg-type] - - - default_camera_enable_sketch_mode = cls( - animated= animated, - distance_to_plane= distance_to_plane, - origin= origin, - ortho= ortho, - type= type, - x_axis= x_axis, - y_axis= y_axis, - ) - - default_camera_enable_sketch_mode.additional_properties = d - return default_camera_enable_sketch_mode - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - - - -WJ = TypeVar("WJ", bound="default_camera_disable_sketch_mode") + """Enable sketch mode, where users can sketch 2D geometry. Users choose a plane to sketch on.""" # noqa: E501 + + animated: Union[Unset, bool] = False + distance_to_plane: Union[Unset, float] = UNSET + origin: Union[Unset, Point3d] = UNSET + ortho: Union[Unset, bool] = False + type: str = "default_camera_enable_sketch_mode" + x_axis: Union[Unset, Point3d] = UNSET + y_axis: Union[Unset, Point3d] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + animated = self.animated + distance_to_plane = self.distance_to_plane + if not isinstance(self.origin, Unset): + origin = self.origin + ortho = self.ortho + type = self.type + if not isinstance(self.x_axis, Unset): + x_axis = self.x_axis + if not isinstance(self.y_axis, Unset): + y_axis = self.y_axis + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if animated is not UNSET: + field_dict["animated"] = animated + if distance_to_plane is not UNSET: + field_dict["distance_to_plane"] = distance_to_plane + if origin is not UNSET: + field_dict["origin"] = origin + if ortho is not UNSET: + field_dict["ortho"] = ortho + field_dict["type"] = type + if x_axis is not UNSET: + field_dict["x_axis"] = x_axis + if y_axis is not UNSET: + field_dict["y_axis"] = y_axis + + return field_dict + + @classmethod + def from_dict(cls: Type[TR], src_dict: Dict[str, Any]) -> TR: + d = src_dict.copy() + animated = d.pop("animated", UNSET) + + distance_to_plane = d.pop("distance_to_plane", UNSET) + + _origin = d.pop("origin", UNSET) + origin: Union[Unset, Point3d] + if isinstance(_origin, Unset): + origin = UNSET + else: + origin = _origin # type: ignore[arg-type] + + ortho = d.pop("ortho", UNSET) + + type = d.pop("type", UNSET) + + _x_axis = d.pop("x_axis", UNSET) + x_axis: Union[Unset, Point3d] + if isinstance(_x_axis, Unset): + x_axis = UNSET + else: + x_axis = _x_axis # type: ignore[arg-type] + + _y_axis = d.pop("y_axis", UNSET) + y_axis: Union[Unset, Point3d] + if isinstance(_y_axis, Unset): + y_axis = UNSET + else: + y_axis = _y_axis # type: ignore[arg-type] + + default_camera_enable_sketch_mode = cls( + animated=animated, + distance_to_plane=distance_to_plane, + origin=origin, + ortho=ortho, + type=type, + x_axis=x_axis, + y_axis=y_axis, + ) + + default_camera_enable_sketch_mode.additional_properties = d + return default_camera_enable_sketch_mode + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +YD = TypeVar("YD", bound="default_camera_disable_sketch_mode") + @attr.s(auto_attribs=True) class default_camera_disable_sketch_mode: - """ Disable sketch mode, from the default camera. """ # noqa: E501 - type: str = "default_camera_disable_sketch_mode" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Disable sketch mode, from the default camera.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - type = self.type + type: str = "default_camera_disable_sketch_mode" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + type = self.type - @classmethod - def from_dict(cls: Type[WJ], src_dict: Dict[str, Any]) -> WJ: - d = src_dict.copy() - type = d.pop("type", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + return field_dict - default_camera_disable_sketch_mode = cls( - type= type, - ) + @classmethod + def from_dict(cls: Type[YD], src_dict: Dict[str, Any]) -> YD: + d = src_dict.copy() + type = d.pop("type", UNSET) - default_camera_disable_sketch_mode.additional_properties = d - return default_camera_disable_sketch_mode + default_camera_disable_sketch_mode = cls( + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + default_camera_disable_sketch_mode.additional_properties = d + return default_camera_disable_sketch_mode - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +JF = TypeVar("JF", bound="export") -TR = TypeVar("TR", bound="export") @attr.s(auto_attribs=True) class export: - """ Export the scene to a file. """ # noqa: E501 - entity_ids: Union[Unset, List[str]] = UNSET - format: Union[Unset, OutputFormat] = UNSET - source_unit: Union[Unset, UnitLength] = UNSET - type: str = "export" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Export the scene to a file.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids - if not isinstance(self.format, Unset): - format = self.format - if not isinstance(self.source_unit, Unset): - source_unit = self.source_unit - type = self.type + entity_ids: Union[Unset, List[str]] = UNSET + format: Union[Unset, OutputFormat] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "export" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict['entity_ids'] = entity_ids - if format is not UNSET: - field_dict['format'] = format - if source_unit is not UNSET: - field_dict['source_unit'] = source_unit - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids + if not isinstance(self.format, Unset): + format = self.format + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + type = self.type - @classmethod - def from_dict(cls: Type[TR], src_dict: Dict[str, Any]) -> TR: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict["entity_ids"] = entity_ids + if format is not UNSET: + field_dict["format"] = format + if source_unit is not UNSET: + field_dict["source_unit"] = source_unit + field_dict["type"] = type - _format = d.pop("format", UNSET) - format: Union[Unset, OutputFormat] - if isinstance(_format, Unset): - format = UNSET - else: - format = _format # type: ignore[arg-type] + return field_dict - _source_unit = d.pop("source_unit", UNSET) - source_unit: Union[Unset, UnitLength] - if isinstance(_source_unit, Unset): - source_unit = UNSET - else: - source_unit = _source_unit # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[JF], src_dict: Dict[str, Any]) -> JF: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - type = d.pop("type", UNSET) + _format = d.pop("format", UNSET) + format: Union[Unset, OutputFormat] + if isinstance(_format, Unset): + format = UNSET + else: + format = _format # type: ignore[arg-type] + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] - export = cls( - entity_ids= entity_ids, - format= format, - source_unit= source_unit, - type= type, - ) + type = d.pop("type", UNSET) - export.additional_properties = d - return export + export = cls( + entity_ids=entity_ids, + format=format, + source_unit=source_unit, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + export.additional_properties = d + return export - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +VP = TypeVar("VP", bound="entity_get_parent_id") -YD = TypeVar("YD", bound="entity_get_parent_id") @attr.s(auto_attribs=True) class entity_get_parent_id: - """ What is this entity's parent? """ # noqa: E501 - entity_id: Union[Unset, str] = UNSET - type: str = "entity_get_parent_id" + """What is this entity's parent?""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + entity_id: Union[Unset, str] = UNSET + type: str = "entity_get_parent_id" - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict['entity_id'] = entity_id - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[YD], src_dict: Dict[str, Any]) -> YD: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[VP], src_dict: Dict[str, Any]) -> VP: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) + type = d.pop("type", UNSET) - entity_get_parent_id = cls( - entity_id= entity_id, - type= type, - ) + entity_get_parent_id = cls( + entity_id=entity_id, + type=type, + ) - entity_get_parent_id.additional_properties = d - return entity_get_parent_id + entity_get_parent_id.additional_properties = d + return entity_get_parent_id - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +EL = TypeVar("EL", bound="entity_get_num_children") -JF = TypeVar("JF", bound="entity_get_num_children") - @attr.s(auto_attribs=True) class entity_get_num_children: - """ How many children does the entity have? """ # noqa: E501 - entity_id: Union[Unset, str] = UNSET - type: str = "entity_get_num_children" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """How many children does the entity have?""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id - type = self.type + entity_id: Union[Unset, str] = UNSET + type: str = "entity_get_num_children" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict['entity_id'] = entity_id - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + type = self.type - @classmethod - def from_dict(cls: Type[JF], src_dict: Dict[str, Any]) -> JF: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[EL], src_dict: Dict[str, Any]) -> EL: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) - entity_get_num_children = cls( - entity_id= entity_id, - type= type, - ) + type = d.pop("type", UNSET) - entity_get_num_children.additional_properties = d - return entity_get_num_children + entity_get_num_children = cls( + entity_id=entity_id, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + entity_get_num_children.additional_properties = d + return entity_get_num_children - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +ZG = TypeVar("ZG", bound="entity_get_child_uuid") -VP = TypeVar("VP", bound="entity_get_child_uuid") @attr.s(auto_attribs=True) class entity_get_child_uuid: - """ What is the UUID of this entity's n-th child? """ # noqa: E501 - child_index: Union[Unset, int] = UNSET - entity_id: Union[Unset, str] = UNSET - type: str = "entity_get_child_uuid" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """What is the UUID of this entity's n-th child?""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - child_index = self.child_index - entity_id = self.entity_id - type = self.type + child_index: Union[Unset, int] = UNSET + entity_id: Union[Unset, str] = UNSET + type: str = "entity_get_child_uuid" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if child_index is not UNSET: - field_dict['child_index'] = child_index - if entity_id is not UNSET: - field_dict['entity_id'] = entity_id - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + child_index = self.child_index + entity_id = self.entity_id + type = self.type - @classmethod - def from_dict(cls: Type[VP], src_dict: Dict[str, Any]) -> VP: - d = src_dict.copy() - child_index = d.pop("child_index", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if child_index is not UNSET: + field_dict["child_index"] = child_index + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + field_dict["type"] = type - entity_id = d.pop("entity_id", UNSET) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[ZG], src_dict: Dict[str, Any]) -> ZG: + d = src_dict.copy() + child_index = d.pop("child_index", UNSET) + entity_id = d.pop("entity_id", UNSET) - entity_get_child_uuid = cls( - child_index= child_index, - entity_id= entity_id, - type= type, - ) + type = d.pop("type", UNSET) - entity_get_child_uuid.additional_properties = d - return entity_get_child_uuid + entity_get_child_uuid = cls( + child_index=child_index, + entity_id=entity_id, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + entity_get_child_uuid.additional_properties = d + return entity_get_child_uuid - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +LF = TypeVar("LF", bound="entity_get_all_child_uuids") -EL = TypeVar("EL", bound="entity_get_all_child_uuids") @attr.s(auto_attribs=True) class entity_get_all_child_uuids: - """ What are all UUIDs of this entity's children? """ # noqa: E501 - entity_id: Union[Unset, str] = UNSET - type: str = "entity_get_all_child_uuids" + """What are all UUIDs of this entity's children?""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + entity_id: Union[Unset, str] = UNSET + type: str = "entity_get_all_child_uuids" - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict['entity_id'] = entity_id - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[EL], src_dict: Dict[str, Any]) -> EL: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[LF], src_dict: Dict[str, Any]) -> LF: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) + type = d.pop("type", UNSET) - entity_get_all_child_uuids = cls( - entity_id= entity_id, - type= type, - ) + entity_get_all_child_uuids = cls( + entity_id=entity_id, + type=type, + ) - entity_get_all_child_uuids.additional_properties = d - return entity_get_all_child_uuids + entity_get_all_child_uuids.additional_properties = d + return entity_get_all_child_uuids - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +CS = TypeVar("CS", bound="edit_mode_enter") -ZG = TypeVar("ZG", bound="edit_mode_enter") - @attr.s(auto_attribs=True) class edit_mode_enter: - """ Enter edit mode """ # noqa: E501 - target: Union[Unset, str] = UNSET - type: str = "edit_mode_enter" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Enter edit mode""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - target = self.target - type = self.type + target: Union[Unset, str] = UNSET + type: str = "edit_mode_enter" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if target is not UNSET: - field_dict['target'] = target - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + target = self.target + type = self.type - @classmethod - def from_dict(cls: Type[ZG], src_dict: Dict[str, Any]) -> ZG: - d = src_dict.copy() - target = d.pop("target", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if target is not UNSET: + field_dict["target"] = target + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[CS], src_dict: Dict[str, Any]) -> CS: + d = src_dict.copy() + target = d.pop("target", UNSET) - edit_mode_enter = cls( - target= target, - type= type, - ) + type = d.pop("type", UNSET) - edit_mode_enter.additional_properties = d - return edit_mode_enter + edit_mode_enter = cls( + target=target, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + edit_mode_enter.additional_properties = d + return edit_mode_enter - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +GN = TypeVar("GN", bound="edit_mode_exit") -LF = TypeVar("LF", bound="edit_mode_exit") @attr.s(auto_attribs=True) class edit_mode_exit: - """ Exit edit mode """ # noqa: E501 - type: str = "edit_mode_exit" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Exit edit mode""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - type = self.type + type: str = "edit_mode_exit" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + type = self.type - @classmethod - def from_dict(cls: Type[LF], src_dict: Dict[str, Any]) -> LF: - d = src_dict.copy() - type = d.pop("type", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + return field_dict - edit_mode_exit = cls( - type= type, - ) + @classmethod + def from_dict(cls: Type[GN], src_dict: Dict[str, Any]) -> GN: + d = src_dict.copy() + type = d.pop("type", UNSET) - edit_mode_exit.additional_properties = d - return edit_mode_exit + edit_mode_exit = cls( + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + edit_mode_exit.additional_properties = d + return edit_mode_exit - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +GD = TypeVar("GD", bound="select_with_point") -CS = TypeVar("CS", bound="select_with_point") @attr.s(auto_attribs=True) class select_with_point: - """ Modifies the selection by simulating a "mouse click" at the given x,y window coordinate Returns ID of whatever was selected. """ # noqa: E501 - selected_at_window: Union[Unset, Point2d] = UNSET - selection_type: Union[Unset, SceneSelectionType] = UNSET - type: str = "select_with_point" + """Modifies the selection by simulating a "mouse click" at the given x,y window coordinate Returns ID of whatever was selected.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + selected_at_window: Union[Unset, Point2d] = UNSET + selection_type: Union[Unset, SceneSelectionType] = UNSET + type: str = "select_with_point" - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.selected_at_window, Unset): - selected_at_window = self.selected_at_window - if not isinstance(self.selection_type, Unset): - selection_type = self.selection_type - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if selected_at_window is not UNSET: - field_dict['selected_at_window'] = selected_at_window - if selection_type is not UNSET: - field_dict['selection_type'] = selection_type - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.selected_at_window, Unset): + selected_at_window = self.selected_at_window + if not isinstance(self.selection_type, Unset): + selection_type = self.selection_type + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if selected_at_window is not UNSET: + field_dict["selected_at_window"] = selected_at_window + if selection_type is not UNSET: + field_dict["selection_type"] = selection_type + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[CS], src_dict: Dict[str, Any]) -> CS: - d = src_dict.copy() - _selected_at_window = d.pop("selected_at_window", UNSET) - selected_at_window: Union[Unset, Point2d] - if isinstance(_selected_at_window, Unset): - selected_at_window = UNSET - else: - selected_at_window = _selected_at_window # type: ignore[arg-type] + return field_dict - _selection_type = d.pop("selection_type", UNSET) - selection_type: Union[Unset, SceneSelectionType] - if isinstance(_selection_type, Unset): - selection_type = UNSET - else: - selection_type = _selection_type # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[GD], src_dict: Dict[str, Any]) -> GD: + d = src_dict.copy() + _selected_at_window = d.pop("selected_at_window", UNSET) + selected_at_window: Union[Unset, Point2d] + if isinstance(_selected_at_window, Unset): + selected_at_window = UNSET + else: + selected_at_window = _selected_at_window # type: ignore[arg-type] - type = d.pop("type", UNSET) + _selection_type = d.pop("selection_type", UNSET) + selection_type: Union[Unset, SceneSelectionType] + if isinstance(_selection_type, Unset): + selection_type = UNSET + else: + selection_type = _selection_type # type: ignore[arg-type] + type = d.pop("type", UNSET) - select_with_point = cls( - selected_at_window= selected_at_window, - selection_type= selection_type, - type= type, - ) + select_with_point = cls( + selected_at_window=selected_at_window, + selection_type=selection_type, + type=type, + ) - select_with_point.additional_properties = d - return select_with_point + select_with_point.additional_properties = d + return select_with_point - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +VJ = TypeVar("VJ", bound="select_clear") -GN = TypeVar("GN", bound="select_clear") - @attr.s(auto_attribs=True) class select_clear: - """ Clear the selection """ # noqa: E501 - type: str = "select_clear" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Clear the selection""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - type = self.type + type: str = "select_clear" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + type = self.type - @classmethod - def from_dict(cls: Type[GN], src_dict: Dict[str, Any]) -> GN: - d = src_dict.copy() - type = d.pop("type", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + return field_dict - select_clear = cls( - type= type, - ) + @classmethod + def from_dict(cls: Type[VJ], src_dict: Dict[str, Any]) -> VJ: + d = src_dict.copy() + type = d.pop("type", UNSET) - select_clear.additional_properties = d - return select_clear + select_clear = cls( + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + select_clear.additional_properties = d + return select_clear - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +OX = TypeVar("OX", bound="select_add") -GD = TypeVar("GD", bound="select_add") @attr.s(auto_attribs=True) class select_add: - """ Adds one or more entities (by UUID) to the selection. """ # noqa: E501 - entities: Union[Unset, List[str]] = UNSET - type: str = "select_add" + """Adds one or more entities (by UUID) to the selection.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + entities: Union[Unset, List[str]] = UNSET + type: str = "select_add" - def to_dict(self) -> Dict[str, Any]: - entities: Union[Unset, List[str]] = UNSET - if not isinstance(self.entities, Unset): - entities = self.entities - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entities is not UNSET: - field_dict['entities'] = entities - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + entities: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities, Unset): + entities = self.entities + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entities is not UNSET: + field_dict["entities"] = entities + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[GD], src_dict: Dict[str, Any]) -> GD: - d = src_dict.copy() - entities = cast(List[str], d.pop("entities", UNSET)) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[OX], src_dict: Dict[str, Any]) -> OX: + d = src_dict.copy() + entities = cast(List[str], d.pop("entities", UNSET)) + type = d.pop("type", UNSET) - select_add = cls( - entities= entities, - type= type, - ) + select_add = cls( + entities=entities, + type=type, + ) - select_add.additional_properties = d - return select_add + select_add.additional_properties = d + return select_add - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +YW = TypeVar("YW", bound="select_remove") -VJ = TypeVar("VJ", bound="select_remove") - @attr.s(auto_attribs=True) class select_remove: - """ Removes one or more entities (by UUID) from the selection. """ # noqa: E501 - entities: Union[Unset, List[str]] = UNSET - type: str = "select_remove" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Removes one or more entities (by UUID) from the selection.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - entities: Union[Unset, List[str]] = UNSET - if not isinstance(self.entities, Unset): - entities = self.entities - type = self.type + entities: Union[Unset, List[str]] = UNSET + type: str = "select_remove" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entities is not UNSET: - field_dict['entities'] = entities - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + entities: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities, Unset): + entities = self.entities + type = self.type - @classmethod - def from_dict(cls: Type[VJ], src_dict: Dict[str, Any]) -> VJ: - d = src_dict.copy() - entities = cast(List[str], d.pop("entities", UNSET)) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entities is not UNSET: + field_dict["entities"] = entities + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[YW], src_dict: Dict[str, Any]) -> YW: + d = src_dict.copy() + entities = cast(List[str], d.pop("entities", UNSET)) - select_remove = cls( - entities= entities, - type= type, - ) + type = d.pop("type", UNSET) - select_remove.additional_properties = d - return select_remove + select_remove = cls( + entities=entities, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + select_remove.additional_properties = d + return select_remove - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +QX = TypeVar("QX", bound="select_replace") -OX = TypeVar("OX", bound="select_replace") @attr.s(auto_attribs=True) class select_replace: - """ Replaces the current selection with these new entities (by UUID). Equivalent to doing SelectClear then SelectAdd. """ # noqa: E501 - entities: Union[Unset, List[str]] = UNSET - type: str = "select_replace" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Replaces the current selection with these new entities (by UUID). Equivalent to doing SelectClear then SelectAdd.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - entities: Union[Unset, List[str]] = UNSET - if not isinstance(self.entities, Unset): - entities = self.entities - type = self.type + entities: Union[Unset, List[str]] = UNSET + type: str = "select_replace" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entities is not UNSET: - field_dict['entities'] = entities - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + entities: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities, Unset): + entities = self.entities + type = self.type - @classmethod - def from_dict(cls: Type[OX], src_dict: Dict[str, Any]) -> OX: - d = src_dict.copy() - entities = cast(List[str], d.pop("entities", UNSET)) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entities is not UNSET: + field_dict["entities"] = entities + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[QX], src_dict: Dict[str, Any]) -> QX: + d = src_dict.copy() + entities = cast(List[str], d.pop("entities", UNSET)) - select_replace = cls( - entities= entities, - type= type, - ) + type = d.pop("type", UNSET) - select_replace.additional_properties = d - return select_replace + select_replace = cls( + entities=entities, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + select_replace.additional_properties = d + return select_replace - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +NO = TypeVar("NO", bound="select_get") -YW = TypeVar("YW", bound="select_get") @attr.s(auto_attribs=True) class select_get: - """ Find all IDs of selected entities """ # noqa: E501 - type: str = "select_get" + """Find all IDs of selected entities""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + type: str = "select_get" - def to_dict(self) -> Dict[str, Any]: - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[YW], src_dict: Dict[str, Any]) -> YW: - d = src_dict.copy() - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[NO], src_dict: Dict[str, Any]) -> NO: + d = src_dict.copy() + type = d.pop("type", UNSET) - select_get = cls( - type= type, - ) + select_get = cls( + type=type, + ) - select_get.additional_properties = d - return select_get + select_get.additional_properties = d + return select_get - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +VX = TypeVar("VX", bound="highlight_set_entity") -QX = TypeVar("QX", bound="highlight_set_entity") - @attr.s(auto_attribs=True) class highlight_set_entity: - """ Changes the current highlighted entity to whichever one is at the given window coordinate. If there's no entity at this location, clears the highlight. """ # noqa: E501 - selected_at_window: Union[Unset, Point2d] = UNSET - sequence: Union[Unset, int] = UNSET - type: str = "highlight_set_entity" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Changes the current highlighted entity to whichever one is at the given window coordinate. If there's no entity at this location, clears the highlight.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.selected_at_window, Unset): - selected_at_window = self.selected_at_window - sequence = self.sequence - type = self.type + selected_at_window: Union[Unset, Point2d] = UNSET + sequence: Union[Unset, int] = UNSET + type: str = "highlight_set_entity" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if selected_at_window is not UNSET: - field_dict['selected_at_window'] = selected_at_window - if sequence is not UNSET: - field_dict['sequence'] = sequence - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.selected_at_window, Unset): + selected_at_window = self.selected_at_window + sequence = self.sequence + type = self.type - @classmethod - def from_dict(cls: Type[QX], src_dict: Dict[str, Any]) -> QX: - d = src_dict.copy() - _selected_at_window = d.pop("selected_at_window", UNSET) - selected_at_window: Union[Unset, Point2d] - if isinstance(_selected_at_window, Unset): - selected_at_window = UNSET - else: - selected_at_window = _selected_at_window # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if selected_at_window is not UNSET: + field_dict["selected_at_window"] = selected_at_window + if sequence is not UNSET: + field_dict["sequence"] = sequence + field_dict["type"] = type - sequence = d.pop("sequence", UNSET) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[VX], src_dict: Dict[str, Any]) -> VX: + d = src_dict.copy() + _selected_at_window = d.pop("selected_at_window", UNSET) + selected_at_window: Union[Unset, Point2d] + if isinstance(_selected_at_window, Unset): + selected_at_window = UNSET + else: + selected_at_window = _selected_at_window # type: ignore[arg-type] + sequence = d.pop("sequence", UNSET) - highlight_set_entity = cls( - selected_at_window= selected_at_window, - sequence= sequence, - type= type, - ) + type = d.pop("type", UNSET) - highlight_set_entity.additional_properties = d - return highlight_set_entity + highlight_set_entity = cls( + selected_at_window=selected_at_window, + sequence=sequence, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + highlight_set_entity.additional_properties = d + return highlight_set_entity - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +RG = TypeVar("RG", bound="highlight_set_entities") -NO = TypeVar("NO", bound="highlight_set_entities") @attr.s(auto_attribs=True) class highlight_set_entities: - """ Changes the current highlighted entity to these entities. """ # noqa: E501 - entities: Union[Unset, List[str]] = UNSET - type: str = "highlight_set_entities" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Changes the current highlighted entity to these entities.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - entities: Union[Unset, List[str]] = UNSET - if not isinstance(self.entities, Unset): - entities = self.entities - type = self.type + entities: Union[Unset, List[str]] = UNSET + type: str = "highlight_set_entities" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entities is not UNSET: - field_dict['entities'] = entities - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + entities: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities, Unset): + entities = self.entities + type = self.type - @classmethod - def from_dict(cls: Type[NO], src_dict: Dict[str, Any]) -> NO: - d = src_dict.copy() - entities = cast(List[str], d.pop("entities", UNSET)) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entities is not UNSET: + field_dict["entities"] = entities + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[RG], src_dict: Dict[str, Any]) -> RG: + d = src_dict.copy() + entities = cast(List[str], d.pop("entities", UNSET)) - highlight_set_entities = cls( - entities= entities, - type= type, - ) + type = d.pop("type", UNSET) - highlight_set_entities.additional_properties = d - return highlight_set_entities + highlight_set_entities = cls( + entities=entities, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + highlight_set_entities.additional_properties = d + return highlight_set_entities - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +IT = TypeVar("IT", bound="new_annotation") -VX = TypeVar("VX", bound="new_annotation") @attr.s(auto_attribs=True) class new_annotation: - """ Create a new annotation """ # noqa: E501 - annotation_type: Union[Unset, AnnotationType] = UNSET - clobber: Union[Unset, bool] = False - options: Union[Unset, AnnotationOptions] = UNSET - type: str = "new_annotation" + """Create a new annotation""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + annotation_type: Union[Unset, AnnotationType] = UNSET + clobber: Union[Unset, bool] = False + options: Union[Unset, AnnotationOptions] = UNSET + type: str = "new_annotation" - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.annotation_type, Unset): - annotation_type = self.annotation_type - clobber = self.clobber - if not isinstance(self.options, Unset): - options = self.options - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if annotation_type is not UNSET: - field_dict['annotation_type'] = annotation_type - if clobber is not UNSET: - field_dict['clobber'] = clobber - if options is not UNSET: - field_dict['options'] = options - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.annotation_type, Unset): + annotation_type = self.annotation_type + clobber = self.clobber + if not isinstance(self.options, Unset): + options = self.options + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if annotation_type is not UNSET: + field_dict["annotation_type"] = annotation_type + if clobber is not UNSET: + field_dict["clobber"] = clobber + if options is not UNSET: + field_dict["options"] = options + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[VX], src_dict: Dict[str, Any]) -> VX: - d = src_dict.copy() - _annotation_type = d.pop("annotation_type", UNSET) - annotation_type: Union[Unset, AnnotationType] - if isinstance(_annotation_type, Unset): - annotation_type = UNSET - else: - annotation_type = _annotation_type # type: ignore[arg-type] + return field_dict - clobber = d.pop("clobber", UNSET) + @classmethod + def from_dict(cls: Type[IT], src_dict: Dict[str, Any]) -> IT: + d = src_dict.copy() + _annotation_type = d.pop("annotation_type", UNSET) + annotation_type: Union[Unset, AnnotationType] + if isinstance(_annotation_type, Unset): + annotation_type = UNSET + else: + annotation_type = _annotation_type # type: ignore[arg-type] - _options = d.pop("options", UNSET) - options: Union[Unset, AnnotationOptions] - if isinstance(_options, Unset): - options = UNSET - else: - options = _options # type: ignore[arg-type] + clobber = d.pop("clobber", UNSET) - type = d.pop("type", UNSET) + _options = d.pop("options", UNSET) + options: Union[Unset, AnnotationOptions] + if isinstance(_options, Unset): + options = UNSET + else: + options = _options # type: ignore[arg-type] + type = d.pop("type", UNSET) - new_annotation = cls( - annotation_type= annotation_type, - clobber= clobber, - options= options, - type= type, - ) + new_annotation = cls( + annotation_type=annotation_type, + clobber=clobber, + options=options, + type=type, + ) - new_annotation.additional_properties = d - return new_annotation + new_annotation.additional_properties = d + return new_annotation - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +LD = TypeVar("LD", bound="update_annotation") -RG = TypeVar("RG", bound="update_annotation") - @attr.s(auto_attribs=True) class update_annotation: - """ Update an annotation """ # noqa: E501 - annotation_id: Union[Unset, str] = UNSET - options: Union[Unset, AnnotationOptions] = UNSET - type: str = "update_annotation" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Update an annotation""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - annotation_id = self.annotation_id - if not isinstance(self.options, Unset): - options = self.options - type = self.type + annotation_id: Union[Unset, str] = UNSET + options: Union[Unset, AnnotationOptions] = UNSET + type: str = "update_annotation" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if annotation_id is not UNSET: - field_dict['annotation_id'] = annotation_id - if options is not UNSET: - field_dict['options'] = options - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + annotation_id = self.annotation_id + if not isinstance(self.options, Unset): + options = self.options + type = self.type - @classmethod - def from_dict(cls: Type[RG], src_dict: Dict[str, Any]) -> RG: - d = src_dict.copy() - annotation_id = d.pop("annotation_id", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if annotation_id is not UNSET: + field_dict["annotation_id"] = annotation_id + if options is not UNSET: + field_dict["options"] = options + field_dict["type"] = type - _options = d.pop("options", UNSET) - options: Union[Unset, AnnotationOptions] - if isinstance(_options, Unset): - options = UNSET - else: - options = _options # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[LD], src_dict: Dict[str, Any]) -> LD: + d = src_dict.copy() + annotation_id = d.pop("annotation_id", UNSET) + _options = d.pop("options", UNSET) + options: Union[Unset, AnnotationOptions] + if isinstance(_options, Unset): + options = UNSET + else: + options = _options # type: ignore[arg-type] - update_annotation = cls( - annotation_id= annotation_id, - options= options, - type= type, - ) + type = d.pop("type", UNSET) - update_annotation.additional_properties = d - return update_annotation + update_annotation = cls( + annotation_id=annotation_id, + options=options, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + update_annotation.additional_properties = d + return update_annotation - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +UA = TypeVar("UA", bound="object_visible") -IT = TypeVar("IT", bound="object_visible") @attr.s(auto_attribs=True) class object_visible: - """ Hide or show an object """ # noqa: E501 - hidden: Union[Unset, bool] = False - object_id: Union[Unset, str] = UNSET - type: str = "object_visible" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Hide or show an object""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - hidden = self.hidden - object_id = self.object_id - type = self.type + hidden: Union[Unset, bool] = False + object_id: Union[Unset, str] = UNSET + type: str = "object_visible" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if hidden is not UNSET: - field_dict['hidden'] = hidden - if object_id is not UNSET: - field_dict['object_id'] = object_id - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + hidden = self.hidden + object_id = self.object_id + type = self.type - @classmethod - def from_dict(cls: Type[IT], src_dict: Dict[str, Any]) -> IT: - d = src_dict.copy() - hidden = d.pop("hidden", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if hidden is not UNSET: + field_dict["hidden"] = hidden + if object_id is not UNSET: + field_dict["object_id"] = object_id + field_dict["type"] = type - object_id = d.pop("object_id", UNSET) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[UA], src_dict: Dict[str, Any]) -> UA: + d = src_dict.copy() + hidden = d.pop("hidden", UNSET) + object_id = d.pop("object_id", UNSET) - object_visible = cls( - hidden= hidden, - object_id= object_id, - type= type, - ) + type = d.pop("type", UNSET) - object_visible.additional_properties = d - return object_visible + object_visible = cls( + hidden=hidden, + object_id=object_id, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + object_visible.additional_properties = d + return object_visible - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +TN = TypeVar("TN", bound="object_bring_to_front") -LD = TypeVar("LD", bound="object_bring_to_front") @attr.s(auto_attribs=True) class object_bring_to_front: - """ Bring an object to the front of the scene """ # noqa: E501 - object_id: Union[Unset, str] = UNSET - type: str = "object_bring_to_front" + """Bring an object to the front of the scene""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + object_id: Union[Unset, str] = UNSET + type: str = "object_bring_to_front" - def to_dict(self) -> Dict[str, Any]: - object_id = self.object_id - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if object_id is not UNSET: - field_dict['object_id'] = object_id - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + object_id = self.object_id + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if object_id is not UNSET: + field_dict["object_id"] = object_id + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[LD], src_dict: Dict[str, Any]) -> LD: - d = src_dict.copy() - object_id = d.pop("object_id", UNSET) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN: + d = src_dict.copy() + object_id = d.pop("object_id", UNSET) + type = d.pop("type", UNSET) - object_bring_to_front = cls( - object_id= object_id, - type= type, - ) + object_bring_to_front = cls( + object_id=object_id, + type=type, + ) - object_bring_to_front.additional_properties = d - return object_bring_to_front + object_bring_to_front.additional_properties = d + return object_bring_to_front - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +MZ = TypeVar("MZ", bound="get_entity_type") -UA = TypeVar("UA", bound="get_entity_type") - @attr.s(auto_attribs=True) class get_entity_type: - """ What type of entity is this? """ # noqa: E501 - entity_id: Union[Unset, str] = UNSET - type: str = "get_entity_type" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """What type of entity is this?""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id - type = self.type + entity_id: Union[Unset, str] = UNSET + type: str = "get_entity_type" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict['entity_id'] = entity_id - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + type = self.type - @classmethod - def from_dict(cls: Type[UA], src_dict: Dict[str, Any]) -> UA: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) - get_entity_type = cls( - entity_id= entity_id, - type= type, - ) + type = d.pop("type", UNSET) - get_entity_type.additional_properties = d - return get_entity_type + get_entity_type = cls( + entity_id=entity_id, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + get_entity_type.additional_properties = d + return get_entity_type - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +UG = TypeVar("UG", bound="solid2d_add_hole") -TN = TypeVar("TN", bound="solid2d_add_hole") @attr.s(auto_attribs=True) class solid2d_add_hole: - """ Add a hole to a Solid2d object before extruding it. """ # noqa: E501 - hole_id: Union[Unset, str] = UNSET - object_id: Union[Unset, str] = UNSET - type: str = "solid2d_add_hole" + """Add a hole to a Solid2d object before extruding it.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + hole_id: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid2d_add_hole" - def to_dict(self) -> Dict[str, Any]: - hole_id = self.hole_id - object_id = self.object_id - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if hole_id is not UNSET: - field_dict['hole_id'] = hole_id - if object_id is not UNSET: - field_dict['object_id'] = object_id - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + hole_id = self.hole_id + object_id = self.object_id + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if hole_id is not UNSET: + field_dict["hole_id"] = hole_id + if object_id is not UNSET: + field_dict["object_id"] = object_id + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN: - d = src_dict.copy() - hole_id = d.pop("hole_id", UNSET) + return field_dict - object_id = d.pop("object_id", UNSET) + @classmethod + def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG: + d = src_dict.copy() + hole_id = d.pop("hole_id", UNSET) - type = d.pop("type", UNSET) + object_id = d.pop("object_id", UNSET) + type = d.pop("type", UNSET) - solid2d_add_hole = cls( - hole_id= hole_id, - object_id= object_id, - type= type, - ) + solid2d_add_hole = cls( + hole_id=hole_id, + object_id=object_id, + type=type, + ) - solid2d_add_hole.additional_properties = d - return solid2d_add_hole + solid2d_add_hole.additional_properties = d + return solid2d_add_hole - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +CY = TypeVar("CY", bound="solid3d_get_all_edge_faces") -MZ = TypeVar("MZ", bound="solid3d_get_all_edge_faces") - @attr.s(auto_attribs=True) class solid3d_get_all_edge_faces: - """ Gets all faces which use the given edge. """ # noqa: E501 - edge_id: Union[Unset, str] = UNSET - object_id: Union[Unset, str] = UNSET - type: str = "solid3d_get_all_edge_faces" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Gets all faces which use the given edge.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - edge_id = self.edge_id - object_id = self.object_id - type = self.type + edge_id: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid3d_get_all_edge_faces" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edge_id is not UNSET: - field_dict['edge_id'] = edge_id - if object_id is not UNSET: - field_dict['object_id'] = object_id - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + edge_id = self.edge_id + object_id = self.object_id + type = self.type - @classmethod - def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ: - d = src_dict.copy() - edge_id = d.pop("edge_id", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge_id is not UNSET: + field_dict["edge_id"] = edge_id + if object_id is not UNSET: + field_dict["object_id"] = object_id + field_dict["type"] = type - object_id = d.pop("object_id", UNSET) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[CY], src_dict: Dict[str, Any]) -> CY: + d = src_dict.copy() + edge_id = d.pop("edge_id", UNSET) + object_id = d.pop("object_id", UNSET) - solid3d_get_all_edge_faces = cls( - edge_id= edge_id, - object_id= object_id, - type= type, - ) + type = d.pop("type", UNSET) - solid3d_get_all_edge_faces.additional_properties = d - return solid3d_get_all_edge_faces + solid3d_get_all_edge_faces = cls( + edge_id=edge_id, + object_id=object_id, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + solid3d_get_all_edge_faces.additional_properties = d + return solid3d_get_all_edge_faces - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +NZ = TypeVar("NZ", bound="solid3d_get_all_opposite_edges") -UG = TypeVar("UG", bound="solid3d_get_all_opposite_edges") @attr.s(auto_attribs=True) class solid3d_get_all_opposite_edges: - """ Gets all edges which are opposite the given edge, across all possible faces. """ # noqa: E501 - along_vector: Union[Unset, Point3d] = UNSET - edge_id: Union[Unset, str] = UNSET - object_id: Union[Unset, str] = UNSET - type: str = "solid3d_get_all_opposite_edges" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Gets all edges which are opposite the given edge, across all possible faces.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.along_vector, Unset): - along_vector = self.along_vector - edge_id = self.edge_id - object_id = self.object_id - type = self.type + along_vector: Union[Unset, Point3d] = UNSET + edge_id: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid3d_get_all_opposite_edges" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if along_vector is not UNSET: - field_dict['along_vector'] = along_vector - if edge_id is not UNSET: - field_dict['edge_id'] = edge_id - if object_id is not UNSET: - field_dict['object_id'] = object_id - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.along_vector, Unset): + along_vector = self.along_vector + edge_id = self.edge_id + object_id = self.object_id + type = self.type - @classmethod - def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG: - d = src_dict.copy() - _along_vector = d.pop("along_vector", UNSET) - along_vector: Union[Unset, Point3d] - if isinstance(_along_vector, Unset): - along_vector = UNSET - else: - along_vector = _along_vector # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if along_vector is not UNSET: + field_dict["along_vector"] = along_vector + if edge_id is not UNSET: + field_dict["edge_id"] = edge_id + if object_id is not UNSET: + field_dict["object_id"] = object_id + field_dict["type"] = type - edge_id = d.pop("edge_id", UNSET) + return field_dict - object_id = d.pop("object_id", UNSET) + @classmethod + def from_dict(cls: Type[NZ], src_dict: Dict[str, Any]) -> NZ: + d = src_dict.copy() + _along_vector = d.pop("along_vector", UNSET) + along_vector: Union[Unset, Point3d] + if isinstance(_along_vector, Unset): + along_vector = UNSET + else: + along_vector = _along_vector # type: ignore[arg-type] - type = d.pop("type", UNSET) + edge_id = d.pop("edge_id", UNSET) + object_id = d.pop("object_id", UNSET) - solid3d_get_all_opposite_edges = cls( - along_vector= along_vector, - edge_id= edge_id, - object_id= object_id, - type= type, - ) + type = d.pop("type", UNSET) - solid3d_get_all_opposite_edges.additional_properties = d - return solid3d_get_all_opposite_edges + solid3d_get_all_opposite_edges = cls( + along_vector=along_vector, + edge_id=edge_id, + object_id=object_id, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + solid3d_get_all_opposite_edges.additional_properties = d + return solid3d_get_all_opposite_edges - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +LI = TypeVar("LI", bound="solid3d_get_opposite_edge") -CY = TypeVar("CY", bound="solid3d_get_opposite_edge") @attr.s(auto_attribs=True) class solid3d_get_opposite_edge: - """ Gets the edge opposite the given edge, along the given face. """ # noqa: E501 - edge_id: Union[Unset, str] = UNSET - face_id: Union[Unset, str] = UNSET - object_id: Union[Unset, str] = UNSET - type: str = "solid3d_get_opposite_edge" + """Gets the edge opposite the given edge, along the given face.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + edge_id: Union[Unset, str] = UNSET + face_id: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid3d_get_opposite_edge" - def to_dict(self) -> Dict[str, Any]: - edge_id = self.edge_id - face_id = self.face_id - object_id = self.object_id - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edge_id is not UNSET: - field_dict['edge_id'] = edge_id - if face_id is not UNSET: - field_dict['face_id'] = face_id - if object_id is not UNSET: - field_dict['object_id'] = object_id - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + edge_id = self.edge_id + face_id = self.face_id + object_id = self.object_id + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge_id is not UNSET: + field_dict["edge_id"] = edge_id + if face_id is not UNSET: + field_dict["face_id"] = face_id + if object_id is not UNSET: + field_dict["object_id"] = object_id + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[CY], src_dict: Dict[str, Any]) -> CY: - d = src_dict.copy() - edge_id = d.pop("edge_id", UNSET) + return field_dict - face_id = d.pop("face_id", UNSET) + @classmethod + def from_dict(cls: Type[LI], src_dict: Dict[str, Any]) -> LI: + d = src_dict.copy() + edge_id = d.pop("edge_id", UNSET) - object_id = d.pop("object_id", UNSET) + face_id = d.pop("face_id", UNSET) - type = d.pop("type", UNSET) + object_id = d.pop("object_id", UNSET) + type = d.pop("type", UNSET) - solid3d_get_opposite_edge = cls( - edge_id= edge_id, - face_id= face_id, - object_id= object_id, - type= type, - ) + solid3d_get_opposite_edge = cls( + edge_id=edge_id, + face_id=face_id, + object_id=object_id, + type=type, + ) - solid3d_get_opposite_edge.additional_properties = d - return solid3d_get_opposite_edge + solid3d_get_opposite_edge.additional_properties = d + return solid3d_get_opposite_edge - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +LO = TypeVar("LO", bound="solid3d_get_next_adjacent_edge") -NZ = TypeVar("NZ", bound="solid3d_get_next_adjacent_edge") - @attr.s(auto_attribs=True) class solid3d_get_next_adjacent_edge: - """ Gets the next adjacent edge for the given edge, along the given face. """ # noqa: E501 - edge_id: Union[Unset, str] = UNSET - face_id: Union[Unset, str] = UNSET - object_id: Union[Unset, str] = UNSET - type: str = "solid3d_get_next_adjacent_edge" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Gets the next adjacent edge for the given edge, along the given face.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - edge_id = self.edge_id - face_id = self.face_id - object_id = self.object_id - type = self.type + edge_id: Union[Unset, str] = UNSET + face_id: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid3d_get_next_adjacent_edge" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edge_id is not UNSET: - field_dict['edge_id'] = edge_id - if face_id is not UNSET: - field_dict['face_id'] = face_id - if object_id is not UNSET: - field_dict['object_id'] = object_id - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + edge_id = self.edge_id + face_id = self.face_id + object_id = self.object_id + type = self.type - @classmethod - def from_dict(cls: Type[NZ], src_dict: Dict[str, Any]) -> NZ: - d = src_dict.copy() - edge_id = d.pop("edge_id", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge_id is not UNSET: + field_dict["edge_id"] = edge_id + if face_id is not UNSET: + field_dict["face_id"] = face_id + if object_id is not UNSET: + field_dict["object_id"] = object_id + field_dict["type"] = type - face_id = d.pop("face_id", UNSET) + return field_dict - object_id = d.pop("object_id", UNSET) + @classmethod + def from_dict(cls: Type[LO], src_dict: Dict[str, Any]) -> LO: + d = src_dict.copy() + edge_id = d.pop("edge_id", UNSET) - type = d.pop("type", UNSET) + face_id = d.pop("face_id", UNSET) + object_id = d.pop("object_id", UNSET) - solid3d_get_next_adjacent_edge = cls( - edge_id= edge_id, - face_id= face_id, - object_id= object_id, - type= type, - ) + type = d.pop("type", UNSET) - solid3d_get_next_adjacent_edge.additional_properties = d - return solid3d_get_next_adjacent_edge + solid3d_get_next_adjacent_edge = cls( + edge_id=edge_id, + face_id=face_id, + object_id=object_id, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + solid3d_get_next_adjacent_edge.additional_properties = d + return solid3d_get_next_adjacent_edge - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +XJ = TypeVar("XJ", bound="solid3d_get_prev_adjacent_edge") -LI = TypeVar("LI", bound="solid3d_get_prev_adjacent_edge") @attr.s(auto_attribs=True) class solid3d_get_prev_adjacent_edge: - """ Gets the previous adjacent edge for the given edge, along the given face. """ # noqa: E501 - edge_id: Union[Unset, str] = UNSET - face_id: Union[Unset, str] = UNSET - object_id: Union[Unset, str] = UNSET - type: str = "solid3d_get_prev_adjacent_edge" + """Gets the previous adjacent edge for the given edge, along the given face.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + edge_id: Union[Unset, str] = UNSET + face_id: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid3d_get_prev_adjacent_edge" - def to_dict(self) -> Dict[str, Any]: - edge_id = self.edge_id - face_id = self.face_id - object_id = self.object_id - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edge_id is not UNSET: - field_dict['edge_id'] = edge_id - if face_id is not UNSET: - field_dict['face_id'] = face_id - if object_id is not UNSET: - field_dict['object_id'] = object_id - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + edge_id = self.edge_id + face_id = self.face_id + object_id = self.object_id + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge_id is not UNSET: + field_dict["edge_id"] = edge_id + if face_id is not UNSET: + field_dict["face_id"] = face_id + if object_id is not UNSET: + field_dict["object_id"] = object_id + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[LI], src_dict: Dict[str, Any]) -> LI: - d = src_dict.copy() - edge_id = d.pop("edge_id", UNSET) + return field_dict - face_id = d.pop("face_id", UNSET) + @classmethod + def from_dict(cls: Type[XJ], src_dict: Dict[str, Any]) -> XJ: + d = src_dict.copy() + edge_id = d.pop("edge_id", UNSET) - object_id = d.pop("object_id", UNSET) + face_id = d.pop("face_id", UNSET) - type = d.pop("type", UNSET) + object_id = d.pop("object_id", UNSET) + type = d.pop("type", UNSET) - solid3d_get_prev_adjacent_edge = cls( - edge_id= edge_id, - face_id= face_id, - object_id= object_id, - type= type, - ) + solid3d_get_prev_adjacent_edge = cls( + edge_id=edge_id, + face_id=face_id, + object_id=object_id, + type=type, + ) - solid3d_get_prev_adjacent_edge.additional_properties = d - return solid3d_get_prev_adjacent_edge + solid3d_get_prev_adjacent_edge.additional_properties = d + return solid3d_get_prev_adjacent_edge - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +OW = TypeVar("OW", bound="send_object") -LO = TypeVar("LO", bound="send_object") - @attr.s(auto_attribs=True) class send_object: - """ Sends object to front or back. """ # noqa: E501 - front: Union[Unset, bool] = False - object_id: Union[Unset, str] = UNSET - type: str = "send_object" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Sends object to front or back.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - front = self.front - object_id = self.object_id - type = self.type + front: Union[Unset, bool] = False + object_id: Union[Unset, str] = UNSET + type: str = "send_object" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if front is not UNSET: - field_dict['front'] = front - if object_id is not UNSET: - field_dict['object_id'] = object_id - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + front = self.front + object_id = self.object_id + type = self.type - @classmethod - def from_dict(cls: Type[LO], src_dict: Dict[str, Any]) -> LO: - d = src_dict.copy() - front = d.pop("front", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if front is not UNSET: + field_dict["front"] = front + if object_id is not UNSET: + field_dict["object_id"] = object_id + field_dict["type"] = type - object_id = d.pop("object_id", UNSET) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[OW], src_dict: Dict[str, Any]) -> OW: + d = src_dict.copy() + front = d.pop("front", UNSET) + object_id = d.pop("object_id", UNSET) - send_object = cls( - front= front, - object_id= object_id, - type= type, - ) + type = d.pop("type", UNSET) - send_object.additional_properties = d - return send_object + send_object = cls( + front=front, + object_id=object_id, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + send_object.additional_properties = d + return send_object - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +JQ = TypeVar("JQ", bound="entity_set_opacity") -XJ = TypeVar("XJ", bound="entity_set_opacity") @attr.s(auto_attribs=True) class entity_set_opacity: - """ Set opacity of the entity. """ # noqa: E501 - entity_id: Union[Unset, str] = UNSET - opacity: Union[Unset, float] = UNSET - type: str = "entity_set_opacity" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Set opacity of the entity.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id - opacity = self.opacity - type = self.type + entity_id: Union[Unset, str] = UNSET + opacity: Union[Unset, float] = UNSET + type: str = "entity_set_opacity" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict['entity_id'] = entity_id - if opacity is not UNSET: - field_dict['opacity'] = opacity - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + opacity = self.opacity + type = self.type - @classmethod - def from_dict(cls: Type[XJ], src_dict: Dict[str, Any]) -> XJ: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + if opacity is not UNSET: + field_dict["opacity"] = opacity + field_dict["type"] = type - opacity = d.pop("opacity", UNSET) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[JQ], src_dict: Dict[str, Any]) -> JQ: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) + opacity = d.pop("opacity", UNSET) - entity_set_opacity = cls( - entity_id= entity_id, - opacity= opacity, - type= type, - ) + type = d.pop("type", UNSET) - entity_set_opacity.additional_properties = d - return entity_set_opacity + entity_set_opacity = cls( + entity_id=entity_id, + opacity=opacity, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + entity_set_opacity.additional_properties = d + return entity_set_opacity - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +PQ = TypeVar("PQ", bound="entity_fade") -OW = TypeVar("OW", bound="entity_fade") @attr.s(auto_attribs=True) class entity_fade: - """ Fade the entity in or out. """ # noqa: E501 - duration_seconds: Union[Unset, float] = UNSET - entity_id: Union[Unset, str] = UNSET - fade_in: Union[Unset, bool] = False - type: str = "entity_fade" + """Fade the entity in or out.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + duration_seconds: Union[Unset, float] = UNSET + entity_id: Union[Unset, str] = UNSET + fade_in: Union[Unset, bool] = False + type: str = "entity_fade" - def to_dict(self) -> Dict[str, Any]: - duration_seconds = self.duration_seconds - entity_id = self.entity_id - fade_in = self.fade_in - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if duration_seconds is not UNSET: - field_dict['duration_seconds'] = duration_seconds - if entity_id is not UNSET: - field_dict['entity_id'] = entity_id - if fade_in is not UNSET: - field_dict['fade_in'] = fade_in - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + duration_seconds = self.duration_seconds + entity_id = self.entity_id + fade_in = self.fade_in + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if duration_seconds is not UNSET: + field_dict["duration_seconds"] = duration_seconds + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + if fade_in is not UNSET: + field_dict["fade_in"] = fade_in + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[OW], src_dict: Dict[str, Any]) -> OW: - d = src_dict.copy() - duration_seconds = d.pop("duration_seconds", UNSET) + return field_dict - entity_id = d.pop("entity_id", UNSET) + @classmethod + def from_dict(cls: Type[PQ], src_dict: Dict[str, Any]) -> PQ: + d = src_dict.copy() + duration_seconds = d.pop("duration_seconds", UNSET) - fade_in = d.pop("fade_in", UNSET) + entity_id = d.pop("entity_id", UNSET) - type = d.pop("type", UNSET) + fade_in = d.pop("fade_in", UNSET) + type = d.pop("type", UNSET) - entity_fade = cls( - duration_seconds= duration_seconds, - entity_id= entity_id, - fade_in= fade_in, - type= type, - ) + entity_fade = cls( + duration_seconds=duration_seconds, + entity_id=entity_id, + fade_in=fade_in, + type=type, + ) - entity_fade.additional_properties = d - return entity_fade + entity_fade.additional_properties = d + return entity_fade - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +IM = TypeVar("IM", bound="make_plane") -JQ = TypeVar("JQ", bound="make_plane") - @attr.s(auto_attribs=True) class make_plane: - """ Make a plane. """ # noqa: E501 - clobber: Union[Unset, bool] = False - hide: Union[Unset, bool] = False - origin: Union[Unset, Point3d] = UNSET - size: Union[Unset, float] = UNSET - type: str = "make_plane" - x_axis: Union[Unset, Point3d] = UNSET - y_axis: Union[Unset, Point3d] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - clobber = self.clobber - hide = self.hide - if not isinstance(self.origin, Unset): - origin = self.origin - size = self.size - type = self.type - if not isinstance(self.x_axis, Unset): - x_axis = self.x_axis - if not isinstance(self.y_axis, Unset): - y_axis = self.y_axis - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if clobber is not UNSET: - field_dict['clobber'] = clobber - if hide is not UNSET: - field_dict['hide'] = hide - if origin is not UNSET: - field_dict['origin'] = origin - if size is not UNSET: - field_dict['size'] = size - field_dict['type'] = type - if x_axis is not UNSET: - field_dict['x_axis'] = x_axis - if y_axis is not UNSET: - field_dict['y_axis'] = y_axis - - return field_dict - - @classmethod - def from_dict(cls: Type[JQ], src_dict: Dict[str, Any]) -> JQ: - d = src_dict.copy() - clobber = d.pop("clobber", UNSET) - - hide = d.pop("hide", UNSET) - - _origin = d.pop("origin", UNSET) - origin: Union[Unset, Point3d] - if isinstance(_origin, Unset): - origin = UNSET - else: - origin = _origin # type: ignore[arg-type] - - size = d.pop("size", UNSET) - - type = d.pop("type", UNSET) - - _x_axis = d.pop("x_axis", UNSET) - x_axis: Union[Unset, Point3d] - if isinstance(_x_axis, Unset): - x_axis = UNSET - else: - x_axis = _x_axis # type: ignore[arg-type] - - _y_axis = d.pop("y_axis", UNSET) - y_axis: Union[Unset, Point3d] - if isinstance(_y_axis, Unset): - y_axis = UNSET - else: - y_axis = _y_axis # type: ignore[arg-type] - - - make_plane = cls( - clobber= clobber, - hide= hide, - origin= origin, - size= size, - type= type, - x_axis= x_axis, - y_axis= y_axis, - ) - - make_plane.additional_properties = d - return make_plane - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - - - -PQ = TypeVar("PQ", bound="plane_set_color") + """Make a plane.""" # noqa: E501 + + clobber: Union[Unset, bool] = False + hide: Union[Unset, bool] = False + origin: Union[Unset, Point3d] = UNSET + size: Union[Unset, float] = UNSET + type: str = "make_plane" + x_axis: Union[Unset, Point3d] = UNSET + y_axis: Union[Unset, Point3d] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + clobber = self.clobber + hide = self.hide + if not isinstance(self.origin, Unset): + origin = self.origin + size = self.size + type = self.type + if not isinstance(self.x_axis, Unset): + x_axis = self.x_axis + if not isinstance(self.y_axis, Unset): + y_axis = self.y_axis + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if clobber is not UNSET: + field_dict["clobber"] = clobber + if hide is not UNSET: + field_dict["hide"] = hide + if origin is not UNSET: + field_dict["origin"] = origin + if size is not UNSET: + field_dict["size"] = size + field_dict["type"] = type + if x_axis is not UNSET: + field_dict["x_axis"] = x_axis + if y_axis is not UNSET: + field_dict["y_axis"] = y_axis + + return field_dict + + @classmethod + def from_dict(cls: Type[IM], src_dict: Dict[str, Any]) -> IM: + d = src_dict.copy() + clobber = d.pop("clobber", UNSET) + + hide = d.pop("hide", UNSET) + + _origin = d.pop("origin", UNSET) + origin: Union[Unset, Point3d] + if isinstance(_origin, Unset): + origin = UNSET + else: + origin = _origin # type: ignore[arg-type] + + size = d.pop("size", UNSET) + + type = d.pop("type", UNSET) + + _x_axis = d.pop("x_axis", UNSET) + x_axis: Union[Unset, Point3d] + if isinstance(_x_axis, Unset): + x_axis = UNSET + else: + x_axis = _x_axis # type: ignore[arg-type] + + _y_axis = d.pop("y_axis", UNSET) + y_axis: Union[Unset, Point3d] + if isinstance(_y_axis, Unset): + y_axis = UNSET + else: + y_axis = _y_axis # type: ignore[arg-type] + + make_plane = cls( + clobber=clobber, + hide=hide, + origin=origin, + size=size, + type=type, + x_axis=x_axis, + y_axis=y_axis, + ) + + make_plane.additional_properties = d + return make_plane + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +OU = TypeVar("OU", bound="plane_set_color") + @attr.s(auto_attribs=True) class plane_set_color: - """ Set the plane's color. """ # noqa: E501 - color: Union[Unset, Color] = UNSET - plane_id: Union[Unset, str] = UNSET - type: str = "plane_set_color" + """Set the plane's color.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + color: Union[Unset, Color] = UNSET + plane_id: Union[Unset, str] = UNSET + type: str = "plane_set_color" - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.color, Unset): - color = self.color - plane_id = self.plane_id - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if color is not UNSET: - field_dict['color'] = color - if plane_id is not UNSET: - field_dict['plane_id'] = plane_id - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.color, Unset): + color = self.color + plane_id = self.plane_id + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if color is not UNSET: + field_dict["color"] = color + if plane_id is not UNSET: + field_dict["plane_id"] = plane_id + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[PQ], src_dict: Dict[str, Any]) -> PQ: - d = src_dict.copy() - _color = d.pop("color", UNSET) - color: Union[Unset, Color] - if isinstance(_color, Unset): - color = UNSET - else: - color = _color # type: ignore[arg-type] + return field_dict - plane_id = d.pop("plane_id", UNSET) + @classmethod + def from_dict(cls: Type[OU], src_dict: Dict[str, Any]) -> OU: + d = src_dict.copy() + _color = d.pop("color", UNSET) + color: Union[Unset, Color] + if isinstance(_color, Unset): + color = UNSET + else: + color = _color # type: ignore[arg-type] - type = d.pop("type", UNSET) + plane_id = d.pop("plane_id", UNSET) + type = d.pop("type", UNSET) - plane_set_color = cls( - color= color, - plane_id= plane_id, - type= type, - ) + plane_set_color = cls( + color=color, + plane_id=plane_id, + type=type, + ) - plane_set_color.additional_properties = d - return plane_set_color + plane_set_color.additional_properties = d + return plane_set_color - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +KL = TypeVar("KL", bound="set_tool") -IM = TypeVar("IM", bound="set_tool") - @attr.s(auto_attribs=True) class set_tool: - """ Set the active tool. """ # noqa: E501 - tool: Union[Unset, SceneToolType] = UNSET - type: str = "set_tool" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Set the active tool.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.tool, Unset): - tool = self.tool - type = self.type + tool: Union[Unset, SceneToolType] = UNSET + type: str = "set_tool" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if tool is not UNSET: - field_dict['tool'] = tool - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.tool, Unset): + tool = self.tool + type = self.type - @classmethod - def from_dict(cls: Type[IM], src_dict: Dict[str, Any]) -> IM: - d = src_dict.copy() - _tool = d.pop("tool", UNSET) - tool: Union[Unset, SceneToolType] - if isinstance(_tool, Unset): - tool = UNSET - else: - tool = _tool # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if tool is not UNSET: + field_dict["tool"] = tool + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[KL], src_dict: Dict[str, Any]) -> KL: + d = src_dict.copy() + _tool = d.pop("tool", UNSET) + tool: Union[Unset, SceneToolType] + if isinstance(_tool, Unset): + tool = UNSET + else: + tool = _tool # type: ignore[arg-type] - set_tool = cls( - tool= tool, - type= type, - ) + type = d.pop("type", UNSET) - set_tool.additional_properties = d - return set_tool + set_tool = cls( + tool=tool, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + set_tool.additional_properties = d + return set_tool - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +XI = TypeVar("XI", bound="mouse_move") -OU = TypeVar("OU", bound="mouse_move") @attr.s(auto_attribs=True) class mouse_move: - """ Send a mouse move event. """ # noqa: E501 - sequence: Union[Unset, int] = UNSET - type: str = "mouse_move" - window: Union[Unset, Point2d] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Send a mouse move event.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - sequence = self.sequence - type = self.type - if not isinstance(self.window, Unset): - window = self.window + sequence: Union[Unset, int] = UNSET + type: str = "mouse_move" + window: Union[Unset, Point2d] = UNSET - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if sequence is not UNSET: - field_dict['sequence'] = sequence - field_dict['type'] = type - if window is not UNSET: - field_dict['window'] = window + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + sequence = self.sequence + type = self.type + if not isinstance(self.window, Unset): + window = self.window - @classmethod - def from_dict(cls: Type[OU], src_dict: Dict[str, Any]) -> OU: - d = src_dict.copy() - sequence = d.pop("sequence", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if sequence is not UNSET: + field_dict["sequence"] = sequence + field_dict["type"] = type + if window is not UNSET: + field_dict["window"] = window - type = d.pop("type", UNSET) + return field_dict - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[XI], src_dict: Dict[str, Any]) -> XI: + d = src_dict.copy() + sequence = d.pop("sequence", UNSET) + type = d.pop("type", UNSET) - mouse_move = cls( - sequence= sequence, - type= type, - window= window, - ) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - mouse_move.additional_properties = d - return mouse_move + mouse_move = cls( + sequence=sequence, + type=type, + window=window, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + mouse_move.additional_properties = d + return mouse_move - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +PO = TypeVar("PO", bound="mouse_click") -KL = TypeVar("KL", bound="mouse_click") @attr.s(auto_attribs=True) class mouse_click: - """ Send a mouse click event. Updates modified/selected entities. """ # noqa: E501 - type: str = "mouse_click" - window: Union[Unset, Point2d] = UNSET + """Send a mouse click event. Updates modified/selected entities.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + type: str = "mouse_click" + window: Union[Unset, Point2d] = UNSET - def to_dict(self) -> Dict[str, Any]: - type = self.type - if not isinstance(self.window, Unset): - window = self.window + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type - if window is not UNSET: - field_dict['window'] = window + def to_dict(self) -> Dict[str, Any]: + type = self.type + if not isinstance(self.window, Unset): + window = self.window - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + if window is not UNSET: + field_dict["window"] = window - @classmethod - def from_dict(cls: Type[KL], src_dict: Dict[str, Any]) -> KL: - d = src_dict.copy() - type = d.pop("type", UNSET) + return field_dict - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[PO], src_dict: Dict[str, Any]) -> PO: + d = src_dict.copy() + type = d.pop("type", UNSET) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - mouse_click = cls( - type= type, - window= window, - ) + mouse_click = cls( + type=type, + window=window, + ) - mouse_click.additional_properties = d - return mouse_click + mouse_click.additional_properties = d + return mouse_click - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +PS = TypeVar("PS", bound="sketch_mode_enable") -XI = TypeVar("XI", bound="sketch_mode_enable") - @attr.s(auto_attribs=True) class sketch_mode_enable: - """ Enable sketch mode on the given plane. """ # noqa: E501 - animated: Union[Unset, bool] = False - disable_camera_with_plane: Union[Unset, Point3d] = UNSET - ortho: Union[Unset, bool] = False - plane_id: Union[Unset, str] = UNSET - type: str = "sketch_mode_enable" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Enable sketch mode on the given plane.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - animated = self.animated - if not isinstance(self.disable_camera_with_plane, Unset): - disable_camera_with_plane = self.disable_camera_with_plane - ortho = self.ortho - plane_id = self.plane_id - type = self.type + animated: Union[Unset, bool] = False + disable_camera_with_plane: Union[Unset, Point3d] = UNSET + ortho: Union[Unset, bool] = False + plane_id: Union[Unset, str] = UNSET + type: str = "sketch_mode_enable" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if animated is not UNSET: - field_dict['animated'] = animated - if disable_camera_with_plane is not UNSET: - field_dict['disable_camera_with_plane'] = disable_camera_with_plane - if ortho is not UNSET: - field_dict['ortho'] = ortho - if plane_id is not UNSET: - field_dict['plane_id'] = plane_id - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + animated = self.animated + if not isinstance(self.disable_camera_with_plane, Unset): + disable_camera_with_plane = self.disable_camera_with_plane + ortho = self.ortho + plane_id = self.plane_id + type = self.type - @classmethod - def from_dict(cls: Type[XI], src_dict: Dict[str, Any]) -> XI: - d = src_dict.copy() - animated = d.pop("animated", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if animated is not UNSET: + field_dict["animated"] = animated + if disable_camera_with_plane is not UNSET: + field_dict["disable_camera_with_plane"] = disable_camera_with_plane + if ortho is not UNSET: + field_dict["ortho"] = ortho + if plane_id is not UNSET: + field_dict["plane_id"] = plane_id + field_dict["type"] = type - _disable_camera_with_plane = d.pop("disable_camera_with_plane", UNSET) - disable_camera_with_plane: Union[Unset, Point3d] - if isinstance(_disable_camera_with_plane, Unset): - disable_camera_with_plane = UNSET - else: - disable_camera_with_plane = _disable_camera_with_plane # type: ignore[arg-type] + return field_dict - ortho = d.pop("ortho", UNSET) + @classmethod + def from_dict(cls: Type[PS], src_dict: Dict[str, Any]) -> PS: + d = src_dict.copy() + animated = d.pop("animated", UNSET) - plane_id = d.pop("plane_id", UNSET) + _disable_camera_with_plane = d.pop("disable_camera_with_plane", UNSET) + disable_camera_with_plane: Union[Unset, Point3d] + if isinstance(_disable_camera_with_plane, Unset): + disable_camera_with_plane = UNSET + else: + disable_camera_with_plane = _disable_camera_with_plane # type: ignore[arg-type] - type = d.pop("type", UNSET) + ortho = d.pop("ortho", UNSET) + plane_id = d.pop("plane_id", UNSET) - sketch_mode_enable = cls( - animated= animated, - disable_camera_with_plane= disable_camera_with_plane, - ortho= ortho, - plane_id= plane_id, - type= type, - ) + type = d.pop("type", UNSET) - sketch_mode_enable.additional_properties = d - return sketch_mode_enable + sketch_mode_enable = cls( + animated=animated, + disable_camera_with_plane=disable_camera_with_plane, + ortho=ortho, + plane_id=plane_id, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + sketch_mode_enable.additional_properties = d + return sketch_mode_enable - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +WR = TypeVar("WR", bound="sketch_mode_disable") -PO = TypeVar("PO", bound="sketch_mode_disable") @attr.s(auto_attribs=True) class sketch_mode_disable: - """ Disable sketch mode. """ # noqa: E501 - type: str = "sketch_mode_disable" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Disable sketch mode.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - type = self.type + type: str = "sketch_mode_disable" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + type = self.type - @classmethod - def from_dict(cls: Type[PO], src_dict: Dict[str, Any]) -> PO: - d = src_dict.copy() - type = d.pop("type", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + return field_dict - sketch_mode_disable = cls( - type= type, - ) + @classmethod + def from_dict(cls: Type[WR], src_dict: Dict[str, Any]) -> WR: + d = src_dict.copy() + type = d.pop("type", UNSET) - sketch_mode_disable.additional_properties = d - return sketch_mode_disable + sketch_mode_disable = cls( + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + sketch_mode_disable.additional_properties = d + return sketch_mode_disable - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +XL = TypeVar("XL", bound="curve_get_type") -PS = TypeVar("PS", bound="curve_get_type") @attr.s(auto_attribs=True) class curve_get_type: - """ Get type of a given curve. """ # noqa: E501 - curve_id: Union[Unset, str] = UNSET - type: str = "curve_get_type" + """Get type of a given curve.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + curve_id: Union[Unset, str] = UNSET + type: str = "curve_get_type" - def to_dict(self) -> Dict[str, Any]: - curve_id = self.curve_id - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if curve_id is not UNSET: - field_dict['curve_id'] = curve_id - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + curve_id = self.curve_id + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if curve_id is not UNSET: + field_dict["curve_id"] = curve_id + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[PS], src_dict: Dict[str, Any]) -> PS: - d = src_dict.copy() - curve_id = d.pop("curve_id", UNSET) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[XL], src_dict: Dict[str, Any]) -> XL: + d = src_dict.copy() + curve_id = d.pop("curve_id", UNSET) + type = d.pop("type", UNSET) - curve_get_type = cls( - curve_id= curve_id, - type= type, - ) + curve_get_type = cls( + curve_id=curve_id, + type=type, + ) - curve_get_type.additional_properties = d - return curve_get_type + curve_get_type.additional_properties = d + return curve_get_type - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +ZX = TypeVar("ZX", bound="curve_get_control_points") -WR = TypeVar("WR", bound="curve_get_control_points") - @attr.s(auto_attribs=True) class curve_get_control_points: - """ Get control points of a given curve. """ # noqa: E501 - curve_id: Union[Unset, str] = UNSET - type: str = "curve_get_control_points" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Get control points of a given curve.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - curve_id = self.curve_id - type = self.type + curve_id: Union[Unset, str] = UNSET + type: str = "curve_get_control_points" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if curve_id is not UNSET: - field_dict['curve_id'] = curve_id - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + curve_id = self.curve_id + type = self.type - @classmethod - def from_dict(cls: Type[WR], src_dict: Dict[str, Any]) -> WR: - d = src_dict.copy() - curve_id = d.pop("curve_id", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if curve_id is not UNSET: + field_dict["curve_id"] = curve_id + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[ZX], src_dict: Dict[str, Any]) -> ZX: + d = src_dict.copy() + curve_id = d.pop("curve_id", UNSET) - curve_get_control_points = cls( - curve_id= curve_id, - type= type, - ) + type = d.pop("type", UNSET) - curve_get_control_points.additional_properties = d - return curve_get_control_points + curve_get_control_points = cls( + curve_id=curve_id, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + curve_get_control_points.additional_properties = d + return curve_get_control_points - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +FT = TypeVar("FT", bound="take_snapshot") -XL = TypeVar("XL", bound="take_snapshot") @attr.s(auto_attribs=True) class take_snapshot: - """ Take a snapshot. """ # noqa: E501 - format: Union[Unset, ImageFormat] = UNSET - type: str = "take_snapshot" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Take a snapshot.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.format, Unset): - format = self.format - type = self.type + format: Union[Unset, ImageFormat] = UNSET + type: str = "take_snapshot" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if format is not UNSET: - field_dict['format'] = format - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.format, Unset): + format = self.format + type = self.type - @classmethod - def from_dict(cls: Type[XL], src_dict: Dict[str, Any]) -> XL: - d = src_dict.copy() - _format = d.pop("format", UNSET) - format: Union[Unset, ImageFormat] - if isinstance(_format, Unset): - format = UNSET - else: - format = _format # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if format is not UNSET: + field_dict["format"] = format + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[FT], src_dict: Dict[str, Any]) -> FT: + d = src_dict.copy() + _format = d.pop("format", UNSET) + format: Union[Unset, ImageFormat] + if isinstance(_format, Unset): + format = UNSET + else: + format = _format # type: ignore[arg-type] - take_snapshot = cls( - format= format, - type= type, - ) + type = d.pop("type", UNSET) - take_snapshot.additional_properties = d - return take_snapshot + take_snapshot = cls( + format=format, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + take_snapshot.additional_properties = d + return take_snapshot - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +NX = TypeVar("NX", bound="make_axes_gizmo") -ZX = TypeVar("ZX", bound="make_axes_gizmo") @attr.s(auto_attribs=True) class make_axes_gizmo: - """ Add a gizmo showing the axes. """ # noqa: E501 - clobber: Union[Unset, bool] = False - gizmo_mode: Union[Unset, bool] = False - type: str = "make_axes_gizmo" + """Add a gizmo showing the axes.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + clobber: Union[Unset, bool] = False + gizmo_mode: Union[Unset, bool] = False + type: str = "make_axes_gizmo" - def to_dict(self) -> Dict[str, Any]: - clobber = self.clobber - gizmo_mode = self.gizmo_mode - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if clobber is not UNSET: - field_dict['clobber'] = clobber - if gizmo_mode is not UNSET: - field_dict['gizmo_mode'] = gizmo_mode - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + clobber = self.clobber + gizmo_mode = self.gizmo_mode + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if clobber is not UNSET: + field_dict["clobber"] = clobber + if gizmo_mode is not UNSET: + field_dict["gizmo_mode"] = gizmo_mode + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[ZX], src_dict: Dict[str, Any]) -> ZX: - d = src_dict.copy() - clobber = d.pop("clobber", UNSET) + return field_dict - gizmo_mode = d.pop("gizmo_mode", UNSET) + @classmethod + def from_dict(cls: Type[NX], src_dict: Dict[str, Any]) -> NX: + d = src_dict.copy() + clobber = d.pop("clobber", UNSET) - type = d.pop("type", UNSET) + gizmo_mode = d.pop("gizmo_mode", UNSET) + type = d.pop("type", UNSET) - make_axes_gizmo = cls( - clobber= clobber, - gizmo_mode= gizmo_mode, - type= type, - ) + make_axes_gizmo = cls( + clobber=clobber, + gizmo_mode=gizmo_mode, + type=type, + ) - make_axes_gizmo.additional_properties = d - return make_axes_gizmo + make_axes_gizmo.additional_properties = d + return make_axes_gizmo - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +SC = TypeVar("SC", bound="path_get_info") -FT = TypeVar("FT", bound="path_get_info") - @attr.s(auto_attribs=True) class path_get_info: - """ Query the given path """ # noqa: E501 - path_id: Union[Unset, str] = UNSET - type: str = "path_get_info" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Query the given path""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - path_id = self.path_id - type = self.type + path_id: Union[Unset, str] = UNSET + type: str = "path_get_info" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if path_id is not UNSET: - field_dict['path_id'] = path_id - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + path_id = self.path_id + type = self.type - @classmethod - def from_dict(cls: Type[FT], src_dict: Dict[str, Any]) -> FT: - d = src_dict.copy() - path_id = d.pop("path_id", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if path_id is not UNSET: + field_dict["path_id"] = path_id + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[SC], src_dict: Dict[str, Any]) -> SC: + d = src_dict.copy() + path_id = d.pop("path_id", UNSET) - path_get_info = cls( - path_id= path_id, - type= type, - ) + type = d.pop("type", UNSET) - path_get_info.additional_properties = d - return path_get_info + path_get_info = cls( + path_id=path_id, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + path_get_info.additional_properties = d + return path_get_info - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +TX = TypeVar("TX", bound="path_get_curve_uuids_for_vertices") -NX = TypeVar("NX", bound="path_get_curve_uuids_for_vertices") @attr.s(auto_attribs=True) class path_get_curve_uuids_for_vertices: - """ Get curves for vertices within a path """ # noqa: E501 - path_id: Union[Unset, str] = UNSET - type: str = "path_get_curve_uuids_for_vertices" - vertex_ids: Union[Unset, List[str]] = UNSET + """Get curves for vertices within a path""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + path_id: Union[Unset, str] = UNSET + type: str = "path_get_curve_uuids_for_vertices" + vertex_ids: Union[Unset, List[str]] = UNSET - def to_dict(self) -> Dict[str, Any]: - path_id = self.path_id - type = self.type - vertex_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.vertex_ids, Unset): - vertex_ids = self.vertex_ids + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if path_id is not UNSET: - field_dict['path_id'] = path_id - field_dict['type'] = type - if vertex_ids is not UNSET: - field_dict['vertex_ids'] = vertex_ids + def to_dict(self) -> Dict[str, Any]: + path_id = self.path_id + type = self.type + vertex_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.vertex_ids, Unset): + vertex_ids = self.vertex_ids - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if path_id is not UNSET: + field_dict["path_id"] = path_id + field_dict["type"] = type + if vertex_ids is not UNSET: + field_dict["vertex_ids"] = vertex_ids - @classmethod - def from_dict(cls: Type[NX], src_dict: Dict[str, Any]) -> NX: - d = src_dict.copy() - path_id = d.pop("path_id", UNSET) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[TX], src_dict: Dict[str, Any]) -> TX: + d = src_dict.copy() + path_id = d.pop("path_id", UNSET) - vertex_ids = cast(List[str], d.pop("vertex_ids", UNSET)) + type = d.pop("type", UNSET) + vertex_ids = cast(List[str], d.pop("vertex_ids", UNSET)) - path_get_curve_uuids_for_vertices = cls( - path_id= path_id, - type= type, - vertex_ids= vertex_ids, - ) + path_get_curve_uuids_for_vertices = cls( + path_id=path_id, + type=type, + vertex_ids=vertex_ids, + ) - path_get_curve_uuids_for_vertices.additional_properties = d - return path_get_curve_uuids_for_vertices + path_get_curve_uuids_for_vertices.additional_properties = d + return path_get_curve_uuids_for_vertices - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +JA = TypeVar("JA", bound="path_get_vertex_uuids") -SC = TypeVar("SC", bound="path_get_vertex_uuids") - @attr.s(auto_attribs=True) class path_get_vertex_uuids: - """ Get vertices within a path """ # noqa: E501 - path_id: Union[Unset, str] = UNSET - type: str = "path_get_vertex_uuids" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Get vertices within a path""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - path_id = self.path_id - type = self.type + path_id: Union[Unset, str] = UNSET + type: str = "path_get_vertex_uuids" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if path_id is not UNSET: - field_dict['path_id'] = path_id - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + path_id = self.path_id + type = self.type - @classmethod - def from_dict(cls: Type[SC], src_dict: Dict[str, Any]) -> SC: - d = src_dict.copy() - path_id = d.pop("path_id", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if path_id is not UNSET: + field_dict["path_id"] = path_id + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[JA], src_dict: Dict[str, Any]) -> JA: + d = src_dict.copy() + path_id = d.pop("path_id", UNSET) - path_get_vertex_uuids = cls( - path_id= path_id, - type= type, - ) + type = d.pop("type", UNSET) - path_get_vertex_uuids.additional_properties = d - return path_get_vertex_uuids + path_get_vertex_uuids = cls( + path_id=path_id, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + path_get_vertex_uuids.additional_properties = d + return path_get_vertex_uuids - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +SK = TypeVar("SK", bound="handle_mouse_drag_start") -TX = TypeVar("TX", bound="handle_mouse_drag_start") @attr.s(auto_attribs=True) class handle_mouse_drag_start: - """ Start dragging mouse. """ # noqa: E501 - type: str = "handle_mouse_drag_start" - window: Union[Unset, Point2d] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Start dragging mouse.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - type = self.type - if not isinstance(self.window, Unset): - window = self.window + type: str = "handle_mouse_drag_start" + window: Union[Unset, Point2d] = UNSET - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type - if window is not UNSET: - field_dict['window'] = window + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + type = self.type + if not isinstance(self.window, Unset): + window = self.window - @classmethod - def from_dict(cls: Type[TX], src_dict: Dict[str, Any]) -> TX: - d = src_dict.copy() - type = d.pop("type", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + if window is not UNSET: + field_dict["window"] = window - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] + return field_dict + @classmethod + def from_dict(cls: Type[SK], src_dict: Dict[str, Any]) -> SK: + d = src_dict.copy() + type = d.pop("type", UNSET) - handle_mouse_drag_start = cls( - type= type, - window= window, - ) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - handle_mouse_drag_start.additional_properties = d - return handle_mouse_drag_start + handle_mouse_drag_start = cls( + type=type, + window=window, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + handle_mouse_drag_start.additional_properties = d + return handle_mouse_drag_start - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +UK = TypeVar("UK", bound="handle_mouse_drag_move") -JA = TypeVar("JA", bound="handle_mouse_drag_move") @attr.s(auto_attribs=True) class handle_mouse_drag_move: - """ Continue dragging mouse. """ # noqa: E501 - sequence: Union[Unset, int] = UNSET - type: str = "handle_mouse_drag_move" - window: Union[Unset, Point2d] = UNSET + """Continue dragging mouse.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + sequence: Union[Unset, int] = UNSET + type: str = "handle_mouse_drag_move" + window: Union[Unset, Point2d] = UNSET - def to_dict(self) -> Dict[str, Any]: - sequence = self.sequence - type = self.type - if not isinstance(self.window, Unset): - window = self.window + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if sequence is not UNSET: - field_dict['sequence'] = sequence - field_dict['type'] = type - if window is not UNSET: - field_dict['window'] = window + def to_dict(self) -> Dict[str, Any]: + sequence = self.sequence + type = self.type + if not isinstance(self.window, Unset): + window = self.window - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if sequence is not UNSET: + field_dict["sequence"] = sequence + field_dict["type"] = type + if window is not UNSET: + field_dict["window"] = window - @classmethod - def from_dict(cls: Type[JA], src_dict: Dict[str, Any]) -> JA: - d = src_dict.copy() - sequence = d.pop("sequence", UNSET) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[UK], src_dict: Dict[str, Any]) -> UK: + d = src_dict.copy() + sequence = d.pop("sequence", UNSET) - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] + type = d.pop("type", UNSET) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - handle_mouse_drag_move = cls( - sequence= sequence, - type= type, - window= window, - ) + handle_mouse_drag_move = cls( + sequence=sequence, + type=type, + window=window, + ) - handle_mouse_drag_move.additional_properties = d - return handle_mouse_drag_move + handle_mouse_drag_move.additional_properties = d + return handle_mouse_drag_move - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +CX = TypeVar("CX", bound="handle_mouse_drag_end") -SK = TypeVar("SK", bound="handle_mouse_drag_end") - @attr.s(auto_attribs=True) class handle_mouse_drag_end: - """ Stop dragging mouse. """ # noqa: E501 - type: str = "handle_mouse_drag_end" - window: Union[Unset, Point2d] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Stop dragging mouse.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - type = self.type - if not isinstance(self.window, Unset): - window = self.window + type: str = "handle_mouse_drag_end" + window: Union[Unset, Point2d] = UNSET - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type - if window is not UNSET: - field_dict['window'] = window + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + type = self.type + if not isinstance(self.window, Unset): + window = self.window - @classmethod - def from_dict(cls: Type[SK], src_dict: Dict[str, Any]) -> SK: - d = src_dict.copy() - type = d.pop("type", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + if window is not UNSET: + field_dict["window"] = window - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] + return field_dict + @classmethod + def from_dict(cls: Type[CX], src_dict: Dict[str, Any]) -> CX: + d = src_dict.copy() + type = d.pop("type", UNSET) - handle_mouse_drag_end = cls( - type= type, - window= window, - ) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - handle_mouse_drag_end.additional_properties = d - return handle_mouse_drag_end + handle_mouse_drag_end = cls( + type=type, + window=window, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + handle_mouse_drag_end.additional_properties = d + return handle_mouse_drag_end - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +MT = TypeVar("MT", bound="remove_scene_objects") -UK = TypeVar("UK", bound="remove_scene_objects") @attr.s(auto_attribs=True) class remove_scene_objects: - """ Remove scene objects. """ # noqa: E501 - object_ids: Union[Unset, List[str]] = UNSET - type: str = "remove_scene_objects" + """Remove scene objects.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + object_ids: Union[Unset, List[str]] = UNSET + type: str = "remove_scene_objects" - def to_dict(self) -> Dict[str, Any]: - object_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.object_ids, Unset): - object_ids = self.object_ids - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if object_ids is not UNSET: - field_dict['object_ids'] = object_ids - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + object_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.object_ids, Unset): + object_ids = self.object_ids + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if object_ids is not UNSET: + field_dict["object_ids"] = object_ids + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[UK], src_dict: Dict[str, Any]) -> UK: - d = src_dict.copy() - object_ids = cast(List[str], d.pop("object_ids", UNSET)) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[MT], src_dict: Dict[str, Any]) -> MT: + d = src_dict.copy() + object_ids = cast(List[str], d.pop("object_ids", UNSET)) + type = d.pop("type", UNSET) - remove_scene_objects = cls( - object_ids= object_ids, - type= type, - ) + remove_scene_objects = cls( + object_ids=object_ids, + type=type, + ) - remove_scene_objects.additional_properties = d - return remove_scene_objects + remove_scene_objects.additional_properties = d + return remove_scene_objects - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +LJ = TypeVar("LJ", bound="plane_intersect_and_project") -CX = TypeVar("CX", bound="plane_intersect_and_project") - @attr.s(auto_attribs=True) class plane_intersect_and_project: - """ Utility method. Performs both a ray cast and projection to plane-local coordinates. Returns the plane coordinates for the given window coordinates. """ # noqa: E501 - plane_id: Union[Unset, str] = UNSET - type: str = "plane_intersect_and_project" - window: Union[Unset, Point2d] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Utility method. Performs both a ray cast and projection to plane-local coordinates. Returns the plane coordinates for the given window coordinates.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - plane_id = self.plane_id - type = self.type - if not isinstance(self.window, Unset): - window = self.window + plane_id: Union[Unset, str] = UNSET + type: str = "plane_intersect_and_project" + window: Union[Unset, Point2d] = UNSET - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if plane_id is not UNSET: - field_dict['plane_id'] = plane_id - field_dict['type'] = type - if window is not UNSET: - field_dict['window'] = window + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + plane_id = self.plane_id + type = self.type + if not isinstance(self.window, Unset): + window = self.window - @classmethod - def from_dict(cls: Type[CX], src_dict: Dict[str, Any]) -> CX: - d = src_dict.copy() - plane_id = d.pop("plane_id", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plane_id is not UNSET: + field_dict["plane_id"] = plane_id + field_dict["type"] = type + if window is not UNSET: + field_dict["window"] = window - type = d.pop("type", UNSET) + return field_dict - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[LJ], src_dict: Dict[str, Any]) -> LJ: + d = src_dict.copy() + plane_id = d.pop("plane_id", UNSET) + type = d.pop("type", UNSET) - plane_intersect_and_project = cls( - plane_id= plane_id, - type= type, - window= window, - ) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - plane_intersect_and_project.additional_properties = d - return plane_intersect_and_project + plane_intersect_and_project = cls( + plane_id=plane_id, + type=type, + window=window, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + plane_intersect_and_project.additional_properties = d + return plane_intersect_and_project - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +TF = TypeVar("TF", bound="curve_get_end_points") -MT = TypeVar("MT", bound="curve_get_end_points") @attr.s(auto_attribs=True) class curve_get_end_points: - """ Find the start and end of a curve. """ # noqa: E501 - curve_id: Union[Unset, str] = UNSET - type: str = "curve_get_end_points" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Find the start and end of a curve.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - curve_id = self.curve_id - type = self.type + curve_id: Union[Unset, str] = UNSET + type: str = "curve_get_end_points" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if curve_id is not UNSET: - field_dict['curve_id'] = curve_id - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + curve_id = self.curve_id + type = self.type - @classmethod - def from_dict(cls: Type[MT], src_dict: Dict[str, Any]) -> MT: - d = src_dict.copy() - curve_id = d.pop("curve_id", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if curve_id is not UNSET: + field_dict["curve_id"] = curve_id + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[TF], src_dict: Dict[str, Any]) -> TF: + d = src_dict.copy() + curve_id = d.pop("curve_id", UNSET) - curve_get_end_points = cls( - curve_id= curve_id, - type= type, - ) + type = d.pop("type", UNSET) - curve_get_end_points.additional_properties = d - return curve_get_end_points + curve_get_end_points = cls( + curve_id=curve_id, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + curve_get_end_points.additional_properties = d + return curve_get_end_points - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +HF = TypeVar("HF", bound="reconfigure_stream") -LJ = TypeVar("LJ", bound="reconfigure_stream") @attr.s(auto_attribs=True) class reconfigure_stream: - """ Reconfigure the stream. """ # noqa: E501 - fps: Union[Unset, int] = UNSET - height: Union[Unset, int] = UNSET - type: str = "reconfigure_stream" - width: Union[Unset, int] = UNSET + """Reconfigure the stream.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + fps: Union[Unset, int] = UNSET + height: Union[Unset, int] = UNSET + type: str = "reconfigure_stream" + width: Union[Unset, int] = UNSET - def to_dict(self) -> Dict[str, Any]: - fps = self.fps - height = self.height - type = self.type - width = self.width + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if fps is not UNSET: - field_dict['fps'] = fps - if height is not UNSET: - field_dict['height'] = height - field_dict['type'] = type - if width is not UNSET: - field_dict['width'] = width + def to_dict(self) -> Dict[str, Any]: + fps = self.fps + height = self.height + type = self.type + width = self.width - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if fps is not UNSET: + field_dict["fps"] = fps + if height is not UNSET: + field_dict["height"] = height + field_dict["type"] = type + if width is not UNSET: + field_dict["width"] = width - @classmethod - def from_dict(cls: Type[LJ], src_dict: Dict[str, Any]) -> LJ: - d = src_dict.copy() - fps = d.pop("fps", UNSET) + return field_dict - height = d.pop("height", UNSET) + @classmethod + def from_dict(cls: Type[HF], src_dict: Dict[str, Any]) -> HF: + d = src_dict.copy() + fps = d.pop("fps", UNSET) - type = d.pop("type", UNSET) + height = d.pop("height", UNSET) - width = d.pop("width", UNSET) + type = d.pop("type", UNSET) + width = d.pop("width", UNSET) - reconfigure_stream = cls( - fps= fps, - height= height, - type= type, - width= width, - ) + reconfigure_stream = cls( + fps=fps, + height=height, + type=type, + width=width, + ) - reconfigure_stream.additional_properties = d - return reconfigure_stream + reconfigure_stream.additional_properties = d + return reconfigure_stream - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +JD = TypeVar("JD", bound="import_files") -TF = TypeVar("TF", bound="import_files") - @attr.s(auto_attribs=True) class import_files: - """ Import files to the current model. """ # noqa: E501 - from ..models.import_file import ImportFile - files: Union[Unset, List[ImportFile]] = UNSET - type: str = "import_files" + """Import files to the current model.""" # noqa: E501 + + from ..models.import_file import ImportFile - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + files: Union[Unset, List[ImportFile]] = UNSET + format: Union[Unset, InputFormat] = UNSET + type: str = "import_files" - def to_dict(self) -> Dict[str, Any]: - from ..models.import_file import ImportFile - files: Union[Unset, List[ImportFile]] = UNSET - if not isinstance(self.files, Unset): - files = self.files - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if files is not UNSET: - field_dict['files'] = files - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + from ..models.import_file import ImportFile - return field_dict + files: Union[Unset, List[ImportFile]] = UNSET + if not isinstance(self.files, Unset): + files = self.files + if not isinstance(self.format, Unset): + format = self.format + type = self.type - @classmethod - def from_dict(cls: Type[TF], src_dict: Dict[str, Any]) -> TF: - d = src_dict.copy() - from ..models.import_file import ImportFile - files = cast(List[ImportFile], d.pop("files", UNSET)) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if files is not UNSET: + field_dict["files"] = files + if format is not UNSET: + field_dict["format"] = format + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[JD], src_dict: Dict[str, Any]) -> JD: + d = src_dict.copy() + from ..models.import_file import ImportFile - import_files = cls( - files= files, - type= type, - ) + files = cast(List[ImportFile], d.pop("files", UNSET)) - import_files.additional_properties = d - return import_files + _format = d.pop("format", UNSET) + format: Union[Unset, InputFormat] + if isinstance(_format, Unset): + format = UNSET + else: + format = _format # type: ignore[arg-type] - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + type = d.pop("type", UNSET) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + import_files = cls( + files=files, + format=format, + type=type, + ) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + import_files.additional_properties = d + return import_files - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +RZ = TypeVar("RZ", bound="mass") -HF = TypeVar("HF", bound="mass") @attr.s(auto_attribs=True) class mass: - """ Get the mass of entities in the scene or the default scene. """ # noqa: E501 - entity_ids: Union[Unset, List[str]] = UNSET - material_density: Union[Unset, float] = UNSET - material_density_unit: Union[Unset, UnitDensity] = UNSET - output_unit: Union[Unset, UnitMass] = UNSET - source_unit: Union[Unset, UnitLength] = UNSET - type: str = "mass" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids - material_density = self.material_density - if not isinstance(self.material_density_unit, Unset): - material_density_unit = self.material_density_unit - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.source_unit, Unset): - source_unit = self.source_unit - type = self.type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict['entity_ids'] = entity_ids - if material_density is not UNSET: - field_dict['material_density'] = material_density - if material_density_unit is not UNSET: - field_dict['material_density_unit'] = material_density_unit - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if source_unit is not UNSET: - field_dict['source_unit'] = source_unit - field_dict['type'] = type - - return field_dict - - @classmethod - def from_dict(cls: Type[HF], src_dict: Dict[str, Any]) -> HF: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - - material_density = d.pop("material_density", UNSET) - - _material_density_unit = d.pop("material_density_unit", UNSET) - material_density_unit: Union[Unset, UnitDensity] - if isinstance(_material_density_unit, Unset): - material_density_unit = UNSET - else: - material_density_unit = _material_density_unit # type: ignore[arg-type] - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitMass] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _source_unit = d.pop("source_unit", UNSET) - source_unit: Union[Unset, UnitLength] - if isinstance(_source_unit, Unset): - source_unit = UNSET - else: - source_unit = _source_unit # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - - mass = cls( - entity_ids= entity_ids, - material_density= material_density, - material_density_unit= material_density_unit, - output_unit= output_unit, - source_unit= source_unit, - type= type, - ) - - mass.additional_properties = d - return mass - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - - - -JD = TypeVar("JD", bound="density") + """Get the mass of entities in the scene or the default scene.""" # noqa: E501 + + entity_ids: Union[Unset, List[str]] = UNSET + material_density: Union[Unset, float] = UNSET + material_density_unit: Union[Unset, UnitDensity] = UNSET + output_unit: Union[Unset, UnitMass] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "mass" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids + material_density = self.material_density + if not isinstance(self.material_density_unit, Unset): + material_density_unit = self.material_density_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict["entity_ids"] = entity_ids + if material_density is not UNSET: + field_dict["material_density"] = material_density + if material_density_unit is not UNSET: + field_dict["material_density_unit"] = material_density_unit + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if source_unit is not UNSET: + field_dict["source_unit"] = source_unit + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[RZ], src_dict: Dict[str, Any]) -> RZ: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + + material_density = d.pop("material_density", UNSET) + + _material_density_unit = d.pop("material_density_unit", UNSET) + material_density_unit: Union[Unset, UnitDensity] + if isinstance(_material_density_unit, Unset): + material_density_unit = UNSET + else: + material_density_unit = _material_density_unit # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitMass] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + mass = cls( + entity_ids=entity_ids, + material_density=material_density, + material_density_unit=material_density_unit, + output_unit=output_unit, + source_unit=source_unit, + type=type, + ) + + mass.additional_properties = d + return mass + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +BH = TypeVar("BH", bound="density") + @attr.s(auto_attribs=True) class density: - """ Get the density of entities in the scene or the default scene. """ # noqa: E501 - entity_ids: Union[Unset, List[str]] = UNSET - material_mass: Union[Unset, float] = UNSET - material_mass_unit: Union[Unset, UnitMass] = UNSET - output_unit: Union[Unset, UnitDensity] = UNSET - source_unit: Union[Unset, UnitLength] = UNSET - type: str = "density" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids - material_mass = self.material_mass - if not isinstance(self.material_mass_unit, Unset): - material_mass_unit = self.material_mass_unit - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.source_unit, Unset): - source_unit = self.source_unit - type = self.type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict['entity_ids'] = entity_ids - if material_mass is not UNSET: - field_dict['material_mass'] = material_mass - if material_mass_unit is not UNSET: - field_dict['material_mass_unit'] = material_mass_unit - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if source_unit is not UNSET: - field_dict['source_unit'] = source_unit - field_dict['type'] = type - - return field_dict - - @classmethod - def from_dict(cls: Type[JD], src_dict: Dict[str, Any]) -> JD: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - - material_mass = d.pop("material_mass", UNSET) - - _material_mass_unit = d.pop("material_mass_unit", UNSET) - material_mass_unit: Union[Unset, UnitMass] - if isinstance(_material_mass_unit, Unset): - material_mass_unit = UNSET - else: - material_mass_unit = _material_mass_unit # type: ignore[arg-type] - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitDensity] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _source_unit = d.pop("source_unit", UNSET) - source_unit: Union[Unset, UnitLength] - if isinstance(_source_unit, Unset): - source_unit = UNSET - else: - source_unit = _source_unit # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - - density = cls( - entity_ids= entity_ids, - material_mass= material_mass, - material_mass_unit= material_mass_unit, - output_unit= output_unit, - source_unit= source_unit, - type= type, - ) - - density.additional_properties = d - return density - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - - - -RZ = TypeVar("RZ", bound="volume") + """Get the density of entities in the scene or the default scene.""" # noqa: E501 + + entity_ids: Union[Unset, List[str]] = UNSET + material_mass: Union[Unset, float] = UNSET + material_mass_unit: Union[Unset, UnitMass] = UNSET + output_unit: Union[Unset, UnitDensity] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "density" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids + material_mass = self.material_mass + if not isinstance(self.material_mass_unit, Unset): + material_mass_unit = self.material_mass_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict["entity_ids"] = entity_ids + if material_mass is not UNSET: + field_dict["material_mass"] = material_mass + if material_mass_unit is not UNSET: + field_dict["material_mass_unit"] = material_mass_unit + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if source_unit is not UNSET: + field_dict["source_unit"] = source_unit + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[BH], src_dict: Dict[str, Any]) -> BH: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + + material_mass = d.pop("material_mass", UNSET) + + _material_mass_unit = d.pop("material_mass_unit", UNSET) + material_mass_unit: Union[Unset, UnitMass] + if isinstance(_material_mass_unit, Unset): + material_mass_unit = UNSET + else: + material_mass_unit = _material_mass_unit # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitDensity] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + density = cls( + entity_ids=entity_ids, + material_mass=material_mass, + material_mass_unit=material_mass_unit, + output_unit=output_unit, + source_unit=source_unit, + type=type, + ) + + density.additional_properties = d + return density + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +SX = TypeVar("SX", bound="volume") + @attr.s(auto_attribs=True) class volume: - """ Get the volume of entities in the scene or the default scene. """ # noqa: E501 - entity_ids: Union[Unset, List[str]] = UNSET - output_unit: Union[Unset, UnitVolume] = UNSET - source_unit: Union[Unset, UnitLength] = UNSET - type: str = "volume" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Get the volume of entities in the scene or the default scene.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.source_unit, Unset): - source_unit = self.source_unit - type = self.type + entity_ids: Union[Unset, List[str]] = UNSET + output_unit: Union[Unset, UnitVolume] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "volume" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict['entity_ids'] = entity_ids - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if source_unit is not UNSET: - field_dict['source_unit'] = source_unit - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + type = self.type - @classmethod - def from_dict(cls: Type[RZ], src_dict: Dict[str, Any]) -> RZ: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict["entity_ids"] = entity_ids + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if source_unit is not UNSET: + field_dict["source_unit"] = source_unit + field_dict["type"] = type - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitVolume] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + return field_dict - _source_unit = d.pop("source_unit", UNSET) - source_unit: Union[Unset, UnitLength] - if isinstance(_source_unit, Unset): - source_unit = UNSET - else: - source_unit = _source_unit # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - type = d.pop("type", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitVolume] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] - volume = cls( - entity_ids= entity_ids, - output_unit= output_unit, - source_unit= source_unit, - type= type, - ) + type = d.pop("type", UNSET) - volume.additional_properties = d - return volume + volume = cls( + entity_ids=entity_ids, + output_unit=output_unit, + source_unit=source_unit, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + volume.additional_properties = d + return volume - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +CN = TypeVar("CN", bound="center_of_mass") -BH = TypeVar("BH", bound="center_of_mass") @attr.s(auto_attribs=True) class center_of_mass: - """ Get the center of mass of entities in the scene or the default scene. """ # noqa: E501 - entity_ids: Union[Unset, List[str]] = UNSET - output_unit: Union[Unset, UnitLength] = UNSET - source_unit: Union[Unset, UnitLength] = UNSET - type: str = "center_of_mass" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Get the center of mass of entities in the scene or the default scene.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.source_unit, Unset): - source_unit = self.source_unit - type = self.type + entity_ids: Union[Unset, List[str]] = UNSET + output_unit: Union[Unset, UnitLength] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "center_of_mass" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict['entity_ids'] = entity_ids - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if source_unit is not UNSET: - field_dict['source_unit'] = source_unit - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + type = self.type - @classmethod - def from_dict(cls: Type[BH], src_dict: Dict[str, Any]) -> BH: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict["entity_ids"] = entity_ids + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if source_unit is not UNSET: + field_dict["source_unit"] = source_unit + field_dict["type"] = type - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitLength] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + return field_dict - _source_unit = d.pop("source_unit", UNSET) - source_unit: Union[Unset, UnitLength] - if isinstance(_source_unit, Unset): - source_unit = UNSET - else: - source_unit = _source_unit # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - type = d.pop("type", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitLength] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] - center_of_mass = cls( - entity_ids= entity_ids, - output_unit= output_unit, - source_unit= source_unit, - type= type, - ) + type = d.pop("type", UNSET) - center_of_mass.additional_properties = d - return center_of_mass + center_of_mass = cls( + entity_ids=entity_ids, + output_unit=output_unit, + source_unit=source_unit, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + center_of_mass.additional_properties = d + return center_of_mass - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +GS = TypeVar("GS", bound="surface_area") -SX = TypeVar("SX", bound="surface_area") @attr.s(auto_attribs=True) class surface_area: - """ Get the surface area of entities in the scene or the default scene. """ # noqa: E501 - entity_ids: Union[Unset, List[str]] = UNSET - output_unit: Union[Unset, UnitArea] = UNSET - source_unit: Union[Unset, UnitLength] = UNSET - type: str = "surface_area" + """Get the surface area of entities in the scene or the default scene.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + entity_ids: Union[Unset, List[str]] = UNSET + output_unit: Union[Unset, UnitArea] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "surface_area" - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.source_unit, Unset): - source_unit = self.source_unit - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict['entity_ids'] = entity_ids - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if source_unit is not UNSET: - field_dict['source_unit'] = source_unit - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict["entity_ids"] = entity_ids + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if source_unit is not UNSET: + field_dict["source_unit"] = source_unit + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + return field_dict - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitArea] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - _source_unit = d.pop("source_unit", UNSET) - source_unit: Union[Unset, UnitLength] - if isinstance(_source_unit, Unset): - source_unit = UNSET - else: - source_unit = _source_unit # type: ignore[arg-type] + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitArea] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - type = d.pop("type", UNSET) + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] + type = d.pop("type", UNSET) - surface_area = cls( - entity_ids= entity_ids, - output_unit= output_unit, - source_unit= source_unit, - type= type, - ) + surface_area = cls( + entity_ids=entity_ids, + output_unit=output_unit, + source_unit=source_unit, + type=type, + ) - surface_area.additional_properties = d - return surface_area + surface_area.additional_properties = d + return surface_area - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +SO = TypeVar("SO", bound="get_sketch_mode_plane") -CN = TypeVar("CN", bound="get_sketch_mode_plane") - @attr.s(auto_attribs=True) class get_sketch_mode_plane: - """ Get the plane of the sketch mode. This is useful for getting the normal of the plane after a user selects a plane. """ # noqa: E501 - type: str = "get_sketch_mode_plane" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - type = self.type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type - - return field_dict - - @classmethod - def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN: - d = src_dict.copy() - type = d.pop("type", UNSET) - - - get_sketch_mode_plane = cls( - type= type, - ) - - get_sketch_mode_plane.additional_properties = d - return get_sketch_mode_plane - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - -ModelingCmd = Union[start_path, move_path_pen, extend_path, extrude, close_path, camera_drag_start, camera_drag_move, camera_drag_end, default_camera_look_at, default_camera_zoom, default_camera_enable_sketch_mode, default_camera_disable_sketch_mode, export, entity_get_parent_id, entity_get_num_children, entity_get_child_uuid, entity_get_all_child_uuids, edit_mode_enter, edit_mode_exit, select_with_point, select_clear, select_add, select_remove, select_replace, select_get, highlight_set_entity, highlight_set_entities, new_annotation, update_annotation, object_visible, object_bring_to_front, get_entity_type, solid2d_add_hole, solid3d_get_all_edge_faces, solid3d_get_all_opposite_edges, solid3d_get_opposite_edge, solid3d_get_next_adjacent_edge, solid3d_get_prev_adjacent_edge, send_object, entity_set_opacity, entity_fade, make_plane, plane_set_color, set_tool, mouse_move, mouse_click, sketch_mode_enable, sketch_mode_disable, curve_get_type, curve_get_control_points, take_snapshot, make_axes_gizmo, path_get_info, path_get_curve_uuids_for_vertices, path_get_vertex_uuids, handle_mouse_drag_start, handle_mouse_drag_move, handle_mouse_drag_end, remove_scene_objects, plane_intersect_and_project, curve_get_end_points, reconfigure_stream, import_files, mass, density, volume, center_of_mass, surface_area, get_sketch_mode_plane] + """Get the plane of the sketch mode. This is useful for getting the normal of the plane after a user selects a plane.""" # noqa: E501 + + type: str = "get_sketch_mode_plane" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO: + d = src_dict.copy() + type = d.pop("type", UNSET) + + get_sketch_mode_plane = cls( + type=type, + ) + + get_sketch_mode_plane.additional_properties = d + return get_sketch_mode_plane + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +ModelingCmd = Union[ + start_path, + move_path_pen, + extend_path, + extrude, + close_path, + camera_drag_start, + camera_drag_move, + camera_drag_end, + default_camera_look_at, + default_camera_zoom, + default_camera_enable_sketch_mode, + default_camera_disable_sketch_mode, + export, + entity_get_parent_id, + entity_get_num_children, + entity_get_child_uuid, + entity_get_all_child_uuids, + edit_mode_enter, + edit_mode_exit, + select_with_point, + select_clear, + select_add, + select_remove, + select_replace, + select_get, + highlight_set_entity, + highlight_set_entities, + new_annotation, + update_annotation, + object_visible, + object_bring_to_front, + get_entity_type, + solid2d_add_hole, + solid3d_get_all_edge_faces, + solid3d_get_all_opposite_edges, + solid3d_get_opposite_edge, + solid3d_get_next_adjacent_edge, + solid3d_get_prev_adjacent_edge, + send_object, + entity_set_opacity, + entity_fade, + make_plane, + plane_set_color, + set_tool, + mouse_move, + mouse_click, + sketch_mode_enable, + sketch_mode_disable, + curve_get_type, + curve_get_control_points, + take_snapshot, + make_axes_gizmo, + path_get_info, + path_get_curve_uuids_for_vertices, + path_get_vertex_uuids, + handle_mouse_drag_start, + handle_mouse_drag_move, + handle_mouse_drag_end, + remove_scene_objects, + plane_intersect_and_project, + curve_get_end_points, + reconfigure_stream, + import_files, + mass, + density, + volume, + center_of_mass, + surface_area, + get_sketch_mode_plane, +] diff --git a/kittycad/models/modeling_cmd_id.py b/kittycad/models/modeling_cmd_id.py index cbe28ffc8..a2fce8cff 100644 --- a/kittycad/models/modeling_cmd_id.py +++ b/kittycad/models/modeling_cmd_id.py @@ -1,4 +1,3 @@ class ModelingCmdId(str): - - def __str__(self) -> str: - return self + def __str__(self) -> str: + return self diff --git a/kittycad/models/modeling_cmd_req.py b/kittycad/models/modeling_cmd_req.py index beefb5c95..8c6fce2ca 100644 --- a/kittycad/models/modeling_cmd_req.py +++ b/kittycad/models/modeling_cmd_req.py @@ -6,70 +6,71 @@ from ..models.modeling_cmd_id import ModelingCmdId from ..types import UNSET, Unset -GS = TypeVar("GS", bound="ModelingCmdReq") +ZS = TypeVar("ZS", bound="ModelingCmdReq") + @attr.s(auto_attribs=True) class ModelingCmdReq: - """ A graphics command submitted to the KittyCAD engine via the Modeling API. """ # noqa: E501 - cmd: Union[Unset, ModelingCmd] = UNSET - cmd_id: Union[Unset, ModelingCmdId] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.cmd, Unset): - cmd = self.cmd - if not isinstance(self.cmd_id, Unset): - cmd_id = self.cmd_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if cmd is not UNSET: - field_dict['cmd'] = cmd - if cmd_id is not UNSET: - field_dict['cmd_id'] = cmd_id - - return field_dict - - @classmethod - def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS: - d = src_dict.copy() - _cmd = d.pop("cmd", UNSET) - cmd: Union[Unset, ModelingCmd] - if isinstance(_cmd, Unset): - cmd = UNSET - else: - cmd = _cmd # type: ignore[arg-type] - - _cmd_id = d.pop("cmd_id", UNSET) - cmd_id: Union[Unset, ModelingCmdId] - if isinstance(_cmd_id, Unset): - cmd_id = UNSET - else: - cmd_id = _cmd_id # type: ignore[arg-type] - - - modeling_cmd_req = cls( - cmd= cmd, - cmd_id= cmd_id, - ) - - modeling_cmd_req.additional_properties = d - return modeling_cmd_req - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """A graphics command submitted to the KittyCAD engine via the Modeling API.""" # noqa: E501 + + cmd: Union[Unset, ModelingCmd] = UNSET + cmd_id: Union[Unset, ModelingCmdId] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.cmd, Unset): + cmd = self.cmd + if not isinstance(self.cmd_id, Unset): + cmd_id = self.cmd_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cmd is not UNSET: + field_dict["cmd"] = cmd + if cmd_id is not UNSET: + field_dict["cmd_id"] = cmd_id + + return field_dict + + @classmethod + def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS: + d = src_dict.copy() + _cmd = d.pop("cmd", UNSET) + cmd: Union[Unset, ModelingCmd] + if isinstance(_cmd, Unset): + cmd = UNSET + else: + cmd = _cmd # type: ignore[arg-type] + + _cmd_id = d.pop("cmd_id", UNSET) + cmd_id: Union[Unset, ModelingCmdId] + if isinstance(_cmd_id, Unset): + cmd_id = UNSET + else: + cmd_id = _cmd_id # type: ignore[arg-type] + + modeling_cmd_req = cls( + cmd=cmd, + cmd_id=cmd_id, + ) + + modeling_cmd_req.additional_properties = d + return modeling_cmd_req + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/mouse_click.py b/kittycad/models/mouse_click.py index bde732619..75730f7d1 100644 --- a/kittycad/models/mouse_click.py +++ b/kittycad/models/mouse_click.py @@ -4,62 +4,63 @@ from ..types import UNSET, Unset -SO = TypeVar("SO", bound="MouseClick") +AM = TypeVar("AM", bound="MouseClick") + @attr.s(auto_attribs=True) class MouseClick: - """ The response from the `MouseClick` command. """ # noqa: E501 - entities_modified: Union[Unset, List[str]] = UNSET - entities_selected: Union[Unset, List[str]] = UNSET + """The response from the `MouseClick` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + entities_modified: Union[Unset, List[str]] = UNSET + entities_selected: Union[Unset, List[str]] = UNSET - def to_dict(self) -> Dict[str, Any]: - entities_modified: Union[Unset, List[str]] = UNSET - if not isinstance(self.entities_modified, Unset): - entities_modified = self.entities_modified - entities_selected: Union[Unset, List[str]] = UNSET - if not isinstance(self.entities_selected, Unset): - entities_selected = self.entities_selected + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entities_modified is not UNSET: - field_dict['entities_modified'] = entities_modified - if entities_selected is not UNSET: - field_dict['entities_selected'] = entities_selected + def to_dict(self) -> Dict[str, Any]: + entities_modified: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities_modified, Unset): + entities_modified = self.entities_modified + entities_selected: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities_selected, Unset): + entities_selected = self.entities_selected - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entities_modified is not UNSET: + field_dict["entities_modified"] = entities_modified + if entities_selected is not UNSET: + field_dict["entities_selected"] = entities_selected - @classmethod - def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO: - d = src_dict.copy() - entities_modified = cast(List[str], d.pop("entities_modified", UNSET)) + return field_dict - entities_selected = cast(List[str], d.pop("entities_selected", UNSET)) + @classmethod + def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM: + d = src_dict.copy() + entities_modified = cast(List[str], d.pop("entities_modified", UNSET)) + entities_selected = cast(List[str], d.pop("entities_selected", UNSET)) - mouse_click = cls( - entities_modified= entities_modified, - entities_selected= entities_selected, - ) + mouse_click = cls( + entities_modified=entities_modified, + entities_selected=entities_selected, + ) - mouse_click.additional_properties = d - return mouse_click + mouse_click.additional_properties = d + return mouse_click - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/new_address.py b/kittycad/models/new_address.py index 933ee2894..a5b057e7e 100644 --- a/kittycad/models/new_address.py +++ b/kittycad/models/new_address.py @@ -3,101 +3,108 @@ import attr from ..models.country_code import CountryCode +from ..models.uuid import Uuid from ..types import UNSET, Unset -ZS = TypeVar("ZS", bound="NewAddress") +GK = TypeVar("GK", bound="NewAddress") + @attr.s(auto_attribs=True) class NewAddress: - """ The struct that is used to create a new record. This is automatically generated and has all the same fields as the main struct only it is missing the `id`. """ # noqa: E501 - city: Union[Unset, str] = UNSET - country: Union[Unset, CountryCode] = UNSET - state: Union[Unset, str] = UNSET - street1: Union[Unset, str] = UNSET - street2: Union[Unset, str] = UNSET - user_id: Union[Unset, str] = UNSET - zip: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - city = self.city - if not isinstance(self.country, Unset): - country = self.country - state = self.state - street1 = self.street1 - street2 = self.street2 - user_id = self.user_id - zip = self.zip - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if city is not UNSET: - field_dict['city'] = city - if country is not UNSET: - field_dict['country'] = country - if state is not UNSET: - field_dict['state'] = state - if street1 is not UNSET: - field_dict['street1'] = street1 - if street2 is not UNSET: - field_dict['street2'] = street2 - if user_id is not UNSET: - field_dict['user_id'] = user_id - if zip is not UNSET: - field_dict['zip'] = zip - - return field_dict - - @classmethod - def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS: - d = src_dict.copy() - city = d.pop("city", UNSET) - - _country = d.pop("country", UNSET) - country: Union[Unset, CountryCode] - if isinstance(_country, Unset): - country = UNSET - else: - country = _country # type: ignore[arg-type] - - state = d.pop("state", UNSET) - - street1 = d.pop("street1", UNSET) - - street2 = d.pop("street2", UNSET) - - user_id = d.pop("user_id", UNSET) - - zip = d.pop("zip", UNSET) - - - new_address = cls( - city= city, - country= country, - state= state, - street1= street1, - street2= street2, - user_id= user_id, - zip= zip, - ) - - new_address.additional_properties = d - return new_address - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """The struct that is used to create a new record. This is automatically generated and has all the same fields as the main struct only it is missing the `id`.""" # noqa: E501 + + city: Union[Unset, str] = UNSET + country: Union[Unset, CountryCode] = UNSET + state: Union[Unset, str] = UNSET + street1: Union[Unset, str] = UNSET + street2: Union[Unset, str] = UNSET + user_id: Union[Unset, str] = UNSET + zip: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + city = self.city + if not isinstance(self.country, Unset): + country = self.country + state = self.state + street1 = self.street1 + street2 = self.street2 + user_id = self.user_id + zip = self.zip + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if city is not UNSET: + field_dict["city"] = city + if country is not UNSET: + field_dict["country"] = country + if state is not UNSET: + field_dict["state"] = state + if street1 is not UNSET: + field_dict["street1"] = street1 + if street2 is not UNSET: + field_dict["street2"] = street2 + if user_id is not UNSET: + field_dict["user_id"] = user_id + if zip is not UNSET: + field_dict["zip"] = zip + + return field_dict + + @classmethod + def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK: + d = src_dict.copy() + city = d.pop("city", UNSET) + + _country = d.pop("country", UNSET) + country: Union[Unset, CountryCode] + if isinstance(_country, Unset): + country = UNSET + else: + country = _country # type: ignore[arg-type] + + state = d.pop("state", UNSET) + + street1 = d.pop("street1", UNSET) + + street2 = d.pop("street2", UNSET) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + zip = d.pop("zip", UNSET) + + new_address = cls( + city=city, + country=country, + state=state, + street1=street1, + street2=street2, + user_id=user_id, + zip=zip, + ) + + new_address.additional_properties = d + return new_address + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/o_auth2_client_info.py b/kittycad/models/o_auth2_client_info.py index a054610c9..4f5708e2b 100644 --- a/kittycad/models/o_auth2_client_info.py +++ b/kittycad/models/o_auth2_client_info.py @@ -4,65 +4,66 @@ from ..types import UNSET, Unset -AM = TypeVar("AM", bound="OAuth2ClientInfo") +SG = TypeVar("SG", bound="OAuth2ClientInfo") + @attr.s(auto_attribs=True) class OAuth2ClientInfo: - """ Information about an OAuth 2.0 client. """ # noqa: E501 - csrf_token: Union[Unset, str] = UNSET - pkce_code_verifier: Union[Unset, str] = UNSET - url: Union[Unset, str] = UNSET + """Information about an OAuth 2.0 client.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + csrf_token: Union[Unset, str] = UNSET + pkce_code_verifier: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - csrf_token = self.csrf_token - pkce_code_verifier = self.pkce_code_verifier - url = self.url + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if csrf_token is not UNSET: - field_dict['csrf_token'] = csrf_token - if pkce_code_verifier is not UNSET: - field_dict['pkce_code_verifier'] = pkce_code_verifier - if url is not UNSET: - field_dict['url'] = url + def to_dict(self) -> Dict[str, Any]: + csrf_token = self.csrf_token + pkce_code_verifier = self.pkce_code_verifier + url = self.url - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if csrf_token is not UNSET: + field_dict["csrf_token"] = csrf_token + if pkce_code_verifier is not UNSET: + field_dict["pkce_code_verifier"] = pkce_code_verifier + if url is not UNSET: + field_dict["url"] = url - @classmethod - def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM: - d = src_dict.copy() - csrf_token = d.pop("csrf_token", UNSET) + return field_dict - pkce_code_verifier = d.pop("pkce_code_verifier", UNSET) + @classmethod + def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG: + d = src_dict.copy() + csrf_token = d.pop("csrf_token", UNSET) - url = d.pop("url", UNSET) + pkce_code_verifier = d.pop("pkce_code_verifier", UNSET) + url = d.pop("url", UNSET) - o_auth2_client_info = cls( - csrf_token= csrf_token, - pkce_code_verifier= pkce_code_verifier, - url= url, - ) + o_auth2_client_info = cls( + csrf_token=csrf_token, + pkce_code_verifier=pkce_code_verifier, + url=url, + ) - o_auth2_client_info.additional_properties = d - return o_auth2_client_info + o_auth2_client_info.additional_properties = d + return o_auth2_client_info - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/o_auth2_grant_type.py b/kittycad/models/o_auth2_grant_type.py index cf98a177f..1ddeb3381 100644 --- a/kittycad/models/o_auth2_grant_type.py +++ b/kittycad/models/o_auth2_grant_type.py @@ -2,9 +2,12 @@ class OAuth2GrantType(str, Enum): - """ An OAuth 2.0 Grant Type. These are documented here: . """ # noqa: E501 - """# An OAuth 2.0 Device Authorization Grant. """ # noqa: E501 - URN_IETF_PARAMS_OAUTH_GRANT_TYPE_DEVICE_CODE = 'urn:ietf:params:oauth:grant-type:device_code' + """An OAuth 2.0 Grant Type. These are documented here: .""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# An OAuth 2.0 Device Authorization Grant. """ # noqa: E501 + URN_IETF_PARAMS_OAUTH_GRANT_TYPE_DEVICE_CODE = ( + "urn:ietf:params:oauth:grant-type:device_code" + ) + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/ok_modeling_cmd_response.py b/kittycad/models/ok_modeling_cmd_response.py index f742dceb7..b308f5914 100644 --- a/kittycad/models/ok_modeling_cmd_response.py +++ b/kittycad/models/ok_modeling_cmd_response.py @@ -34,1972 +34,1976 @@ from ..models.volume import Volume from ..types import UNSET, Unset -GK = TypeVar("GK", bound="empty") +QZ = TypeVar("QZ", bound="empty") + @attr.s(auto_attribs=True) class empty: - """ An empty response, used for any command that does not explicitly have a response defined here. """ # noqa: E501 - type: str = "empty" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """An empty response, used for any command that does not explicitly have a response defined here.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - type = self.type + type: str = "empty" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + type = self.type - @classmethod - def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK: - d = src_dict.copy() - type = d.pop("type", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + return field_dict - empty = cls( - type= type, - ) + @classmethod + def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ: + d = src_dict.copy() + type = d.pop("type", UNSET) - empty.additional_properties = d - return empty + empty = cls( + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + empty.additional_properties = d + return empty - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +SY = TypeVar("SY", bound="export") -SG = TypeVar("SG", bound="export") @attr.s(auto_attribs=True) class export: - """ The response from the `Export` command. When this is being performed over a websocket, this is sent as binary not JSON. The binary data can be deserialized as `bincode` into a `Vec`. """ # noqa: E501 - data: Union[Unset, Export] = UNSET - type: str = "export" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `Export` command. When this is being performed over a websocket, this is sent as binary not JSON. The binary data can be deserialized as `bincode` into a `Vec`.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, Export] = UNSET + type: str = "export" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Export] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Export] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - export = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - export.additional_properties = d - return export + export = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + export.additional_properties = d + return export - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +YK = TypeVar("YK", bound="select_with_point") -QZ = TypeVar("QZ", bound="select_with_point") @attr.s(auto_attribs=True) class select_with_point: - """ The response from the `SelectWithPoint` command. """ # noqa: E501 - data: Union[Unset, SelectWithPoint] = UNSET - type: str = "select_with_point" + """The response from the `SelectWithPoint` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + data: Union[Unset, SelectWithPoint] = UNSET + type: str = "select_with_point" - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, SelectWithPoint] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, SelectWithPoint] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - select_with_point = cls( - data= data, - type= type, - ) + select_with_point = cls( + data=data, + type=type, + ) - select_with_point.additional_properties = d - return select_with_point + select_with_point.additional_properties = d + return select_with_point - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +WS = TypeVar("WS", bound="highlight_set_entity") -SY = TypeVar("SY", bound="highlight_set_entity") - @attr.s(auto_attribs=True) class highlight_set_entity: - """ The response from the `HighlightSetEntity` command. """ # noqa: E501 - data: Union[Unset, HighlightSetEntity] = UNSET - type: str = "highlight_set_entity" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `HighlightSetEntity` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, HighlightSetEntity] = UNSET + type: str = "highlight_set_entity" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, HighlightSetEntity] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, HighlightSetEntity] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - highlight_set_entity = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - highlight_set_entity.additional_properties = d - return highlight_set_entity + highlight_set_entity = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + highlight_set_entity.additional_properties = d + return highlight_set_entity - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +SL = TypeVar("SL", bound="entity_get_child_uuid") -YK = TypeVar("YK", bound="entity_get_child_uuid") @attr.s(auto_attribs=True) class entity_get_child_uuid: - """ The response from the `EntityGetChildUuid` command. """ # noqa: E501 - data: Union[Unset, EntityGetChildUuid] = UNSET - type: str = "entity_get_child_uuid" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `EntityGetChildUuid` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, EntityGetChildUuid] = UNSET + type: str = "entity_get_child_uuid" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, EntityGetChildUuid] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[SL], src_dict: Dict[str, Any]) -> SL: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, EntityGetChildUuid] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - entity_get_child_uuid = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - entity_get_child_uuid.additional_properties = d - return entity_get_child_uuid + entity_get_child_uuid = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + entity_get_child_uuid.additional_properties = d + return entity_get_child_uuid - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +MK = TypeVar("MK", bound="entity_get_num_children") -WS = TypeVar("WS", bound="entity_get_num_children") @attr.s(auto_attribs=True) class entity_get_num_children: - """ The response from the `EntityGetNumChildren` command. """ # noqa: E501 - data: Union[Unset, EntityGetNumChildren] = UNSET - type: str = "entity_get_num_children" + """The response from the `EntityGetNumChildren` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + data: Union[Unset, EntityGetNumChildren] = UNSET + type: str = "entity_get_num_children" - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, EntityGetNumChildren] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[MK], src_dict: Dict[str, Any]) -> MK: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, EntityGetNumChildren] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - entity_get_num_children = cls( - data= data, - type= type, - ) + entity_get_num_children = cls( + data=data, + type=type, + ) - entity_get_num_children.additional_properties = d - return entity_get_num_children + entity_get_num_children.additional_properties = d + return entity_get_num_children - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +TU = TypeVar("TU", bound="entity_get_parent_id") -SL = TypeVar("SL", bound="entity_get_parent_id") - @attr.s(auto_attribs=True) class entity_get_parent_id: - """ The response from the `EntityGetParentId` command. """ # noqa: E501 - data: Union[Unset, EntityGetParentId] = UNSET - type: str = "entity_get_parent_id" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `EntityGetParentId` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, EntityGetParentId] = UNSET + type: str = "entity_get_parent_id" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[SL], src_dict: Dict[str, Any]) -> SL: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, EntityGetParentId] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[TU], src_dict: Dict[str, Any]) -> TU: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, EntityGetParentId] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - entity_get_parent_id = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - entity_get_parent_id.additional_properties = d - return entity_get_parent_id + entity_get_parent_id = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + entity_get_parent_id.additional_properties = d + return entity_get_parent_id - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +FY = TypeVar("FY", bound="entity_get_all_child_uuids") -MK = TypeVar("MK", bound="entity_get_all_child_uuids") @attr.s(auto_attribs=True) class entity_get_all_child_uuids: - """ The response from the `EntityGetAllChildUuids` command. """ # noqa: E501 - data: Union[Unset, EntityGetAllChildUuids] = UNSET - type: str = "entity_get_all_child_uuids" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `EntityGetAllChildUuids` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, EntityGetAllChildUuids] = UNSET + type: str = "entity_get_all_child_uuids" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[MK], src_dict: Dict[str, Any]) -> MK: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, EntityGetAllChildUuids] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[FY], src_dict: Dict[str, Any]) -> FY: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, EntityGetAllChildUuids] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - entity_get_all_child_uuids = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - entity_get_all_child_uuids.additional_properties = d - return entity_get_all_child_uuids + entity_get_all_child_uuids = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + entity_get_all_child_uuids.additional_properties = d + return entity_get_all_child_uuids - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +FD = TypeVar("FD", bound="select_get") -TU = TypeVar("TU", bound="select_get") @attr.s(auto_attribs=True) class select_get: - """ The response from the `SelectGet` command. """ # noqa: E501 - data: Union[Unset, SelectGet] = UNSET - type: str = "select_get" + """The response from the `SelectGet` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + data: Union[Unset, SelectGet] = UNSET + type: str = "select_get" - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[TU], src_dict: Dict[str, Any]) -> TU: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, SelectGet] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[FD], src_dict: Dict[str, Any]) -> FD: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, SelectGet] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - select_get = cls( - data= data, - type= type, - ) + select_get = cls( + data=data, + type=type, + ) - select_get.additional_properties = d - return select_get + select_get.additional_properties = d + return select_get - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +TZ = TypeVar("TZ", bound="get_entity_type") -FY = TypeVar("FY", bound="get_entity_type") - @attr.s(auto_attribs=True) class get_entity_type: - """ The response from the `GetEntityType` command. """ # noqa: E501 - data: Union[Unset, GetEntityType] = UNSET - type: str = "get_entity_type" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `GetEntityType` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, GetEntityType] = UNSET + type: str = "get_entity_type" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[FY], src_dict: Dict[str, Any]) -> FY: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, GetEntityType] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[TZ], src_dict: Dict[str, Any]) -> TZ: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, GetEntityType] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - get_entity_type = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - get_entity_type.additional_properties = d - return get_entity_type + get_entity_type = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + get_entity_type.additional_properties = d + return get_entity_type - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +AX = TypeVar("AX", bound="solid3d_get_all_edge_faces") -FD = TypeVar("FD", bound="solid3d_get_all_edge_faces") @attr.s(auto_attribs=True) class solid3d_get_all_edge_faces: - """ The response from the `Solid3dGetAllEdgeFaces` command. """ # noqa: E501 - data: Union[Unset, Solid3dGetAllEdgeFaces] = UNSET - type: str = "solid3d_get_all_edge_faces" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `Solid3dGetAllEdgeFaces` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, Solid3dGetAllEdgeFaces] = UNSET + type: str = "solid3d_get_all_edge_faces" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[FD], src_dict: Dict[str, Any]) -> FD: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Solid3dGetAllEdgeFaces] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[AX], src_dict: Dict[str, Any]) -> AX: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Solid3dGetAllEdgeFaces] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - solid3d_get_all_edge_faces = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - solid3d_get_all_edge_faces.additional_properties = d - return solid3d_get_all_edge_faces + solid3d_get_all_edge_faces = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + solid3d_get_all_edge_faces.additional_properties = d + return solid3d_get_all_edge_faces - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +RQ = TypeVar("RQ", bound="solid3d_get_all_opposite_edges") -TZ = TypeVar("TZ", bound="solid3d_get_all_opposite_edges") @attr.s(auto_attribs=True) class solid3d_get_all_opposite_edges: - """ The response from the `Solid3dGetAllOppositeEdges` command. """ # noqa: E501 - data: Union[Unset, Solid3dGetAllOppositeEdges] = UNSET - type: str = "solid3d_get_all_opposite_edges" + """The response from the `Solid3dGetAllOppositeEdges` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + data: Union[Unset, Solid3dGetAllOppositeEdges] = UNSET + type: str = "solid3d_get_all_opposite_edges" - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[TZ], src_dict: Dict[str, Any]) -> TZ: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Solid3dGetAllOppositeEdges] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[RQ], src_dict: Dict[str, Any]) -> RQ: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Solid3dGetAllOppositeEdges] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - solid3d_get_all_opposite_edges = cls( - data= data, - type= type, - ) + solid3d_get_all_opposite_edges = cls( + data=data, + type=type, + ) - solid3d_get_all_opposite_edges.additional_properties = d - return solid3d_get_all_opposite_edges + solid3d_get_all_opposite_edges.additional_properties = d + return solid3d_get_all_opposite_edges - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +ZL = TypeVar("ZL", bound="solid3d_get_opposite_edge") -AX = TypeVar("AX", bound="solid3d_get_opposite_edge") - @attr.s(auto_attribs=True) class solid3d_get_opposite_edge: - """ The response from the `Solid3dGetOppositeEdge` command. """ # noqa: E501 - data: Union[Unset, Solid3dGetOppositeEdge] = UNSET - type: str = "solid3d_get_opposite_edge" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `Solid3dGetOppositeEdge` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, Solid3dGetOppositeEdge] = UNSET + type: str = "solid3d_get_opposite_edge" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[AX], src_dict: Dict[str, Any]) -> AX: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Solid3dGetOppositeEdge] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[ZL], src_dict: Dict[str, Any]) -> ZL: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Solid3dGetOppositeEdge] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - solid3d_get_opposite_edge = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - solid3d_get_opposite_edge.additional_properties = d - return solid3d_get_opposite_edge + solid3d_get_opposite_edge = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + solid3d_get_opposite_edge.additional_properties = d + return solid3d_get_opposite_edge - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +CM = TypeVar("CM", bound="solid3d_get_prev_adjacent_edge") -RQ = TypeVar("RQ", bound="solid3d_get_prev_adjacent_edge") @attr.s(auto_attribs=True) class solid3d_get_prev_adjacent_edge: - """ The response from the `Solid3dGetPrevAdjacentEdge` command. """ # noqa: E501 - data: Union[Unset, Solid3dGetPrevAdjacentEdge] = UNSET - type: str = "solid3d_get_prev_adjacent_edge" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `Solid3dGetPrevAdjacentEdge` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, Solid3dGetPrevAdjacentEdge] = UNSET + type: str = "solid3d_get_prev_adjacent_edge" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[RQ], src_dict: Dict[str, Any]) -> RQ: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Solid3dGetPrevAdjacentEdge] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[CM], src_dict: Dict[str, Any]) -> CM: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Solid3dGetPrevAdjacentEdge] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - solid3d_get_prev_adjacent_edge = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - solid3d_get_prev_adjacent_edge.additional_properties = d - return solid3d_get_prev_adjacent_edge + solid3d_get_prev_adjacent_edge = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + solid3d_get_prev_adjacent_edge.additional_properties = d + return solid3d_get_prev_adjacent_edge - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +OS = TypeVar("OS", bound="solid3d_get_next_adjacent_edge") -ZL = TypeVar("ZL", bound="solid3d_get_next_adjacent_edge") @attr.s(auto_attribs=True) class solid3d_get_next_adjacent_edge: - """ The response from the `Solid3dGetNextAdjacentEdge` command. """ # noqa: E501 - data: Union[Unset, Solid3dGetNextAdjacentEdge] = UNSET - type: str = "solid3d_get_next_adjacent_edge" + """The response from the `Solid3dGetNextAdjacentEdge` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + data: Union[Unset, Solid3dGetNextAdjacentEdge] = UNSET + type: str = "solid3d_get_next_adjacent_edge" - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[ZL], src_dict: Dict[str, Any]) -> ZL: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Solid3dGetNextAdjacentEdge] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[OS], src_dict: Dict[str, Any]) -> OS: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Solid3dGetNextAdjacentEdge] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - solid3d_get_next_adjacent_edge = cls( - data= data, - type= type, - ) + solid3d_get_next_adjacent_edge = cls( + data=data, + type=type, + ) - solid3d_get_next_adjacent_edge.additional_properties = d - return solid3d_get_next_adjacent_edge + solid3d_get_next_adjacent_edge.additional_properties = d + return solid3d_get_next_adjacent_edge - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +WP = TypeVar("WP", bound="mouse_click") -CM = TypeVar("CM", bound="mouse_click") - @attr.s(auto_attribs=True) class mouse_click: - """ The response from the `MouseClick` command. """ # noqa: E501 - data: Union[Unset, MouseClick] = UNSET - type: str = "mouse_click" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `MouseClick` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, MouseClick] = UNSET + type: str = "mouse_click" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[CM], src_dict: Dict[str, Any]) -> CM: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, MouseClick] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[WP], src_dict: Dict[str, Any]) -> WP: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, MouseClick] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - mouse_click = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - mouse_click.additional_properties = d - return mouse_click + mouse_click = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + mouse_click.additional_properties = d + return mouse_click - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +XO = TypeVar("XO", bound="curve_get_type") -OS = TypeVar("OS", bound="curve_get_type") @attr.s(auto_attribs=True) class curve_get_type: - """ The response from the `CurveGetType` command. """ # noqa: E501 - data: Union[Unset, CurveGetType] = UNSET - type: str = "curve_get_type" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `CurveGetType` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, CurveGetType] = UNSET + type: str = "curve_get_type" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[OS], src_dict: Dict[str, Any]) -> OS: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, CurveGetType] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[XO], src_dict: Dict[str, Any]) -> XO: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, CurveGetType] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - curve_get_type = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - curve_get_type.additional_properties = d - return curve_get_type + curve_get_type = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + curve_get_type.additional_properties = d + return curve_get_type - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +LN = TypeVar("LN", bound="curve_get_control_points") -WP = TypeVar("WP", bound="curve_get_control_points") @attr.s(auto_attribs=True) class curve_get_control_points: - """ The response from the `CurveGetControlPoints` command. """ # noqa: E501 - data: Union[Unset, CurveGetControlPoints] = UNSET - type: str = "curve_get_control_points" + """The response from the `CurveGetControlPoints` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + data: Union[Unset, CurveGetControlPoints] = UNSET + type: str = "curve_get_control_points" - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[WP], src_dict: Dict[str, Any]) -> WP: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, CurveGetControlPoints] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[LN], src_dict: Dict[str, Any]) -> LN: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, CurveGetControlPoints] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - curve_get_control_points = cls( - data= data, - type= type, - ) + curve_get_control_points = cls( + data=data, + type=type, + ) - curve_get_control_points.additional_properties = d - return curve_get_control_points + curve_get_control_points.additional_properties = d + return curve_get_control_points - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +KR = TypeVar("KR", bound="take_snapshot") -XO = TypeVar("XO", bound="take_snapshot") - @attr.s(auto_attribs=True) class take_snapshot: - """ The response from the `Take Snapshot` command. """ # noqa: E501 - data: Union[Unset, TakeSnapshot] = UNSET - type: str = "take_snapshot" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `Take Snapshot` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, TakeSnapshot] = UNSET + type: str = "take_snapshot" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[XO], src_dict: Dict[str, Any]) -> XO: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, TakeSnapshot] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[KR], src_dict: Dict[str, Any]) -> KR: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TakeSnapshot] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - take_snapshot = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - take_snapshot.additional_properties = d - return take_snapshot + take_snapshot = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + take_snapshot.additional_properties = d + return take_snapshot - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +MG = TypeVar("MG", bound="path_get_info") -LN = TypeVar("LN", bound="path_get_info") @attr.s(auto_attribs=True) class path_get_info: - """ The response from the `Path Get Info` command. """ # noqa: E501 - data: Union[Unset, PathGetInfo] = UNSET - type: str = "path_get_info" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `Path Get Info` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, PathGetInfo] = UNSET + type: str = "path_get_info" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[LN], src_dict: Dict[str, Any]) -> LN: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, PathGetInfo] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[MG], src_dict: Dict[str, Any]) -> MG: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PathGetInfo] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - path_get_info = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - path_get_info.additional_properties = d - return path_get_info + path_get_info = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + path_get_info.additional_properties = d + return path_get_info - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +UE = TypeVar("UE", bound="path_get_curve_uuids_for_vertices") -KR = TypeVar("KR", bound="path_get_curve_uuids_for_vertices") @attr.s(auto_attribs=True) class path_get_curve_uuids_for_vertices: - """ The response from the `Path Get Curve UUIDs for Vertices` command. """ # noqa: E501 - data: Union[Unset, PathGetCurveUuidsForVertices] = UNSET - type: str = "path_get_curve_uuids_for_vertices" + """The response from the `Path Get Curve UUIDs for Vertices` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + data: Union[Unset, PathGetCurveUuidsForVertices] = UNSET + type: str = "path_get_curve_uuids_for_vertices" - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[KR], src_dict: Dict[str, Any]) -> KR: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, PathGetCurveUuidsForVertices] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[UE], src_dict: Dict[str, Any]) -> UE: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PathGetCurveUuidsForVertices] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - path_get_curve_uuids_for_vertices = cls( - data= data, - type= type, - ) + path_get_curve_uuids_for_vertices = cls( + data=data, + type=type, + ) - path_get_curve_uuids_for_vertices.additional_properties = d - return path_get_curve_uuids_for_vertices + path_get_curve_uuids_for_vertices.additional_properties = d + return path_get_curve_uuids_for_vertices - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +BF = TypeVar("BF", bound="path_get_vertex_uuids") -MG = TypeVar("MG", bound="path_get_vertex_uuids") - @attr.s(auto_attribs=True) class path_get_vertex_uuids: - """ The response from the `Path Get Vertex UUIDs` command. """ # noqa: E501 - data: Union[Unset, PathGetVertexUuids] = UNSET - type: str = "path_get_vertex_uuids" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `Path Get Vertex UUIDs` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, PathGetVertexUuids] = UNSET + type: str = "path_get_vertex_uuids" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[MG], src_dict: Dict[str, Any]) -> MG: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, PathGetVertexUuids] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[BF], src_dict: Dict[str, Any]) -> BF: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PathGetVertexUuids] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - path_get_vertex_uuids = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - path_get_vertex_uuids.additional_properties = d - return path_get_vertex_uuids + path_get_vertex_uuids = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + path_get_vertex_uuids.additional_properties = d + return path_get_vertex_uuids - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +UU = TypeVar("UU", bound="plane_intersect_and_project") -UE = TypeVar("UE", bound="plane_intersect_and_project") @attr.s(auto_attribs=True) class plane_intersect_and_project: - """ The response from the `PlaneIntersectAndProject` command. """ # noqa: E501 - data: Union[Unset, PlaneIntersectAndProject] = UNSET - type: str = "plane_intersect_and_project" + """The response from the `PlaneIntersectAndProject` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + data: Union[Unset, PlaneIntersectAndProject] = UNSET + type: str = "plane_intersect_and_project" - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[UE], src_dict: Dict[str, Any]) -> UE: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, PlaneIntersectAndProject] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[UU], src_dict: Dict[str, Any]) -> UU: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PlaneIntersectAndProject] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - plane_intersect_and_project = cls( - data= data, - type= type, - ) + plane_intersect_and_project = cls( + data=data, + type=type, + ) - plane_intersect_and_project.additional_properties = d - return plane_intersect_and_project + plane_intersect_and_project.additional_properties = d + return plane_intersect_and_project - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +MB = TypeVar("MB", bound="curve_get_end_points") -BF = TypeVar("BF", bound="curve_get_end_points") - @attr.s(auto_attribs=True) class curve_get_end_points: - """ The response from the `CurveGetEndPoints` command. """ # noqa: E501 - data: Union[Unset, CurveGetEndPoints] = UNSET - type: str = "curve_get_end_points" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `CurveGetEndPoints` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, CurveGetEndPoints] = UNSET + type: str = "curve_get_end_points" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[BF], src_dict: Dict[str, Any]) -> BF: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, CurveGetEndPoints] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[MB], src_dict: Dict[str, Any]) -> MB: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, CurveGetEndPoints] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - curve_get_end_points = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - curve_get_end_points.additional_properties = d - return curve_get_end_points + curve_get_end_points = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + curve_get_end_points.additional_properties = d + return curve_get_end_points - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +TB = TypeVar("TB", bound="import_files") -UU = TypeVar("UU", bound="import_files") @attr.s(auto_attribs=True) class import_files: - """ The response from the `ImportFiles` command. """ # noqa: E501 - data: Union[Unset, ImportFiles] = UNSET - type: str = "import_files" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `ImportFiles` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, ImportFiles] = UNSET + type: str = "import_files" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[UU], src_dict: Dict[str, Any]) -> UU: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, ImportFiles] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[TB], src_dict: Dict[str, Any]) -> TB: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, ImportFiles] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - import_files = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - import_files.additional_properties = d - return import_files + import_files = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + import_files.additional_properties = d + return import_files - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +FJ = TypeVar("FJ", bound="mass") -MB = TypeVar("MB", bound="mass") @attr.s(auto_attribs=True) class mass: - """ The response from the `Mass` command. """ # noqa: E501 - data: Union[Unset, Mass] = UNSET - type: str = "mass" + """The response from the `Mass` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + data: Union[Unset, Mass] = UNSET + type: str = "mass" - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[MB], src_dict: Dict[str, Any]) -> MB: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Mass] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[FJ], src_dict: Dict[str, Any]) -> FJ: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Mass] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - mass = cls( - data= data, - type= type, - ) + mass = cls( + data=data, + type=type, + ) - mass.additional_properties = d - return mass + mass.additional_properties = d + return mass - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +HB = TypeVar("HB", bound="volume") -TB = TypeVar("TB", bound="volume") - @attr.s(auto_attribs=True) class volume: - """ The response from the `Volume` command. """ # noqa: E501 - data: Union[Unset, Volume] = UNSET - type: str = "volume" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `Volume` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, Volume] = UNSET + type: str = "volume" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[TB], src_dict: Dict[str, Any]) -> TB: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Volume] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[HB], src_dict: Dict[str, Any]) -> HB: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Volume] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - volume = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - volume.additional_properties = d - return volume + volume = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + volume.additional_properties = d + return volume - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +SF = TypeVar("SF", bound="density") -FJ = TypeVar("FJ", bound="density") @attr.s(auto_attribs=True) class density: - """ The response from the `Density` command. """ # noqa: E501 - data: Union[Unset, Density] = UNSET - type: str = "density" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `Density` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, Density] = UNSET + type: str = "density" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[FJ], src_dict: Dict[str, Any]) -> FJ: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Density] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[SF], src_dict: Dict[str, Any]) -> SF: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Density] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - density = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - density.additional_properties = d - return density + density = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + density.additional_properties = d + return density - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +DU = TypeVar("DU", bound="surface_area") -HB = TypeVar("HB", bound="surface_area") @attr.s(auto_attribs=True) class surface_area: - """ The response from the `SurfaceArea` command. """ # noqa: E501 - data: Union[Unset, SurfaceArea] = UNSET - type: str = "surface_area" + """The response from the `SurfaceArea` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + data: Union[Unset, SurfaceArea] = UNSET + type: str = "surface_area" - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[HB], src_dict: Dict[str, Any]) -> HB: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, SurfaceArea] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[DU], src_dict: Dict[str, Any]) -> DU: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, SurfaceArea] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - surface_area = cls( - data= data, - type= type, - ) + surface_area = cls( + data=data, + type=type, + ) - surface_area.additional_properties = d - return surface_area + surface_area.additional_properties = d + return surface_area - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +BM = TypeVar("BM", bound="center_of_mass") -SF = TypeVar("SF", bound="center_of_mass") - @attr.s(auto_attribs=True) class center_of_mass: - """ The response from the `CenterOfMass` command. """ # noqa: E501 - data: Union[Unset, CenterOfMass] = UNSET - type: str = "center_of_mass" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The response from the `CenterOfMass` command.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type + data: Union[Unset, CenterOfMass] = UNSET + type: str = "center_of_mass" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[SF], src_dict: Dict[str, Any]) -> SF: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, CenterOfMass] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[BM], src_dict: Dict[str, Any]) -> BM: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, CenterOfMass] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - center_of_mass = cls( - data= data, - type= type, - ) + type = d.pop("type", UNSET) - center_of_mass.additional_properties = d - return center_of_mass + center_of_mass = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + center_of_mass.additional_properties = d + return center_of_mass - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +TY = TypeVar("TY", bound="get_sketch_mode_plane") -DU = TypeVar("DU", bound="get_sketch_mode_plane") @attr.s(auto_attribs=True) class get_sketch_mode_plane: - """ The response from the `GetSketchModePlane` command. """ # noqa: E501 - data: Union[Unset, GetSketchModePlane] = UNSET - type: str = "get_sketch_mode_plane" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.data, Unset): - data = self.data - type = self.type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type - - return field_dict - - @classmethod - def from_dict(cls: Type[DU], src_dict: Dict[str, Any]) -> DU: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, GetSketchModePlane] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - - get_sketch_mode_plane = cls( - data= data, - type= type, - ) - - get_sketch_mode_plane.additional_properties = d - return get_sketch_mode_plane - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - -OkModelingCmdResponse = Union[empty, export, select_with_point, highlight_set_entity, entity_get_child_uuid, entity_get_num_children, entity_get_parent_id, entity_get_all_child_uuids, select_get, get_entity_type, solid3d_get_all_edge_faces, solid3d_get_all_opposite_edges, solid3d_get_opposite_edge, solid3d_get_prev_adjacent_edge, solid3d_get_next_adjacent_edge, mouse_click, curve_get_type, curve_get_control_points, take_snapshot, path_get_info, path_get_curve_uuids_for_vertices, path_get_vertex_uuids, plane_intersect_and_project, curve_get_end_points, import_files, mass, volume, density, surface_area, center_of_mass, get_sketch_mode_plane] + """The response from the `GetSketchModePlane` command.""" # noqa: E501 + + data: Union[Unset, GetSketchModePlane] = UNSET + type: str = "get_sketch_mode_plane" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[TY], src_dict: Dict[str, Any]) -> TY: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, GetSketchModePlane] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + get_sketch_mode_plane = cls( + data=data, + type=type, + ) + + get_sketch_mode_plane.additional_properties = d + return get_sketch_mode_plane + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +OkModelingCmdResponse = Union[ + empty, + export, + select_with_point, + highlight_set_entity, + entity_get_child_uuid, + entity_get_num_children, + entity_get_parent_id, + entity_get_all_child_uuids, + select_get, + get_entity_type, + solid3d_get_all_edge_faces, + solid3d_get_all_opposite_edges, + solid3d_get_opposite_edge, + solid3d_get_prev_adjacent_edge, + solid3d_get_next_adjacent_edge, + mouse_click, + curve_get_type, + curve_get_control_points, + take_snapshot, + path_get_info, + path_get_curve_uuids_for_vertices, + path_get_vertex_uuids, + plane_intersect_and_project, + curve_get_end_points, + import_files, + mass, + volume, + density, + surface_area, + center_of_mass, + get_sketch_mode_plane, +] diff --git a/kittycad/models/ok_web_socket_response_data.py b/kittycad/models/ok_web_socket_response_data.py index 2fa3789d2..26f32ea12 100644 --- a/kittycad/models/ok_web_socket_response_data.py +++ b/kittycad/models/ok_web_socket_response_data.py @@ -4,343 +4,342 @@ from ..types import UNSET, Unset -BM = TypeVar("BM", bound="ice_server_info") +NC = TypeVar("NC", bound="ice_server_info") + @attr.s(auto_attribs=True) class ice_server_info: - """ Information about the ICE servers. """ # noqa: E501 - data: Union[Unset, Any] = UNSET - type: str = "ice_server_info" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Information about the ICE servers.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - data = self.data - type = self.type + data: Union[Unset, Any] = UNSET + type: str = "ice_server_info" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[BM], src_dict: Dict[str, Any]) -> BM: - d = src_dict.copy() - data = d.pop("data", UNSET) - type = d.pop("type", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type + return field_dict - ice_server_info = cls( - data= data, - type= type, - ) + @classmethod + def from_dict(cls: Type[NC], src_dict: Dict[str, Any]) -> NC: + d = src_dict.copy() + data = d.pop("data", UNSET) + type = d.pop("type", UNSET) - ice_server_info.additional_properties = d - return ice_server_info + ice_server_info = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + ice_server_info.additional_properties = d + return ice_server_info - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +GP = TypeVar("GP", bound="trickle_ice") -TY = TypeVar("TY", bound="trickle_ice") @attr.s(auto_attribs=True) class trickle_ice: - """ The trickle ICE candidate response. """ # noqa: E501 - data: Union[Unset, Any] = UNSET - type: str = "trickle_ice" + """The trickle ICE candidate response.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + data: Union[Unset, Any] = UNSET + type: str = "trickle_ice" - def to_dict(self) -> Dict[str, Any]: - data = self.data - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + data = self.data + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[TY], src_dict: Dict[str, Any]) -> TY: - d = src_dict.copy() - data = d.pop("data", UNSET) - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[GP], src_dict: Dict[str, Any]) -> GP: + d = src_dict.copy() + data = d.pop("data", UNSET) + type = d.pop("type", UNSET) - trickle_ice = cls( - data= data, - type= type, - ) + trickle_ice = cls( + data=data, + type=type, + ) - trickle_ice.additional_properties = d - return trickle_ice + trickle_ice.additional_properties = d + return trickle_ice - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +FF = TypeVar("FF", bound="sdp_answer") -NC = TypeVar("NC", bound="sdp_answer") - @attr.s(auto_attribs=True) class sdp_answer: - """ The SDP answer response. """ # noqa: E501 - data: Union[Unset, Any] = UNSET - type: str = "sdp_answer" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The SDP answer response.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - data = self.data - type = self.type + data: Union[Unset, Any] = UNSET + type: str = "sdp_answer" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[NC], src_dict: Dict[str, Any]) -> NC: - d = src_dict.copy() - data = d.pop("data", UNSET) - type = d.pop("type", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type + return field_dict - sdp_answer = cls( - data= data, - type= type, - ) + @classmethod + def from_dict(cls: Type[FF], src_dict: Dict[str, Any]) -> FF: + d = src_dict.copy() + data = d.pop("data", UNSET) + type = d.pop("type", UNSET) - sdp_answer.additional_properties = d - return sdp_answer + sdp_answer = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + sdp_answer.additional_properties = d + return sdp_answer - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +YO = TypeVar("YO", bound="modeling") -GP = TypeVar("GP", bound="modeling") @attr.s(auto_attribs=True) class modeling: - """ The modeling command response. """ # noqa: E501 - data: Union[Unset, Any] = UNSET - type: str = "modeling" + """The modeling command response.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + data: Union[Unset, Any] = UNSET + type: str = "modeling" - def to_dict(self) -> Dict[str, Any]: - data = self.data - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + data = self.data + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[GP], src_dict: Dict[str, Any]) -> GP: - d = src_dict.copy() - data = d.pop("data", UNSET) - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[YO], src_dict: Dict[str, Any]) -> YO: + d = src_dict.copy() + data = d.pop("data", UNSET) + type = d.pop("type", UNSET) - modeling = cls( - data= data, - type= type, - ) + modeling = cls( + data=data, + type=type, + ) - modeling.additional_properties = d - return modeling + modeling.additional_properties = d + return modeling - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +FS = TypeVar("FS", bound="export") -FF = TypeVar("FF", bound="export") - @attr.s(auto_attribs=True) class export: - """ The exported files. """ # noqa: E501 - data: Union[Unset, Any] = UNSET - type: str = "export" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The exported files.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - data = self.data - type = self.type + data: Union[Unset, Any] = UNSET + type: str = "export" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + data = self.data + type = self.type - @classmethod - def from_dict(cls: Type[FF], src_dict: Dict[str, Any]) -> FF: - d = src_dict.copy() - data = d.pop("data", UNSET) - type = d.pop("type", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type + return field_dict - export = cls( - data= data, - type= type, - ) + @classmethod + def from_dict(cls: Type[FS], src_dict: Dict[str, Any]) -> FS: + d = src_dict.copy() + data = d.pop("data", UNSET) + type = d.pop("type", UNSET) - export.additional_properties = d - return export + export = cls( + data=data, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + export.additional_properties = d + return export - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +WN = TypeVar("WN", bound="metrics_request") -YO = TypeVar("YO", bound="metrics_request") @attr.s(auto_attribs=True) class metrics_request: - """ Request a collection of metrics, to include WebRTC. """ # noqa: E501 - data: Union[Unset, Any] = UNSET - type: str = "metrics_request" + """Request a collection of metrics, to include WebRTC.""" # noqa: E501 + + data: Union[Unset, Any] = UNSET + type: str = "metrics_request" - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - data = self.data - type = self.type + def to_dict(self) -> Dict[str, Any]: + data = self.data + type = self.type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict['data'] = data - field_dict['type'] = type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type - return field_dict + return field_dict - @classmethod - def from_dict(cls: Type[YO], src_dict: Dict[str, Any]) -> YO: - d = src_dict.copy() - data = d.pop("data", UNSET) - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[WN], src_dict: Dict[str, Any]) -> WN: + d = src_dict.copy() + data = d.pop("data", UNSET) + type = d.pop("type", UNSET) + metrics_request = cls( + data=data, + type=type, + ) - metrics_request = cls( - data= data, - type= type, - ) + metrics_request.additional_properties = d + return metrics_request - metrics_request.additional_properties = d - return metrics_request + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties - def __contains__(self, key: str) -> bool: - return key in self.additional_properties -OkWebSocketResponseData = Union[ice_server_info, trickle_ice, sdp_answer, modeling, export, metrics_request] +OkWebSocketResponseData = Union[ + ice_server_info, trickle_ice, sdp_answer, modeling, export, metrics_request +] diff --git a/kittycad/models/onboarding.py b/kittycad/models/onboarding.py index d4dcbd37b..95ff4ef29 100644 --- a/kittycad/models/onboarding.py +++ b/kittycad/models/onboarding.py @@ -4,65 +4,70 @@ from ..types import UNSET, Unset -FS = TypeVar("FS", bound="Onboarding") +EQ = TypeVar("EQ", bound="Onboarding") + @attr.s(auto_attribs=True) class Onboarding: - """ Onboarding details """ # noqa: E501 - first_call_from__their_machine_date: Union[Unset, str] = UNSET - first_litterbox_execute_date: Union[Unset, str] = UNSET - first_token_date: Union[Unset, str] = UNSET + """Onboarding details""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + first_call_from__their_machine_date: Union[Unset, str] = UNSET + first_litterbox_execute_date: Union[Unset, str] = UNSET + first_token_date: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - first_call_from__their_machine_date = self.first_call_from__their_machine_date - first_litterbox_execute_date = self.first_litterbox_execute_date - first_token_date = self.first_token_date + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if first_call_from__their_machine_date is not UNSET: - field_dict['first_call_from_their_machine_date'] = first_call_from__their_machine_date - if first_litterbox_execute_date is not UNSET: - field_dict['first_litterbox_execute_date'] = first_litterbox_execute_date - if first_token_date is not UNSET: - field_dict['first_token_date'] = first_token_date + def to_dict(self) -> Dict[str, Any]: + first_call_from__their_machine_date = self.first_call_from__their_machine_date + first_litterbox_execute_date = self.first_litterbox_execute_date + first_token_date = self.first_token_date - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if first_call_from__their_machine_date is not UNSET: + field_dict[ + "first_call_from_their_machine_date" + ] = first_call_from__their_machine_date + if first_litterbox_execute_date is not UNSET: + field_dict["first_litterbox_execute_date"] = first_litterbox_execute_date + if first_token_date is not UNSET: + field_dict["first_token_date"] = first_token_date - @classmethod - def from_dict(cls: Type[FS], src_dict: Dict[str, Any]) -> FS: - d = src_dict.copy() - first_call_from__their_machine_date = d.pop("first_call_from_their_machine_date", UNSET) + return field_dict - first_litterbox_execute_date = d.pop("first_litterbox_execute_date", UNSET) + @classmethod + def from_dict(cls: Type[EQ], src_dict: Dict[str, Any]) -> EQ: + d = src_dict.copy() + first_call_from__their_machine_date = d.pop( + "first_call_from_their_machine_date", UNSET + ) - first_token_date = d.pop("first_token_date", UNSET) + first_litterbox_execute_date = d.pop("first_litterbox_execute_date", UNSET) + first_token_date = d.pop("first_token_date", UNSET) - onboarding = cls( - first_call_from__their_machine_date= first_call_from__their_machine_date, - first_litterbox_execute_date= first_litterbox_execute_date, - first_token_date= first_token_date, - ) + onboarding = cls( + first_call_from__their_machine_date=first_call_from__their_machine_date, + first_litterbox_execute_date=first_litterbox_execute_date, + first_token_date=first_token_date, + ) - onboarding.additional_properties = d - return onboarding + onboarding.additional_properties = d + return onboarding - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/output_file.py b/kittycad/models/output_file.py index 8e5ab670c..3282807fa 100644 --- a/kittycad/models/output_file.py +++ b/kittycad/models/output_file.py @@ -4,58 +4,59 @@ from ..types import UNSET, Unset -WN = TypeVar("WN", bound="OutputFile") +UW = TypeVar("UW", bound="OutputFile") + @attr.s(auto_attribs=True) class OutputFile: - """ Output file contents. """ # noqa: E501 - contents: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET + """Output file contents.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + contents: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - contents = self.contents - name = self.name + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if contents is not UNSET: - field_dict['contents'] = contents - if name is not UNSET: - field_dict['name'] = name + def to_dict(self) -> Dict[str, Any]: + contents = self.contents + name = self.name - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contents is not UNSET: + field_dict["contents"] = contents + if name is not UNSET: + field_dict["name"] = name - @classmethod - def from_dict(cls: Type[WN], src_dict: Dict[str, Any]) -> WN: - d = src_dict.copy() - contents = d.pop("contents", UNSET) + return field_dict - name = d.pop("name", UNSET) + @classmethod + def from_dict(cls: Type[UW], src_dict: Dict[str, Any]) -> UW: + d = src_dict.copy() + contents = d.pop("contents", UNSET) + name = d.pop("name", UNSET) - output_file = cls( - contents= contents, - name= name, - ) + output_file = cls( + contents=contents, + name=name, + ) - output_file.additional_properties = d - return output_file + output_file.additional_properties = d + return output_file - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/output_format.py b/kittycad/models/output_format.py index e869bbec0..20d8f63f4 100644 --- a/kittycad/models/output_format.py +++ b/kittycad/models/output_format.py @@ -6,455 +6,492 @@ from ..models.gltf_presentation import GltfPresentation from ..models.gltf_storage import GltfStorage from ..models.ply_storage import PlyStorage +from ..models.selection import Selection from ..models.stl_storage import StlStorage from ..models.system import System from ..models.unit_length import UnitLength from ..types import UNSET, Unset -EQ = TypeVar("EQ", bound="fbx") +MD = TypeVar("MD", bound="fbx") + @attr.s(auto_attribs=True) class fbx: - """ Autodesk Filmbox (FBX) format. """ # noqa: E501 - storage: Union[Unset, FbxStorage] = UNSET - type: str = "fbx" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Autodesk Filmbox (FBX) format.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.storage, Unset): - storage = self.storage - type = self.type + storage: Union[Unset, FbxStorage] = UNSET + type: str = "fbx" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if storage is not UNSET: - field_dict['storage'] = storage - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.storage, Unset): + storage = self.storage + type = self.type - @classmethod - def from_dict(cls: Type[EQ], src_dict: Dict[str, Any]) -> EQ: - d = src_dict.copy() - _storage = d.pop("storage", UNSET) - storage: Union[Unset, FbxStorage] - if isinstance(_storage, Unset): - storage = UNSET - else: - storage = _storage # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if storage is not UNSET: + field_dict["storage"] = storage + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[MD], src_dict: Dict[str, Any]) -> MD: + d = src_dict.copy() + _storage = d.pop("storage", UNSET) + storage: Union[Unset, FbxStorage] + if isinstance(_storage, Unset): + storage = UNSET + else: + storage = _storage # type: ignore[arg-type] - fbx = cls( - storage= storage, - type= type, - ) + type = d.pop("type", UNSET) - fbx.additional_properties = d - return fbx + fbx = cls( + storage=storage, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + fbx.additional_properties = d + return fbx - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +HD = TypeVar("HD", bound="gltf") -UW = TypeVar("UW", bound="gltf") @attr.s(auto_attribs=True) class gltf: - """ glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). If you prefer ascii output, you can set that option for the export. """ # noqa: E501 - presentation: Union[Unset, GltfPresentation] = UNSET - storage: Union[Unset, GltfStorage] = UNSET - type: str = "gltf" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). If you prefer ascii output, you can set that option for the export.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.presentation, Unset): - presentation = self.presentation - if not isinstance(self.storage, Unset): - storage = self.storage - type = self.type + presentation: Union[Unset, GltfPresentation] = UNSET + storage: Union[Unset, GltfStorage] = UNSET + type: str = "gltf" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if presentation is not UNSET: - field_dict['presentation'] = presentation - if storage is not UNSET: - field_dict['storage'] = storage - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.presentation, Unset): + presentation = self.presentation + if not isinstance(self.storage, Unset): + storage = self.storage + type = self.type - @classmethod - def from_dict(cls: Type[UW], src_dict: Dict[str, Any]) -> UW: - d = src_dict.copy() - _presentation = d.pop("presentation", UNSET) - presentation: Union[Unset, GltfPresentation] - if isinstance(_presentation, Unset): - presentation = UNSET - else: - presentation = _presentation # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if presentation is not UNSET: + field_dict["presentation"] = presentation + if storage is not UNSET: + field_dict["storage"] = storage + field_dict["type"] = type - _storage = d.pop("storage", UNSET) - storage: Union[Unset, GltfStorage] - if isinstance(_storage, Unset): - storage = UNSET - else: - storage = _storage # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[HD], src_dict: Dict[str, Any]) -> HD: + d = src_dict.copy() + _presentation = d.pop("presentation", UNSET) + presentation: Union[Unset, GltfPresentation] + if isinstance(_presentation, Unset): + presentation = UNSET + else: + presentation = _presentation # type: ignore[arg-type] + _storage = d.pop("storage", UNSET) + storage: Union[Unset, GltfStorage] + if isinstance(_storage, Unset): + storage = UNSET + else: + storage = _storage # type: ignore[arg-type] - gltf = cls( - presentation= presentation, - storage= storage, - type= type, - ) + type = d.pop("type", UNSET) - gltf.additional_properties = d - return gltf + gltf = cls( + presentation=presentation, + storage=storage, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + gltf.additional_properties = d + return gltf - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +UJ = TypeVar("UJ", bound="obj") -MD = TypeVar("MD", bound="obj") @attr.s(auto_attribs=True) class obj: - """ Wavefront OBJ format. """ # noqa: E501 - coords: Union[Unset, System] = UNSET - type: str = "obj" - units: Union[Unset, UnitLength] = UNSET + """Wavefront OBJ format.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + coords: Union[Unset, System] = UNSET + type: str = "obj" + units: Union[Unset, UnitLength] = UNSET - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coords, Unset): - coords = self.coords - type = self.type - if not isinstance(self.units, Unset): - units = self.units + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coords is not UNSET: - field_dict['coords'] = coords - field_dict['type'] = type - if units is not UNSET: - field_dict['units'] = units + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + type = self.type + if not isinstance(self.units, Unset): + units = self.units - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict["coords"] = coords + field_dict["type"] = type + if units is not UNSET: + field_dict["units"] = units - @classmethod - def from_dict(cls: Type[MD], src_dict: Dict[str, Any]) -> MD: - d = src_dict.copy() - _coords = d.pop("coords", UNSET) - coords: Union[Unset, System] - if isinstance(_coords, Unset): - coords = UNSET - else: - coords = _coords # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[UJ], src_dict: Dict[str, Any]) -> UJ: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] - _units = d.pop("units", UNSET) - units: Union[Unset, UnitLength] - if isinstance(_units, Unset): - units = UNSET - else: - units = _units # type: ignore[arg-type] + type = d.pop("type", UNSET) + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] - obj = cls( - coords= coords, - type= type, - units= units, - ) + obj = cls( + coords=coords, + type=type, + units=units, + ) - obj.additional_properties = d - return obj + obj.additional_properties = d + return obj - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +RU = TypeVar("RU", bound="ply") -HD = TypeVar("HD", bound="ply") - @attr.s(auto_attribs=True) class ply: - """ The PLY Polygon File Format. """ # noqa: E501 - coords: Union[Unset, System] = UNSET - storage: Union[Unset, PlyStorage] = UNSET - type: str = "ply" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coords, Unset): - coords = self.coords - if not isinstance(self.storage, Unset): - storage = self.storage - type = self.type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coords is not UNSET: - field_dict['coords'] = coords - if storage is not UNSET: - field_dict['storage'] = storage - field_dict['type'] = type - - return field_dict - - @classmethod - def from_dict(cls: Type[HD], src_dict: Dict[str, Any]) -> HD: - d = src_dict.copy() - _coords = d.pop("coords", UNSET) - coords: Union[Unset, System] - if isinstance(_coords, Unset): - coords = UNSET - else: - coords = _coords # type: ignore[arg-type] - - _storage = d.pop("storage", UNSET) - storage: Union[Unset, PlyStorage] - if isinstance(_storage, Unset): - storage = UNSET - else: - storage = _storage # type: ignore[arg-type] - - type = d.pop("type", UNSET) - + """The PLY Polygon File Format.""" # noqa: E501 + + coords: Union[Unset, System] = UNSET + selection: Union[Unset, Selection] = UNSET + storage: Union[Unset, PlyStorage] = UNSET + type: str = "ply" + units: Union[Unset, UnitLength] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + if not isinstance(self.selection, Unset): + selection = self.selection + if not isinstance(self.storage, Unset): + storage = self.storage + type = self.type + if not isinstance(self.units, Unset): + units = self.units + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict["coords"] = coords + if selection is not UNSET: + field_dict["selection"] = selection + if storage is not UNSET: + field_dict["storage"] = storage + field_dict["type"] = type + if units is not UNSET: + field_dict["units"] = units + + return field_dict + + @classmethod + def from_dict(cls: Type[RU], src_dict: Dict[str, Any]) -> RU: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] + + _selection = d.pop("selection", UNSET) + selection: Union[Unset, Selection] + if isinstance(_selection, Unset): + selection = UNSET + else: + selection = _selection # type: ignore[arg-type] + + _storage = d.pop("storage", UNSET) + storage: Union[Unset, PlyStorage] + if isinstance(_storage, Unset): + storage = UNSET + else: + storage = _storage # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] + + ply = cls( + coords=coords, + selection=selection, + storage=storage, + type=type, + units=units, + ) + + ply.additional_properties = d + return ply + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +DL = TypeVar("DL", bound="step") - ply = cls( - coords= coords, - storage= storage, - type= type, - ) - - ply.additional_properties = d - return ply - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - - - -UJ = TypeVar("UJ", bound="step") @attr.s(auto_attribs=True) class step: - """ ISO 10303-21 (STEP) format. """ # noqa: E501 - coords: Union[Unset, System] = UNSET - type: str = "step" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """ISO 10303-21 (STEP) format.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coords, Unset): - coords = self.coords - type = self.type + coords: Union[Unset, System] = UNSET + type: str = "step" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coords is not UNSET: - field_dict['coords'] = coords - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + type = self.type - @classmethod - def from_dict(cls: Type[UJ], src_dict: Dict[str, Any]) -> UJ: - d = src_dict.copy() - _coords = d.pop("coords", UNSET) - coords: Union[Unset, System] - if isinstance(_coords, Unset): - coords = UNSET - else: - coords = _coords # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict["coords"] = coords + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[DL], src_dict: Dict[str, Any]) -> DL: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] - step = cls( - coords= coords, - type= type, - ) + type = d.pop("type", UNSET) - step.additional_properties = d - return step + step = cls( + coords=coords, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + step.additional_properties = d + return step - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +QT = TypeVar("QT", bound="stl") -RU = TypeVar("RU", bound="stl") @attr.s(auto_attribs=True) class stl: - """ *ST**ereo**L**ithography format. """ # noqa: E501 - coords: Union[Unset, System] = UNSET - storage: Union[Unset, StlStorage] = UNSET - type: str = "stl" - units: Union[Unset, UnitLength] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coords, Unset): - coords = self.coords - if not isinstance(self.storage, Unset): - storage = self.storage - type = self.type - if not isinstance(self.units, Unset): - units = self.units - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coords is not UNSET: - field_dict['coords'] = coords - if storage is not UNSET: - field_dict['storage'] = storage - field_dict['type'] = type - if units is not UNSET: - field_dict['units'] = units - - return field_dict - - @classmethod - def from_dict(cls: Type[RU], src_dict: Dict[str, Any]) -> RU: - d = src_dict.copy() - _coords = d.pop("coords", UNSET) - coords: Union[Unset, System] - if isinstance(_coords, Unset): - coords = UNSET - else: - coords = _coords # type: ignore[arg-type] - - _storage = d.pop("storage", UNSET) - storage: Union[Unset, StlStorage] - if isinstance(_storage, Unset): - storage = UNSET - else: - storage = _storage # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - _units = d.pop("units", UNSET) - units: Union[Unset, UnitLength] - if isinstance(_units, Unset): - units = UNSET - else: - units = _units # type: ignore[arg-type] - - - stl = cls( - coords= coords, - storage= storage, - type= type, - units= units, - ) - - stl.additional_properties = d - return stl - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """*ST**ereo**L**ithography format.""" # noqa: E501 + + coords: Union[Unset, System] = UNSET + selection: Union[Unset, Selection] = UNSET + storage: Union[Unset, StlStorage] = UNSET + type: str = "stl" + units: Union[Unset, UnitLength] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + if not isinstance(self.selection, Unset): + selection = self.selection + if not isinstance(self.storage, Unset): + storage = self.storage + type = self.type + if not isinstance(self.units, Unset): + units = self.units + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict["coords"] = coords + if selection is not UNSET: + field_dict["selection"] = selection + if storage is not UNSET: + field_dict["storage"] = storage + field_dict["type"] = type + if units is not UNSET: + field_dict["units"] = units + + return field_dict + + @classmethod + def from_dict(cls: Type[QT], src_dict: Dict[str, Any]) -> QT: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] + + _selection = d.pop("selection", UNSET) + selection: Union[Unset, Selection] + if isinstance(_selection, Unset): + selection = UNSET + else: + selection = _selection # type: ignore[arg-type] + + _storage = d.pop("storage", UNSET) + storage: Union[Unset, StlStorage] + if isinstance(_storage, Unset): + storage = UNSET + else: + storage = _storage # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] + + stl = cls( + coords=coords, + selection=selection, + storage=storage, + type=type, + units=units, + ) + + stl.additional_properties = d + return stl + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + OutputFormat = Union[fbx, gltf, obj, ply, step, stl] diff --git a/kittycad/models/path_command.py b/kittycad/models/path_command.py index d1bc269b8..98d26cf10 100644 --- a/kittycad/models/path_command.py +++ b/kittycad/models/path_command.py @@ -2,12 +2,13 @@ class PathCommand(str, Enum): - """ The path component command type (within a Path) """ # noqa: E501 - MOVE_TO = 'move_to' - LINE_TO = 'line_to' - BEZ_CURVE_TO = 'bez_curve_to' - NURBS_CURVE_TO = 'nurbs_curve_to' - ADD_ARC = 'add_arc' - - def __str__(self) -> str: - return str(self.value) + """The path component command type (within a Path)""" # noqa: E501 + + MOVE_TO = "move_to" + LINE_TO = "line_to" + BEZ_CURVE_TO = "bez_curve_to" + NURBS_CURVE_TO = "nurbs_curve_to" + ADD_ARC = "add_arc" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/path_get_curve_uuids_for_vertices.py b/kittycad/models/path_get_curve_uuids_for_vertices.py index 16832560a..78cfb7841 100644 --- a/kittycad/models/path_get_curve_uuids_for_vertices.py +++ b/kittycad/models/path_get_curve_uuids_for_vertices.py @@ -4,53 +4,54 @@ from ..types import UNSET, Unset -DL = TypeVar("DL", bound="PathGetCurveUuidsForVertices") +PT = TypeVar("PT", bound="PathGetCurveUuidsForVertices") + @attr.s(auto_attribs=True) class PathGetCurveUuidsForVertices: - """ The response from the `PathGetCurveUuidsForVertices` command. """ # noqa: E501 - curve_ids: Union[Unset, List[str]] = UNSET + """The response from the `PathGetCurveUuidsForVertices` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + curve_ids: Union[Unset, List[str]] = UNSET - def to_dict(self) -> Dict[str, Any]: - curve_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.curve_ids, Unset): - curve_ids = self.curve_ids + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if curve_ids is not UNSET: - field_dict['curve_ids'] = curve_ids + def to_dict(self) -> Dict[str, Any]: + curve_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.curve_ids, Unset): + curve_ids = self.curve_ids - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if curve_ids is not UNSET: + field_dict["curve_ids"] = curve_ids - @classmethod - def from_dict(cls: Type[DL], src_dict: Dict[str, Any]) -> DL: - d = src_dict.copy() - curve_ids = cast(List[str], d.pop("curve_ids", UNSET)) + return field_dict + @classmethod + def from_dict(cls: Type[PT], src_dict: Dict[str, Any]) -> PT: + d = src_dict.copy() + curve_ids = cast(List[str], d.pop("curve_ids", UNSET)) - path_get_curve_uuids_for_vertices = cls( - curve_ids= curve_ids, - ) + path_get_curve_uuids_for_vertices = cls( + curve_ids=curve_ids, + ) - path_get_curve_uuids_for_vertices.additional_properties = d - return path_get_curve_uuids_for_vertices + path_get_curve_uuids_for_vertices.additional_properties = d + return path_get_curve_uuids_for_vertices - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/path_get_info.py b/kittycad/models/path_get_info.py index 2580d36c7..7b75f008e 100644 --- a/kittycad/models/path_get_info.py +++ b/kittycad/models/path_get_info.py @@ -4,56 +4,60 @@ from ..types import UNSET, Unset -QT = TypeVar("QT", bound="PathGetInfo") +HR = TypeVar("HR", bound="PathGetInfo") + @attr.s(auto_attribs=True) class PathGetInfo: - """ The response from the `PathGetInfo` command. """ # noqa: E501 - from ..models.path_segment_info import PathSegmentInfo - segments: Union[Unset, List[PathSegmentInfo]] = UNSET + """The response from the `PathGetInfo` command.""" # noqa: E501 + + from ..models.path_segment_info import PathSegmentInfo + + segments: Union[Unset, List[PathSegmentInfo]] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + from ..models.path_segment_info import PathSegmentInfo - def to_dict(self) -> Dict[str, Any]: - from ..models.path_segment_info import PathSegmentInfo - segments: Union[Unset, List[PathSegmentInfo]] = UNSET - if not isinstance(self.segments, Unset): - segments = self.segments + segments: Union[Unset, List[PathSegmentInfo]] = UNSET + if not isinstance(self.segments, Unset): + segments = self.segments - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if segments is not UNSET: - field_dict['segments'] = segments + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if segments is not UNSET: + field_dict["segments"] = segments - return field_dict + return field_dict - @classmethod - def from_dict(cls: Type[QT], src_dict: Dict[str, Any]) -> QT: - d = src_dict.copy() - from ..models.path_segment_info import PathSegmentInfo - segments = cast(List[PathSegmentInfo], d.pop("segments", UNSET)) + @classmethod + def from_dict(cls: Type[HR], src_dict: Dict[str, Any]) -> HR: + d = src_dict.copy() + from ..models.path_segment_info import PathSegmentInfo + segments = cast(List[PathSegmentInfo], d.pop("segments", UNSET)) - path_get_info = cls( - segments= segments, - ) + path_get_info = cls( + segments=segments, + ) - path_get_info.additional_properties = d - return path_get_info + path_get_info.additional_properties = d + return path_get_info - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/path_get_vertex_uuids.py b/kittycad/models/path_get_vertex_uuids.py index d0e015645..fcf616d69 100644 --- a/kittycad/models/path_get_vertex_uuids.py +++ b/kittycad/models/path_get_vertex_uuids.py @@ -4,53 +4,54 @@ from ..types import UNSET, Unset -PT = TypeVar("PT", bound="PathGetVertexUuids") +VF = TypeVar("VF", bound="PathGetVertexUuids") + @attr.s(auto_attribs=True) class PathGetVertexUuids: - """ The response from the `PathGetVertexUuids` command. """ # noqa: E501 - vertex_ids: Union[Unset, List[str]] = UNSET + """The response from the `PathGetVertexUuids` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + vertex_ids: Union[Unset, List[str]] = UNSET - def to_dict(self) -> Dict[str, Any]: - vertex_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.vertex_ids, Unset): - vertex_ids = self.vertex_ids + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if vertex_ids is not UNSET: - field_dict['vertex_ids'] = vertex_ids + def to_dict(self) -> Dict[str, Any]: + vertex_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.vertex_ids, Unset): + vertex_ids = self.vertex_ids - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if vertex_ids is not UNSET: + field_dict["vertex_ids"] = vertex_ids - @classmethod - def from_dict(cls: Type[PT], src_dict: Dict[str, Any]) -> PT: - d = src_dict.copy() - vertex_ids = cast(List[str], d.pop("vertex_ids", UNSET)) + return field_dict + @classmethod + def from_dict(cls: Type[VF], src_dict: Dict[str, Any]) -> VF: + d = src_dict.copy() + vertex_ids = cast(List[str], d.pop("vertex_ids", UNSET)) - path_get_vertex_uuids = cls( - vertex_ids= vertex_ids, - ) + path_get_vertex_uuids = cls( + vertex_ids=vertex_ids, + ) - path_get_vertex_uuids.additional_properties = d - return path_get_vertex_uuids + path_get_vertex_uuids.additional_properties = d + return path_get_vertex_uuids - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/path_segment.py b/kittycad/models/path_segment.py index 5a3ac3548..52ab388df 100644 --- a/kittycad/models/path_segment.py +++ b/kittycad/models/path_segment.py @@ -7,435 +7,433 @@ from ..models.point3d import Point3d from ..types import UNSET, Unset -HR = TypeVar("HR", bound="line") +VM = TypeVar("VM", bound="line") + @attr.s(auto_attribs=True) class line: - """ A straight line segment. Goes from the current path "pen" to the given endpoint. """ # noqa: E501 - end: Union[Unset, Point3d] = UNSET - relative: Union[Unset, bool] = False - type: str = "line" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """A straight line segment. Goes from the current path "pen" to the given endpoint.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.end, Unset): - end = self.end - relative = self.relative - type = self.type + end: Union[Unset, Point3d] = UNSET + relative: Union[Unset, bool] = False + type: str = "line" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if end is not UNSET: - field_dict['end'] = end - if relative is not UNSET: - field_dict['relative'] = relative - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.end, Unset): + end = self.end + relative = self.relative + type = self.type - @classmethod - def from_dict(cls: Type[HR], src_dict: Dict[str, Any]) -> HR: - d = src_dict.copy() - _end = d.pop("end", UNSET) - end: Union[Unset, Point3d] - if isinstance(_end, Unset): - end = UNSET - else: - end = _end # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if end is not UNSET: + field_dict["end"] = end + if relative is not UNSET: + field_dict["relative"] = relative + field_dict["type"] = type - relative = d.pop("relative", UNSET) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[VM], src_dict: Dict[str, Any]) -> VM: + d = src_dict.copy() + _end = d.pop("end", UNSET) + end: Union[Unset, Point3d] + if isinstance(_end, Unset): + end = UNSET + else: + end = _end # type: ignore[arg-type] + relative = d.pop("relative", UNSET) - line = cls( - end= end, - relative= relative, - type= type, - ) + type = d.pop("type", UNSET) - line.additional_properties = d - return line + line = cls( + end=end, + relative=relative, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + line.additional_properties = d + return line - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +WH = TypeVar("WH", bound="arc") -VF = TypeVar("VF", bound="arc") @attr.s(auto_attribs=True) class arc: - """ A circular arc segment. """ # noqa: E501 - angle_end: Union[Unset, float] = UNSET - angle_start: Union[Unset, float] = UNSET - center: Union[Unset, Point2d] = UNSET - end: Union[Unset, Angle] = UNSET - radius: Union[Unset, float] = UNSET - relative: Union[Unset, bool] = False - start: Union[Unset, Angle] = UNSET - type: str = "arc" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - angle_end = self.angle_end - angle_start = self.angle_start - if not isinstance(self.center, Unset): - center = self.center - if not isinstance(self.end, Unset): - end = self.end - radius = self.radius - relative = self.relative - if not isinstance(self.start, Unset): - start = self.start - type = self.type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if angle_end is not UNSET: - field_dict['angle_end'] = angle_end - if angle_start is not UNSET: - field_dict['angle_start'] = angle_start - if center is not UNSET: - field_dict['center'] = center - if end is not UNSET: - field_dict['end'] = end - if radius is not UNSET: - field_dict['radius'] = radius - if relative is not UNSET: - field_dict['relative'] = relative - if start is not UNSET: - field_dict['start'] = start - field_dict['type'] = type - - return field_dict - - @classmethod - def from_dict(cls: Type[VF], src_dict: Dict[str, Any]) -> VF: - d = src_dict.copy() - angle_end = d.pop("angle_end", UNSET) - - angle_start = d.pop("angle_start", UNSET) - - _center = d.pop("center", UNSET) - center: Union[Unset, Point2d] - if isinstance(_center, Unset): - center = UNSET - else: - center = _center # type: ignore[arg-type] - - _end = d.pop("end", UNSET) - end: Union[Unset, Angle] - if isinstance(_end, Unset): - end = UNSET - else: - end = _end # type: ignore[arg-type] - - radius = d.pop("radius", UNSET) - - relative = d.pop("relative", UNSET) - - _start = d.pop("start", UNSET) - start: Union[Unset, Angle] - if isinstance(_start, Unset): - start = UNSET - else: - start = _start # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - - arc = cls( - angle_end= angle_end, - angle_start= angle_start, - center= center, - end= end, - radius= radius, - relative= relative, - start= start, - type= type, - ) - - arc.additional_properties = d - return arc - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - - - -VM = TypeVar("VM", bound="bezier") + """A circular arc segment.""" # noqa: E501 + + angle_end: Union[Unset, float] = UNSET + angle_start: Union[Unset, float] = UNSET + center: Union[Unset, Point2d] = UNSET + end: Union[Unset, Angle] = UNSET + radius: Union[Unset, float] = UNSET + relative: Union[Unset, bool] = False + start: Union[Unset, Angle] = UNSET + type: str = "arc" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + angle_end = self.angle_end + angle_start = self.angle_start + if not isinstance(self.center, Unset): + center = self.center + if not isinstance(self.end, Unset): + end = self.end + radius = self.radius + relative = self.relative + if not isinstance(self.start, Unset): + start = self.start + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if angle_end is not UNSET: + field_dict["angle_end"] = angle_end + if angle_start is not UNSET: + field_dict["angle_start"] = angle_start + if center is not UNSET: + field_dict["center"] = center + if end is not UNSET: + field_dict["end"] = end + if radius is not UNSET: + field_dict["radius"] = radius + if relative is not UNSET: + field_dict["relative"] = relative + if start is not UNSET: + field_dict["start"] = start + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[WH], src_dict: Dict[str, Any]) -> WH: + d = src_dict.copy() + angle_end = d.pop("angle_end", UNSET) + + angle_start = d.pop("angle_start", UNSET) + + _center = d.pop("center", UNSET) + center: Union[Unset, Point2d] + if isinstance(_center, Unset): + center = UNSET + else: + center = _center # type: ignore[arg-type] + + _end = d.pop("end", UNSET) + end: Union[Unset, Angle] + if isinstance(_end, Unset): + end = UNSET + else: + end = _end # type: ignore[arg-type] + + radius = d.pop("radius", UNSET) + + relative = d.pop("relative", UNSET) + + _start = d.pop("start", UNSET) + start: Union[Unset, Angle] + if isinstance(_start, Unset): + start = UNSET + else: + start = _start # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + arc = cls( + angle_end=angle_end, + angle_start=angle_start, + center=center, + end=end, + radius=radius, + relative=relative, + start=start, + type=type, + ) + + arc.additional_properties = d + return arc + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +DQ = TypeVar("DQ", bound="bezier") + @attr.s(auto_attribs=True) class bezier: - """ A cubic bezier curve segment. Start at the end of the current line, go through control point 1 and 2, then end at a given point. """ # noqa: E501 - control1: Union[Unset, Point3d] = UNSET - control2: Union[Unset, Point3d] = UNSET - end: Union[Unset, Point3d] = UNSET - relative: Union[Unset, bool] = False - type: str = "bezier" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.control1, Unset): - control1 = self.control1 - if not isinstance(self.control2, Unset): - control2 = self.control2 - if not isinstance(self.end, Unset): - end = self.end - relative = self.relative - type = self.type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if control1 is not UNSET: - field_dict['control1'] = control1 - if control2 is not UNSET: - field_dict['control2'] = control2 - if end is not UNSET: - field_dict['end'] = end - if relative is not UNSET: - field_dict['relative'] = relative - field_dict['type'] = type - - return field_dict - - @classmethod - def from_dict(cls: Type[VM], src_dict: Dict[str, Any]) -> VM: - d = src_dict.copy() - _control1 = d.pop("control1", UNSET) - control1: Union[Unset, Point3d] - if isinstance(_control1, Unset): - control1 = UNSET - else: - control1 = _control1 # type: ignore[arg-type] - - _control2 = d.pop("control2", UNSET) - control2: Union[Unset, Point3d] - if isinstance(_control2, Unset): - control2 = UNSET - else: - control2 = _control2 # type: ignore[arg-type] - - _end = d.pop("end", UNSET) - end: Union[Unset, Point3d] - if isinstance(_end, Unset): - end = UNSET - else: - end = _end # type: ignore[arg-type] - - relative = d.pop("relative", UNSET) - - type = d.pop("type", UNSET) - - - bezier = cls( - control1= control1, - control2= control2, - end= end, - relative= relative, - type= type, - ) - - bezier.additional_properties = d - return bezier - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - - - -WH = TypeVar("WH", bound="tangential_arc") + """A cubic bezier curve segment. Start at the end of the current line, go through control point 1 and 2, then end at a given point.""" # noqa: E501 + + control1: Union[Unset, Point3d] = UNSET + control2: Union[Unset, Point3d] = UNSET + end: Union[Unset, Point3d] = UNSET + relative: Union[Unset, bool] = False + type: str = "bezier" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.control1, Unset): + control1 = self.control1 + if not isinstance(self.control2, Unset): + control2 = self.control2 + if not isinstance(self.end, Unset): + end = self.end + relative = self.relative + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if control1 is not UNSET: + field_dict["control1"] = control1 + if control2 is not UNSET: + field_dict["control2"] = control2 + if end is not UNSET: + field_dict["end"] = end + if relative is not UNSET: + field_dict["relative"] = relative + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[DQ], src_dict: Dict[str, Any]) -> DQ: + d = src_dict.copy() + _control1 = d.pop("control1", UNSET) + control1: Union[Unset, Point3d] + if isinstance(_control1, Unset): + control1 = UNSET + else: + control1 = _control1 # type: ignore[arg-type] + + _control2 = d.pop("control2", UNSET) + control2: Union[Unset, Point3d] + if isinstance(_control2, Unset): + control2 = UNSET + else: + control2 = _control2 # type: ignore[arg-type] + + _end = d.pop("end", UNSET) + end: Union[Unset, Point3d] + if isinstance(_end, Unset): + end = UNSET + else: + end = _end # type: ignore[arg-type] + + relative = d.pop("relative", UNSET) + + type = d.pop("type", UNSET) + + bezier = cls( + control1=control1, + control2=control2, + end=end, + relative=relative, + type=type, + ) + + bezier.additional_properties = d + return bezier + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +UY = TypeVar("UY", bound="tangential_arc") + @attr.s(auto_attribs=True) class tangential_arc: - """ Adds a tangent arc from current pen position with the given radius and angle. """ # noqa: E501 - offset: Union[Unset, Angle] = UNSET - radius: Union[Unset, float] = UNSET - type: str = "tangential_arc" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """Adds a tangent arc from current pen position with the given radius and angle.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.offset, Unset): - offset = self.offset - radius = self.radius - type = self.type + offset: Union[Unset, Angle] = UNSET + radius: Union[Unset, float] = UNSET + type: str = "tangential_arc" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if offset is not UNSET: - field_dict['offset'] = offset - if radius is not UNSET: - field_dict['radius'] = radius - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.offset, Unset): + offset = self.offset + radius = self.radius + type = self.type - @classmethod - def from_dict(cls: Type[WH], src_dict: Dict[str, Any]) -> WH: - d = src_dict.copy() - _offset = d.pop("offset", UNSET) - offset: Union[Unset, Angle] - if isinstance(_offset, Unset): - offset = UNSET - else: - offset = _offset # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if offset is not UNSET: + field_dict["offset"] = offset + if radius is not UNSET: + field_dict["radius"] = radius + field_dict["type"] = type - radius = d.pop("radius", UNSET) + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[UY], src_dict: Dict[str, Any]) -> UY: + d = src_dict.copy() + _offset = d.pop("offset", UNSET) + offset: Union[Unset, Angle] + if isinstance(_offset, Unset): + offset = UNSET + else: + offset = _offset # type: ignore[arg-type] + radius = d.pop("radius", UNSET) - tangential_arc = cls( - offset= offset, - radius= radius, - type= type, - ) + type = d.pop("type", UNSET) - tangential_arc.additional_properties = d - return tangential_arc + tangential_arc = cls( + offset=offset, + radius=radius, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + tangential_arc.additional_properties = d + return tangential_arc - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +PD = TypeVar("PD", bound="tangential_arc_to") -DQ = TypeVar("DQ", bound="tangential_arc_to") @attr.s(auto_attribs=True) class tangential_arc_to: - """ Adds a tangent arc from current pen position to the new position. """ # noqa: E501 - angle_snap_increment: Union[Unset, Angle] = UNSET - to: Union[Unset, Point3d] = UNSET - type: str = "tangential_arc_to" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.angle_snap_increment, Unset): - angle_snap_increment = self.angle_snap_increment - if not isinstance(self.to, Unset): - to = self.to - type = self.type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if angle_snap_increment is not UNSET: - field_dict['angle_snap_increment'] = angle_snap_increment - if to is not UNSET: - field_dict['to'] = to - field_dict['type'] = type - - return field_dict - - @classmethod - def from_dict(cls: Type[DQ], src_dict: Dict[str, Any]) -> DQ: - d = src_dict.copy() - _angle_snap_increment = d.pop("angle_snap_increment", UNSET) - angle_snap_increment: Union[Unset, Angle] - if isinstance(_angle_snap_increment, Unset): - angle_snap_increment = UNSET - else: - angle_snap_increment = _angle_snap_increment # type: ignore[arg-type] - - _to = d.pop("to", UNSET) - to: Union[Unset, Point3d] - if isinstance(_to, Unset): - to = UNSET - else: - to = _to # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - - tangential_arc_to = cls( - angle_snap_increment= angle_snap_increment, - to= to, - type= type, - ) - - tangential_arc_to.additional_properties = d - return tangential_arc_to - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Adds a tangent arc from current pen position to the new position.""" # noqa: E501 + + angle_snap_increment: Union[Unset, Angle] = UNSET + to: Union[Unset, Point3d] = UNSET + type: str = "tangential_arc_to" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.angle_snap_increment, Unset): + angle_snap_increment = self.angle_snap_increment + if not isinstance(self.to, Unset): + to = self.to + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if angle_snap_increment is not UNSET: + field_dict["angle_snap_increment"] = angle_snap_increment + if to is not UNSET: + field_dict["to"] = to + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[PD], src_dict: Dict[str, Any]) -> PD: + d = src_dict.copy() + _angle_snap_increment = d.pop("angle_snap_increment", UNSET) + angle_snap_increment: Union[Unset, Angle] + if isinstance(_angle_snap_increment, Unset): + angle_snap_increment = UNSET + else: + angle_snap_increment = _angle_snap_increment # type: ignore[arg-type] + + _to = d.pop("to", UNSET) + to: Union[Unset, Point3d] + if isinstance(_to, Unset): + to = UNSET + else: + to = _to # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + tangential_arc_to = cls( + angle_snap_increment=angle_snap_increment, + to=to, + type=type, + ) + + tangential_arc_to.additional_properties = d + return tangential_arc_to + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + PathSegment = Union[line, arc, bezier, tangential_arc, tangential_arc_to] diff --git a/kittycad/models/path_segment_info.py b/kittycad/models/path_segment_info.py index 143823412..c71ac5e73 100644 --- a/kittycad/models/path_segment_info.py +++ b/kittycad/models/path_segment_info.py @@ -6,77 +6,78 @@ from ..models.path_command import PathCommand from ..types import UNSET, Unset -UY = TypeVar("UY", bound="PathSegmentInfo") +SM = TypeVar("SM", bound="PathSegmentInfo") + @attr.s(auto_attribs=True) class PathSegmentInfo: - """ Info about a path segment """ # noqa: E501 - command: Union[Unset, PathCommand] = UNSET - command_id: Union[Unset, ModelingCmdId] = UNSET - relative: Union[Unset, bool] = False - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.command, Unset): - command = self.command - if not isinstance(self.command_id, Unset): - command_id = self.command_id - relative = self.relative - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if command is not UNSET: - field_dict['command'] = command - if command_id is not UNSET: - field_dict['command_id'] = command_id - if relative is not UNSET: - field_dict['relative'] = relative - - return field_dict - - @classmethod - def from_dict(cls: Type[UY], src_dict: Dict[str, Any]) -> UY: - d = src_dict.copy() - _command = d.pop("command", UNSET) - command: Union[Unset, PathCommand] - if isinstance(_command, Unset): - command = UNSET - else: - command = _command # type: ignore[arg-type] - - _command_id = d.pop("command_id", UNSET) - command_id: Union[Unset, ModelingCmdId] - if isinstance(_command_id, Unset): - command_id = UNSET - else: - command_id = _command_id # type: ignore[arg-type] - - relative = d.pop("relative", UNSET) - - - path_segment_info = cls( - command= command, - command_id= command_id, - relative= relative, - ) - - path_segment_info.additional_properties = d - return path_segment_info - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Info about a path segment""" # noqa: E501 + + command: Union[Unset, PathCommand] = UNSET + command_id: Union[Unset, ModelingCmdId] = UNSET + relative: Union[Unset, bool] = False + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.command, Unset): + command = self.command + if not isinstance(self.command_id, Unset): + command_id = self.command_id + relative = self.relative + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if command is not UNSET: + field_dict["command"] = command + if command_id is not UNSET: + field_dict["command_id"] = command_id + if relative is not UNSET: + field_dict["relative"] = relative + + return field_dict + + @classmethod + def from_dict(cls: Type[SM], src_dict: Dict[str, Any]) -> SM: + d = src_dict.copy() + _command = d.pop("command", UNSET) + command: Union[Unset, PathCommand] + if isinstance(_command, Unset): + command = UNSET + else: + command = _command # type: ignore[arg-type] + + _command_id = d.pop("command_id", UNSET) + command_id: Union[Unset, ModelingCmdId] + if isinstance(_command_id, Unset): + command_id = UNSET + else: + command_id = _command_id # type: ignore[arg-type] + + relative = d.pop("relative", UNSET) + + path_segment_info = cls( + command=command, + command_id=command_id, + relative=relative, + ) + + path_segment_info.additional_properties = d + return path_segment_info + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/payment_intent.py b/kittycad/models/payment_intent.py index 9e7d52826..eca2686bb 100644 --- a/kittycad/models/payment_intent.py +++ b/kittycad/models/payment_intent.py @@ -4,51 +4,52 @@ from ..types import UNSET, Unset -PD = TypeVar("PD", bound="PaymentIntent") +JL = TypeVar("JL", bound="PaymentIntent") + @attr.s(auto_attribs=True) class PaymentIntent: - """ A payment intent response. """ # noqa: E501 - client_secret: Union[Unset, str] = UNSET + """A payment intent response.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + client_secret: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - client_secret = self.client_secret + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if client_secret is not UNSET: - field_dict['client_secret'] = client_secret + def to_dict(self) -> Dict[str, Any]: + client_secret = self.client_secret - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if client_secret is not UNSET: + field_dict["client_secret"] = client_secret - @classmethod - def from_dict(cls: Type[PD], src_dict: Dict[str, Any]) -> PD: - d = src_dict.copy() - client_secret = d.pop("client_secret", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[JL], src_dict: Dict[str, Any]) -> JL: + d = src_dict.copy() + client_secret = d.pop("client_secret", UNSET) - payment_intent = cls( - client_secret= client_secret, - ) + payment_intent = cls( + client_secret=client_secret, + ) - payment_intent.additional_properties = d - return payment_intent + payment_intent.additional_properties = d + return payment_intent - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/payment_method.py b/kittycad/models/payment_method.py index 68d925d11..83f54c558 100644 --- a/kittycad/models/payment_method.py +++ b/kittycad/models/payment_method.py @@ -9,112 +9,113 @@ from ..models.payment_method_type import PaymentMethodType from ..types import UNSET, Unset -SM = TypeVar("SM", bound="PaymentMethod") +CG = TypeVar("CG", bound="PaymentMethod") + @attr.s(auto_attribs=True) class PaymentMethod: - """ A payment method. """ # noqa: E501 - billing_info: Union[Unset, BillingInfo] = UNSET - card: Union[Unset, CardDetails] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - id: Union[Unset, str] = UNSET - metadata: Union[Unset, Dict[str, str]] = UNSET - type: Union[Unset, PaymentMethodType] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.billing_info, Unset): - billing_info = self.billing_info - if not isinstance(self.card, Unset): - card = self.card - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - id = self.id - metadata = self.metadata - - if not isinstance(self.type, Unset): - type = self.type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if billing_info is not UNSET: - field_dict['billing_info'] = billing_info - if card is not UNSET: - field_dict['card'] = card - if created_at is not UNSET: - field_dict['created_at'] = created_at - if id is not UNSET: - field_dict['id'] = id - if metadata is not UNSET: - field_dict['metadata'] = metadata - if type is not UNSET: - field_dict['type'] = type - - return field_dict - - @classmethod - def from_dict(cls: Type[SM], src_dict: Dict[str, Any]) -> SM: - d = src_dict.copy() - _billing_info = d.pop("billing_info", UNSET) - billing_info: Union[Unset, BillingInfo] - if isinstance(_billing_info, Unset): - billing_info = UNSET - else: - billing_info = _billing_info # type: ignore[arg-type] - - _card = d.pop("card", UNSET) - card: Union[Unset, CardDetails] - if isinstance(_card, Unset): - card = UNSET - else: - card = _card # type: ignore[arg-type] - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - id = d.pop("id", UNSET) - - metadata = d.pop("metadata", UNSET) - - _type = d.pop("type", UNSET) - type: Union[Unset, PaymentMethodType] - if isinstance(_type, Unset): - type = UNSET - else: - type = _type # type: ignore[arg-type] - - - payment_method = cls( - billing_info= billing_info, - card= card, - created_at= created_at, - id= id, - metadata= metadata, - type= type, - ) - - payment_method.additional_properties = d - return payment_method - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """A payment method.""" # noqa: E501 + + billing_info: Union[Unset, BillingInfo] = UNSET + card: Union[Unset, CardDetails] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + metadata: Union[Unset, Dict[str, str]] = UNSET + type: Union[Unset, PaymentMethodType] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.billing_info, Unset): + billing_info = self.billing_info + if not isinstance(self.card, Unset): + card = self.card + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + id = self.id + metadata = self.metadata + + if not isinstance(self.type, Unset): + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if billing_info is not UNSET: + field_dict["billing_info"] = billing_info + if card is not UNSET: + field_dict["card"] = card + if created_at is not UNSET: + field_dict["created_at"] = created_at + if id is not UNSET: + field_dict["id"] = id + if metadata is not UNSET: + field_dict["metadata"] = metadata + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[CG], src_dict: Dict[str, Any]) -> CG: + d = src_dict.copy() + _billing_info = d.pop("billing_info", UNSET) + billing_info: Union[Unset, BillingInfo] + if isinstance(_billing_info, Unset): + billing_info = UNSET + else: + billing_info = _billing_info # type: ignore[arg-type] + + _card = d.pop("card", UNSET) + card: Union[Unset, CardDetails] + if isinstance(_card, Unset): + card = UNSET + else: + card = _card # type: ignore[arg-type] + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + id = d.pop("id", UNSET) + + metadata = d.pop("metadata", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, PaymentMethodType] + if isinstance(_type, Unset): + type = UNSET + else: + type = _type # type: ignore[arg-type] + + payment_method = cls( + billing_info=billing_info, + card=card, + created_at=created_at, + id=id, + metadata=metadata, + type=type, + ) + + payment_method.additional_properties = d + return payment_method + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/payment_method_card_checks.py b/kittycad/models/payment_method_card_checks.py index 584c69d21..ae1e8b7e4 100644 --- a/kittycad/models/payment_method_card_checks.py +++ b/kittycad/models/payment_method_card_checks.py @@ -4,65 +4,66 @@ from ..types import UNSET, Unset -JL = TypeVar("JL", bound="PaymentMethodCardChecks") +QA = TypeVar("QA", bound="PaymentMethodCardChecks") + @attr.s(auto_attribs=True) class PaymentMethodCardChecks: - """ Card checks. """ # noqa: E501 - address_line1_check: Union[Unset, str] = UNSET - address_postal_code_check: Union[Unset, str] = UNSET - cvc_check: Union[Unset, str] = UNSET + """Card checks.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + address_line1_check: Union[Unset, str] = UNSET + address_postal_code_check: Union[Unset, str] = UNSET + cvc_check: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - address_line1_check = self.address_line1_check - address_postal_code_check = self.address_postal_code_check - cvc_check = self.cvc_check + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if address_line1_check is not UNSET: - field_dict['address_line1_check'] = address_line1_check - if address_postal_code_check is not UNSET: - field_dict['address_postal_code_check'] = address_postal_code_check - if cvc_check is not UNSET: - field_dict['cvc_check'] = cvc_check + def to_dict(self) -> Dict[str, Any]: + address_line1_check = self.address_line1_check + address_postal_code_check = self.address_postal_code_check + cvc_check = self.cvc_check - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address_line1_check is not UNSET: + field_dict["address_line1_check"] = address_line1_check + if address_postal_code_check is not UNSET: + field_dict["address_postal_code_check"] = address_postal_code_check + if cvc_check is not UNSET: + field_dict["cvc_check"] = cvc_check - @classmethod - def from_dict(cls: Type[JL], src_dict: Dict[str, Any]) -> JL: - d = src_dict.copy() - address_line1_check = d.pop("address_line1_check", UNSET) + return field_dict - address_postal_code_check = d.pop("address_postal_code_check", UNSET) + @classmethod + def from_dict(cls: Type[QA], src_dict: Dict[str, Any]) -> QA: + d = src_dict.copy() + address_line1_check = d.pop("address_line1_check", UNSET) - cvc_check = d.pop("cvc_check", UNSET) + address_postal_code_check = d.pop("address_postal_code_check", UNSET) + cvc_check = d.pop("cvc_check", UNSET) - payment_method_card_checks = cls( - address_line1_check= address_line1_check, - address_postal_code_check= address_postal_code_check, - cvc_check= cvc_check, - ) + payment_method_card_checks = cls( + address_line1_check=address_line1_check, + address_postal_code_check=address_postal_code_check, + cvc_check=cvc_check, + ) - payment_method_card_checks.additional_properties = d - return payment_method_card_checks + payment_method_card_checks.additional_properties = d + return payment_method_card_checks - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/payment_method_type.py b/kittycad/models/payment_method_type.py index ec74e722f..42ecce2dd 100644 --- a/kittycad/models/payment_method_type.py +++ b/kittycad/models/payment_method_type.py @@ -2,9 +2,10 @@ class PaymentMethodType(str, Enum): - """ An enum representing the possible values of an `PaymentMethod`'s `type` field. """ # noqa: E501 - """# A card payment method. """ # noqa: E501 - CARD = 'card' + """An enum representing the possible values of an `PaymentMethod`'s `type` field.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# A card payment method. """ # noqa: E501 + CARD = "card" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/plane_intersect_and_project.py b/kittycad/models/plane_intersect_and_project.py index 3b21b1e34..394050f08 100644 --- a/kittycad/models/plane_intersect_and_project.py +++ b/kittycad/models/plane_intersect_and_project.py @@ -5,57 +5,58 @@ from ..models.point2d import Point2d from ..types import UNSET, Unset -CG = TypeVar("CG", bound="PlaneIntersectAndProject") +ZB = TypeVar("ZB", bound="PlaneIntersectAndProject") + @attr.s(auto_attribs=True) class PlaneIntersectAndProject: - """ Corresponding coordinates of given window coordinates, intersected on given plane. """ # noqa: E501 - plane_coordinates: Union[Unset, Point2d] = UNSET + """Corresponding coordinates of given window coordinates, intersected on given plane.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + plane_coordinates: Union[Unset, Point2d] = UNSET - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.plane_coordinates, Unset): - plane_coordinates = self.plane_coordinates + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if plane_coordinates is not UNSET: - field_dict['plane_coordinates'] = plane_coordinates + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.plane_coordinates, Unset): + plane_coordinates = self.plane_coordinates - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plane_coordinates is not UNSET: + field_dict["plane_coordinates"] = plane_coordinates - @classmethod - def from_dict(cls: Type[CG], src_dict: Dict[str, Any]) -> CG: - d = src_dict.copy() - _plane_coordinates = d.pop("plane_coordinates", UNSET) - plane_coordinates: Union[Unset, Point2d] - if isinstance(_plane_coordinates, Unset): - plane_coordinates = UNSET - else: - plane_coordinates = _plane_coordinates # type: ignore[arg-type] + return field_dict + @classmethod + def from_dict(cls: Type[ZB], src_dict: Dict[str, Any]) -> ZB: + d = src_dict.copy() + _plane_coordinates = d.pop("plane_coordinates", UNSET) + plane_coordinates: Union[Unset, Point2d] + if isinstance(_plane_coordinates, Unset): + plane_coordinates = UNSET + else: + plane_coordinates = _plane_coordinates # type: ignore[arg-type] - plane_intersect_and_project = cls( - plane_coordinates= plane_coordinates, - ) + plane_intersect_and_project = cls( + plane_coordinates=plane_coordinates, + ) - plane_intersect_and_project.additional_properties = d - return plane_intersect_and_project + plane_intersect_and_project.additional_properties = d + return plane_intersect_and_project - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/ply_storage.py b/kittycad/models/ply_storage.py index 8bf73b8a7..7c48b864d 100644 --- a/kittycad/models/ply_storage.py +++ b/kittycad/models/ply_storage.py @@ -2,13 +2,14 @@ class PlyStorage(str, Enum): - """ The storage for the output PLY file. """ # noqa: E501 - """# Write numbers in their ascii representation (e.g. -13, 6.28, etc.). Properties are separated by spaces and elements are separated by line breaks. """ # noqa: E501 - ASCII = 'ascii' - """# Encode payload as binary using little endian. """ # noqa: E501 - BINARY_LITTLE_ENDIAN = 'binary_little_endian' - """# Encode payload as binary using big endian. """ # noqa: E501 - BINARY_BIG_ENDIAN = 'binary_big_endian' - - def __str__(self) -> str: - return str(self.value) + """The storage for the output PLY file.""" # noqa: E501 + + """# Write numbers in their ascii representation (e.g. -13, 6.28, etc.). Properties are separated by spaces and elements are separated by line breaks. """ # noqa: E501 + ASCII = "ascii" + """# Encode payload as binary using little endian. """ # noqa: E501 + BINARY_LITTLE_ENDIAN = "binary_little_endian" + """# Encode payload as binary using big endian. """ # noqa: E501 + BINARY_BIG_ENDIAN = "binary_big_endian" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/point2d.py b/kittycad/models/point2d.py index a8ddc57d9..de3899a83 100644 --- a/kittycad/models/point2d.py +++ b/kittycad/models/point2d.py @@ -4,58 +4,59 @@ from ..types import UNSET, Unset -QA = TypeVar("QA", bound="Point2d") +AU = TypeVar("AU", bound="Point2d") + @attr.s(auto_attribs=True) class Point2d: - """ A point in 2D space """ # noqa: E501 - x: Union[Unset, float] = UNSET - y: Union[Unset, float] = UNSET + """A point in 2D space""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + x: Union[Unset, float] = UNSET + y: Union[Unset, float] = UNSET - def to_dict(self) -> Dict[str, Any]: - x = self.x - y = self.y + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if x is not UNSET: - field_dict['x'] = x - if y is not UNSET: - field_dict['y'] = y + def to_dict(self) -> Dict[str, Any]: + x = self.x + y = self.y - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if x is not UNSET: + field_dict["x"] = x + if y is not UNSET: + field_dict["y"] = y - @classmethod - def from_dict(cls: Type[QA], src_dict: Dict[str, Any]) -> QA: - d = src_dict.copy() - x = d.pop("x", UNSET) + return field_dict - y = d.pop("y", UNSET) + @classmethod + def from_dict(cls: Type[AU], src_dict: Dict[str, Any]) -> AU: + d = src_dict.copy() + x = d.pop("x", UNSET) + y = d.pop("y", UNSET) - point2d = cls( - x= x, - y= y, - ) + point2d = cls( + x=x, + y=y, + ) - point2d.additional_properties = d - return point2d + point2d.additional_properties = d + return point2d - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/point3d.py b/kittycad/models/point3d.py index 826e3abe7..1046eaba3 100644 --- a/kittycad/models/point3d.py +++ b/kittycad/models/point3d.py @@ -4,65 +4,66 @@ from ..types import UNSET, Unset -ZB = TypeVar("ZB", bound="Point3d") +FX = TypeVar("FX", bound="Point3d") + @attr.s(auto_attribs=True) class Point3d: - """ A point in 3D space """ # noqa: E501 - x: Union[Unset, float] = UNSET - y: Union[Unset, float] = UNSET - z: Union[Unset, float] = UNSET + """A point in 3D space""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + x: Union[Unset, float] = UNSET + y: Union[Unset, float] = UNSET + z: Union[Unset, float] = UNSET - def to_dict(self) -> Dict[str, Any]: - x = self.x - y = self.y - z = self.z + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if x is not UNSET: - field_dict['x'] = x - if y is not UNSET: - field_dict['y'] = y - if z is not UNSET: - field_dict['z'] = z + def to_dict(self) -> Dict[str, Any]: + x = self.x + y = self.y + z = self.z - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if x is not UNSET: + field_dict["x"] = x + if y is not UNSET: + field_dict["y"] = y + if z is not UNSET: + field_dict["z"] = z - @classmethod - def from_dict(cls: Type[ZB], src_dict: Dict[str, Any]) -> ZB: - d = src_dict.copy() - x = d.pop("x", UNSET) + return field_dict - y = d.pop("y", UNSET) + @classmethod + def from_dict(cls: Type[FX], src_dict: Dict[str, Any]) -> FX: + d = src_dict.copy() + x = d.pop("x", UNSET) - z = d.pop("z", UNSET) + y = d.pop("y", UNSET) + z = d.pop("z", UNSET) - point3d = cls( - x= x, - y= y, - z= z, - ) + point3d = cls( + x=x, + y=y, + z=z, + ) - point3d.additional_properties = d - return point3d + point3d.additional_properties = d + return point3d - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/pong.py b/kittycad/models/pong.py index ba8402eab..49982951d 100644 --- a/kittycad/models/pong.py +++ b/kittycad/models/pong.py @@ -4,51 +4,52 @@ from ..types import UNSET, Unset -AU = TypeVar("AU", bound="Pong") +BL = TypeVar("BL", bound="Pong") + @attr.s(auto_attribs=True) class Pong: - """ The response from the `/ping` endpoint. """ # noqa: E501 - message: Union[Unset, str] = UNSET + """The response from the `/ping` endpoint.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + message: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - message = self.message + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if message is not UNSET: - field_dict['message'] = message + def to_dict(self) -> Dict[str, Any]: + message = self.message - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict["message"] = message - @classmethod - def from_dict(cls: Type[AU], src_dict: Dict[str, Any]) -> AU: - d = src_dict.copy() - message = d.pop("message", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[BL], src_dict: Dict[str, Any]) -> BL: + d = src_dict.copy() + message = d.pop("message", UNSET) - pong = cls( - message= message, - ) + pong = cls( + message=message, + ) - pong.additional_properties = d - return pong + pong.additional_properties = d + return pong - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/raw_file.py b/kittycad/models/raw_file.py index f38764831..c9946ada6 100644 --- a/kittycad/models/raw_file.py +++ b/kittycad/models/raw_file.py @@ -4,60 +4,61 @@ from ..types import UNSET, Unset -FX = TypeVar("FX", bound="RawFile") +KU = TypeVar("KU", bound="RawFile") + @attr.s(auto_attribs=True) class RawFile: - """ A raw file with unencoded contents to be passed over binary websockets. """ # noqa: E501 - contents: Union[Unset, List[int]] = UNSET - name: Union[Unset, str] = UNSET + """A raw file with unencoded contents to be passed over binary websockets.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + contents: Union[Unset, List[int]] = UNSET + name: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - contents: Union[Unset, List[int]] = UNSET - if not isinstance(self.contents, Unset): - contents = self.contents - name = self.name + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if contents is not UNSET: - field_dict['contents'] = contents - if name is not UNSET: - field_dict['name'] = name + def to_dict(self) -> Dict[str, Any]: + contents: Union[Unset, List[int]] = UNSET + if not isinstance(self.contents, Unset): + contents = self.contents + name = self.name - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contents is not UNSET: + field_dict["contents"] = contents + if name is not UNSET: + field_dict["name"] = name - @classmethod - def from_dict(cls: Type[FX], src_dict: Dict[str, Any]) -> FX: - d = src_dict.copy() - contents = cast(List[int], d.pop("contents", UNSET)) + return field_dict - name = d.pop("name", UNSET) + @classmethod + def from_dict(cls: Type[KU], src_dict: Dict[str, Any]) -> KU: + d = src_dict.copy() + contents = cast(List[int], d.pop("contents", UNSET)) + name = d.pop("name", UNSET) - raw_file = cls( - contents= contents, - name= name, - ) + raw_file = cls( + contents=contents, + name=name, + ) - raw_file.additional_properties = d - return raw_file + raw_file.additional_properties = d + return raw_file - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/rtc_ice_candidate_init.py b/kittycad/models/rtc_ice_candidate_init.py index 30fba832b..f46d18f53 100644 --- a/kittycad/models/rtc_ice_candidate_init.py +++ b/kittycad/models/rtc_ice_candidate_init.py @@ -4,72 +4,73 @@ from ..types import UNSET, Unset -BL = TypeVar("BL", bound="RtcIceCandidateInit") +PZ = TypeVar("PZ", bound="RtcIceCandidateInit") + @attr.s(auto_attribs=True) class RtcIceCandidateInit: - """ ICECandidateInit is used to serialize ice candidates """ # noqa: E501 - candidate: Union[Unset, str] = UNSET - sdp_m_line_index: Union[Unset, int] = UNSET - sdp_mid: Union[Unset, str] = UNSET - username_fragment: Union[Unset, str] = UNSET + """ICECandidateInit is used to serialize ice candidates""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + candidate: Union[Unset, str] = UNSET + sdp_m_line_index: Union[Unset, int] = UNSET + sdp_mid: Union[Unset, str] = UNSET + username_fragment: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - candidate = self.candidate - sdp_m_line_index = self.sdp_m_line_index - sdp_mid = self.sdp_mid - username_fragment = self.username_fragment + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if candidate is not UNSET: - field_dict['candidate'] = candidate - if sdp_m_line_index is not UNSET: - field_dict['sdpMLineIndex'] = sdp_m_line_index - if sdp_mid is not UNSET: - field_dict['sdpMid'] = sdp_mid - if username_fragment is not UNSET: - field_dict['usernameFragment'] = username_fragment + def to_dict(self) -> Dict[str, Any]: + candidate = self.candidate + sdp_m_line_index = self.sdp_m_line_index + sdp_mid = self.sdp_mid + username_fragment = self.username_fragment - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if candidate is not UNSET: + field_dict["candidate"] = candidate + if sdp_m_line_index is not UNSET: + field_dict["sdpMLineIndex"] = sdp_m_line_index + if sdp_mid is not UNSET: + field_dict["sdpMid"] = sdp_mid + if username_fragment is not UNSET: + field_dict["usernameFragment"] = username_fragment - @classmethod - def from_dict(cls: Type[BL], src_dict: Dict[str, Any]) -> BL: - d = src_dict.copy() - candidate = d.pop("candidate", UNSET) + return field_dict - sdp_m_line_index = d.pop("sdpMLineIndex", UNSET) + @classmethod + def from_dict(cls: Type[PZ], src_dict: Dict[str, Any]) -> PZ: + d = src_dict.copy() + candidate = d.pop("candidate", UNSET) - sdp_mid = d.pop("sdpMid", UNSET) + sdp_m_line_index = d.pop("sdpMLineIndex", UNSET) - username_fragment = d.pop("usernameFragment", UNSET) + sdp_mid = d.pop("sdpMid", UNSET) + username_fragment = d.pop("usernameFragment", UNSET) - rtc_ice_candidate_init = cls( - candidate= candidate, - sdp_m_line_index= sdp_m_line_index, - sdp_mid= sdp_mid, - username_fragment= username_fragment, - ) + rtc_ice_candidate_init = cls( + candidate=candidate, + sdp_m_line_index=sdp_m_line_index, + sdp_mid=sdp_mid, + username_fragment=username_fragment, + ) - rtc_ice_candidate_init.additional_properties = d - return rtc_ice_candidate_init + rtc_ice_candidate_init.additional_properties = d + return rtc_ice_candidate_init - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/rtc_sdp_type.py b/kittycad/models/rtc_sdp_type.py index 3035291ad..d8f67675c 100644 --- a/kittycad/models/rtc_sdp_type.py +++ b/kittycad/models/rtc_sdp_type.py @@ -2,17 +2,18 @@ class RtcSdpType(str, Enum): - """ SDPType describes the type of an SessionDescription. """ # noqa: E501 - """# Unspecified indicates that the type is unspecified. """ # noqa: E501 - UNSPECIFIED = 'unspecified' - """# indicates that a description MUST be treated as an SDP offer. """ # noqa: E501 - OFFER = 'offer' - """# indicates that a description MUST be treated as an SDP answer, but not a final answer. A description used as an SDP pranswer may be applied as a response to an SDP offer, or an update to a previously sent SDP pranswer. """ # noqa: E501 - PRANSWER = 'pranswer' - """# indicates that a description MUST be treated as an SDP final answer, and the offer-answer exchange MUST be considered complete. A description used as an SDP answer may be applied as a response to an SDP offer or as an update to a previously sent SDP pranswer. """ # noqa: E501 - ANSWER = 'answer' - """# indicates that a description MUST be treated as canceling the current SDP negotiation and moving the SDP offer and answer back to what it was in the previous stable state. Note the local or remote SDP descriptions in the previous stable state could be null if there has not yet been a successful offer-answer negotiation. """ # noqa: E501 - ROLLBACK = 'rollback' + """SDPType describes the type of an SessionDescription.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# Unspecified indicates that the type is unspecified. """ # noqa: E501 + UNSPECIFIED = "unspecified" + """# indicates that a description MUST be treated as an SDP offer. """ # noqa: E501 + OFFER = "offer" + """# indicates that a description MUST be treated as an SDP answer, but not a final answer. A description used as an SDP pranswer may be applied as a response to an SDP offer, or an update to a previously sent SDP pranswer. """ # noqa: E501 + PRANSWER = "pranswer" + """# indicates that a description MUST be treated as an SDP final answer, and the offer-answer exchange MUST be considered complete. A description used as an SDP answer may be applied as a response to an SDP offer or as an update to a previously sent SDP pranswer. """ # noqa: E501 + ANSWER = "answer" + """# indicates that a description MUST be treated as canceling the current SDP negotiation and moving the SDP offer and answer back to what it was in the previous stable state. Note the local or remote SDP descriptions in the previous stable state could be null if there has not yet been a successful offer-answer negotiation. """ # noqa: E501 + ROLLBACK = "rollback" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/rtc_session_description.py b/kittycad/models/rtc_session_description.py index cc1d28375..8cc81a671 100644 --- a/kittycad/models/rtc_session_description.py +++ b/kittycad/models/rtc_session_description.py @@ -5,64 +5,65 @@ from ..models.rtc_sdp_type import RtcSdpType from ..types import UNSET, Unset -KU = TypeVar("KU", bound="RtcSessionDescription") +FA = TypeVar("FA", bound="RtcSessionDescription") + @attr.s(auto_attribs=True) class RtcSessionDescription: - """ SessionDescription is used to expose local and remote session descriptions. """ # noqa: E501 - sdp: Union[Unset, str] = UNSET - type: Union[Unset, RtcSdpType] = UNSET + """SessionDescription is used to expose local and remote session descriptions.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + sdp: Union[Unset, str] = UNSET + type: Union[Unset, RtcSdpType] = UNSET - def to_dict(self) -> Dict[str, Any]: - sdp = self.sdp - if not isinstance(self.type, Unset): - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if sdp is not UNSET: - field_dict['sdp'] = sdp - if type is not UNSET: - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + sdp = self.sdp + if not isinstance(self.type, Unset): + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if sdp is not UNSET: + field_dict["sdp"] = sdp + if type is not UNSET: + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[KU], src_dict: Dict[str, Any]) -> KU: - d = src_dict.copy() - sdp = d.pop("sdp", UNSET) + return field_dict - _type = d.pop("type", UNSET) - type: Union[Unset, RtcSdpType] - if isinstance(_type, Unset): - type = UNSET - else: - type = _type # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[FA], src_dict: Dict[str, Any]) -> FA: + d = src_dict.copy() + sdp = d.pop("sdp", UNSET) + _type = d.pop("type", UNSET) + type: Union[Unset, RtcSdpType] + if isinstance(_type, Unset): + type = UNSET + else: + type = _type # type: ignore[arg-type] - rtc_session_description = cls( - sdp= sdp, - type= type, - ) + rtc_session_description = cls( + sdp=sdp, + type=type, + ) - rtc_session_description.additional_properties = d - return rtc_session_description + rtc_session_description.additional_properties = d + return rtc_session_description - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/scene_selection_type.py b/kittycad/models/scene_selection_type.py index bb177d028..a4e705295 100644 --- a/kittycad/models/scene_selection_type.py +++ b/kittycad/models/scene_selection_type.py @@ -2,13 +2,14 @@ class SceneSelectionType(str, Enum): - """ The type of scene selection change """ # noqa: E501 - """# Replaces the selection """ # noqa: E501 - REPLACE = 'replace' - """# Adds to the selection """ # noqa: E501 - ADD = 'add' - """# Removes from the selection """ # noqa: E501 - REMOVE = 'remove' - - def __str__(self) -> str: - return str(self.value) + """The type of scene selection change""" # noqa: E501 + + """# Replaces the selection """ # noqa: E501 + REPLACE = "replace" + """# Adds to the selection """ # noqa: E501 + ADD = "add" + """# Removes from the selection """ # noqa: E501 + REMOVE = "remove" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/scene_tool_type.py b/kittycad/models/scene_tool_type.py index 7b0ae3769..c6c119c9d 100644 --- a/kittycad/models/scene_tool_type.py +++ b/kittycad/models/scene_tool_type.py @@ -2,14 +2,15 @@ class SceneToolType(str, Enum): - """ The type of scene's active tool """ # noqa: E501 - CAMERA_REVOLVE = 'camera_revolve' - SELECT = 'select' - MOVE = 'move' - SKETCH_LINE = 'sketch_line' - SKETCH_TANGENTIAL_ARC = 'sketch_tangential_arc' - SKETCH_CURVE = 'sketch_curve' - SKETCH_CURVE_MOD = 'sketch_curve_mod' - - def __str__(self) -> str: - return str(self.value) + """The type of scene's active tool""" # noqa: E501 + + CAMERA_REVOLVE = "camera_revolve" + SELECT = "select" + MOVE = "move" + SKETCH_LINE = "sketch_line" + SKETCH_TANGENTIAL_ARC = "sketch_tangential_arc" + SKETCH_CURVE = "sketch_curve" + SKETCH_CURVE_MOD = "sketch_curve_mod" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/select_get.py b/kittycad/models/select_get.py index 22c000729..47f99236f 100644 --- a/kittycad/models/select_get.py +++ b/kittycad/models/select_get.py @@ -4,53 +4,54 @@ from ..types import UNSET, Unset -PZ = TypeVar("PZ", bound="SelectGet") +GE = TypeVar("GE", bound="SelectGet") + @attr.s(auto_attribs=True) class SelectGet: - """ The response from the `SelectGet` command. """ # noqa: E501 - entity_ids: Union[Unset, List[str]] = UNSET + """The response from the `SelectGet` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + entity_ids: Union[Unset, List[str]] = UNSET - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict['entity_ids'] = entity_ids + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict["entity_ids"] = entity_ids - @classmethod - def from_dict(cls: Type[PZ], src_dict: Dict[str, Any]) -> PZ: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + return field_dict + @classmethod + def from_dict(cls: Type[GE], src_dict: Dict[str, Any]) -> GE: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - select_get = cls( - entity_ids= entity_ids, - ) + select_get = cls( + entity_ids=entity_ids, + ) - select_get.additional_properties = d - return select_get + select_get.additional_properties = d + return select_get - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/select_with_point.py b/kittycad/models/select_with_point.py index 5cfbaa7d1..1e1e28499 100644 --- a/kittycad/models/select_with_point.py +++ b/kittycad/models/select_with_point.py @@ -4,51 +4,52 @@ from ..types import UNSET, Unset -FA = TypeVar("FA", bound="SelectWithPoint") +JG = TypeVar("JG", bound="SelectWithPoint") + @attr.s(auto_attribs=True) class SelectWithPoint: - """ The response from the `SelectWithPoint` command. """ # noqa: E501 - entity_id: Union[Unset, str] = UNSET + """The response from the `SelectWithPoint` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + entity_id: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict['entity_id'] = entity_id + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id - @classmethod - def from_dict(cls: Type[FA], src_dict: Dict[str, Any]) -> FA: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[JG], src_dict: Dict[str, Any]) -> JG: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) - select_with_point = cls( - entity_id= entity_id, - ) + select_with_point = cls( + entity_id=entity_id, + ) - select_with_point.additional_properties = d - return select_with_point + select_with_point.additional_properties = d + return select_with_point - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/selection.py b/kittycad/models/selection.py new file mode 100644 index 000000000..d98a76265 --- /dev/null +++ b/kittycad/models/selection.py @@ -0,0 +1,287 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +HH = TypeVar("HH", bound="default_scene") + + +@attr.s(auto_attribs=True) +class default_scene: + """Visit the default scene.""" # noqa: E501 + + type: str = "default_scene" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[HH], src_dict: Dict[str, Any]) -> HH: + d = src_dict.copy() + type = d.pop("type", UNSET) + + default_scene = cls( + type=type, + ) + + default_scene.additional_properties = d + return default_scene + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +RY = TypeVar("RY", bound="scene_by_index") + + +@attr.s(auto_attribs=True) +class scene_by_index: + """Visit the indexed scene.""" # noqa: E501 + + index: Union[Unset, int] = UNSET + type: str = "scene_by_index" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[RY], src_dict: Dict[str, Any]) -> RY: + d = src_dict.copy() + index = d.pop("index", UNSET) + + type = d.pop("type", UNSET) + + scene_by_index = cls( + index=index, + type=type, + ) + + scene_by_index.additional_properties = d + return scene_by_index + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +AE = TypeVar("AE", bound="scene_by_name") + + +@attr.s(auto_attribs=True) +class scene_by_name: + """Visit the first scene with the given name.""" # noqa: E501 + + name: Union[Unset, str] = UNSET + type: str = "scene_by_name" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[AE], src_dict: Dict[str, Any]) -> AE: + d = src_dict.copy() + name = d.pop("name", UNSET) + + type = d.pop("type", UNSET) + + scene_by_name = cls( + name=name, + type=type, + ) + + scene_by_name.additional_properties = d + return scene_by_name + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +AD = TypeVar("AD", bound="mesh_by_index") + + +@attr.s(auto_attribs=True) +class mesh_by_index: + """Visit the indexed mesh.""" # noqa: E501 + + index: Union[Unset, int] = UNSET + type: str = "mesh_by_index" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + index = self.index + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if index is not UNSET: + field_dict["index"] = index + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[AD], src_dict: Dict[str, Any]) -> AD: + d = src_dict.copy() + index = d.pop("index", UNSET) + + type = d.pop("type", UNSET) + + mesh_by_index = cls( + index=index, + type=type, + ) + + mesh_by_index.additional_properties = d + return mesh_by_index + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +AB = TypeVar("AB", bound="mesh_by_name") + + +@attr.s(auto_attribs=True) +class mesh_by_name: + """Visit the first mesh with the given name.""" # noqa: E501 + + name: Union[Unset, str] = UNSET + type: str = "mesh_by_name" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[AB], src_dict: Dict[str, Any]) -> AB: + d = src_dict.copy() + name = d.pop("name", UNSET) + + type = d.pop("type", UNSET) + + mesh_by_name = cls( + name=name, + type=type, + ) + + mesh_by_name.additional_properties = d + return mesh_by_name + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +Selection = Union[ + default_scene, scene_by_index, scene_by_name, mesh_by_index, mesh_by_name +] diff --git a/kittycad/models/session.py b/kittycad/models/session.py index 598f2f4a2..45dc9ca2f 100644 --- a/kittycad/models/session.py +++ b/kittycad/models/session.py @@ -7,114 +7,125 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -GE = TypeVar("GE", bound="Session") +VY = TypeVar("VY", bound="Session") + @attr.s(auto_attribs=True) class Session: - """ An authentication session. - -For our UIs, these are automatically created by Next.js. """ # noqa: E501 - created_at: Union[Unset, datetime.datetime] = UNSET - expires: Union[Unset, datetime.datetime] = UNSET - id: Union[Unset, str] = UNSET - session_token: Union[Unset, str] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - expires: Union[Unset, str] = UNSET - if not isinstance(self.expires, Unset): - expires = self.expires.isoformat() - id = self.id - session_token = self.session_token - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict['created_at'] = created_at - if expires is not UNSET: - field_dict['expires'] = expires - if id is not UNSET: - field_dict['id'] = id - if session_token is not UNSET: - field_dict['session_token'] = session_token - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[GE], src_dict: Dict[str, Any]) -> GE: - d = src_dict.copy() - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - _expires = d.pop("expires", UNSET) - expires: Union[Unset, datetime.datetime] - if isinstance(_expires, Unset): - expires = UNSET - else: - expires = isoparse(_expires) - - id = d.pop("id", UNSET) - - _session_token = d.pop("session_token", UNSET) - session_token: Union[Unset, Uuid] - if isinstance(_session_token, Unset): - session_token = UNSET - else: - session_token = _session_token # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - session = cls( - created_at= created_at, - expires= expires, - id= id, - session_token= session_token, - updated_at= updated_at, - user_id= user_id, - ) - - session.additional_properties = d - return session - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """An authentication session. + + For our UIs, these are automatically created by Next.js.""" # noqa: E501 + + created_at: Union[Unset, datetime.datetime] = UNSET + expires: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + session_token: Union[Unset, str] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + expires: Union[Unset, str] = UNSET + if not isinstance(self.expires, Unset): + expires = self.expires.isoformat() + id = self.id + session_token = self.session_token + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if expires is not UNSET: + field_dict["expires"] = expires + if id is not UNSET: + field_dict["id"] = id + if session_token is not UNSET: + field_dict["session_token"] = session_token + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[VY], src_dict: Dict[str, Any]) -> VY: + d = src_dict.copy() + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _expires = d.pop("expires", UNSET) + expires: Union[Unset, datetime.datetime] + if isinstance(_expires, Unset): + expires = UNSET + else: + expires = isoparse(_expires) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + _session_token = d.pop("session_token", UNSET) + session_token: Union[Unset, Uuid] + if isinstance(_session_token, Unset): + session_token = UNSET + else: + session_token = _session_token # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + session = cls( + created_at=created_at, + expires=expires, + id=id, + session_token=session_token, + updated_at=updated_at, + user_id=user_id, + ) + + session.additional_properties = d + return session + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/solid3d_get_all_edge_faces.py b/kittycad/models/solid3d_get_all_edge_faces.py index 6aae4234c..b2e20e46c 100644 --- a/kittycad/models/solid3d_get_all_edge_faces.py +++ b/kittycad/models/solid3d_get_all_edge_faces.py @@ -4,53 +4,54 @@ from ..types import UNSET, Unset -JG = TypeVar("JG", bound="Solid3dGetAllEdgeFaces") +DW = TypeVar("DW", bound="Solid3dGetAllEdgeFaces") + @attr.s(auto_attribs=True) class Solid3dGetAllEdgeFaces: - """ The response from the `Solid3dGetAllEdgeFaces` command. """ # noqa: E501 - faces: Union[Unset, List[str]] = UNSET + """The response from the `Solid3dGetAllEdgeFaces` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + faces: Union[Unset, List[str]] = UNSET - def to_dict(self) -> Dict[str, Any]: - faces: Union[Unset, List[str]] = UNSET - if not isinstance(self.faces, Unset): - faces = self.faces + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if faces is not UNSET: - field_dict['faces'] = faces + def to_dict(self) -> Dict[str, Any]: + faces: Union[Unset, List[str]] = UNSET + if not isinstance(self.faces, Unset): + faces = self.faces - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if faces is not UNSET: + field_dict["faces"] = faces - @classmethod - def from_dict(cls: Type[JG], src_dict: Dict[str, Any]) -> JG: - d = src_dict.copy() - faces = cast(List[str], d.pop("faces", UNSET)) + return field_dict + @classmethod + def from_dict(cls: Type[DW], src_dict: Dict[str, Any]) -> DW: + d = src_dict.copy() + faces = cast(List[str], d.pop("faces", UNSET)) - solid3d_get_all_edge_faces = cls( - faces= faces, - ) + solid3d_get_all_edge_faces = cls( + faces=faces, + ) - solid3d_get_all_edge_faces.additional_properties = d - return solid3d_get_all_edge_faces + solid3d_get_all_edge_faces.additional_properties = d + return solid3d_get_all_edge_faces - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/solid3d_get_all_opposite_edges.py b/kittycad/models/solid3d_get_all_opposite_edges.py index babfca602..50c67a26d 100644 --- a/kittycad/models/solid3d_get_all_opposite_edges.py +++ b/kittycad/models/solid3d_get_all_opposite_edges.py @@ -4,53 +4,54 @@ from ..types import UNSET, Unset -HH = TypeVar("HH", bound="Solid3dGetAllOppositeEdges") +MC = TypeVar("MC", bound="Solid3dGetAllOppositeEdges") + @attr.s(auto_attribs=True) class Solid3dGetAllOppositeEdges: - """ The response from the `Solid3dGetAllOppositeEdges` command. """ # noqa: E501 - edges: Union[Unset, List[str]] = UNSET + """The response from the `Solid3dGetAllOppositeEdges` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + edges: Union[Unset, List[str]] = UNSET - def to_dict(self) -> Dict[str, Any]: - edges: Union[Unset, List[str]] = UNSET - if not isinstance(self.edges, Unset): - edges = self.edges + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edges is not UNSET: - field_dict['edges'] = edges + def to_dict(self) -> Dict[str, Any]: + edges: Union[Unset, List[str]] = UNSET + if not isinstance(self.edges, Unset): + edges = self.edges - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edges is not UNSET: + field_dict["edges"] = edges - @classmethod - def from_dict(cls: Type[HH], src_dict: Dict[str, Any]) -> HH: - d = src_dict.copy() - edges = cast(List[str], d.pop("edges", UNSET)) + return field_dict + @classmethod + def from_dict(cls: Type[MC], src_dict: Dict[str, Any]) -> MC: + d = src_dict.copy() + edges = cast(List[str], d.pop("edges", UNSET)) - solid3d_get_all_opposite_edges = cls( - edges= edges, - ) + solid3d_get_all_opposite_edges = cls( + edges=edges, + ) - solid3d_get_all_opposite_edges.additional_properties = d - return solid3d_get_all_opposite_edges + solid3d_get_all_opposite_edges.additional_properties = d + return solid3d_get_all_opposite_edges - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/solid3d_get_next_adjacent_edge.py b/kittycad/models/solid3d_get_next_adjacent_edge.py index bcdf3adb3..bb36937dc 100644 --- a/kittycad/models/solid3d_get_next_adjacent_edge.py +++ b/kittycad/models/solid3d_get_next_adjacent_edge.py @@ -4,51 +4,52 @@ from ..types import UNSET, Unset -RY = TypeVar("RY", bound="Solid3dGetNextAdjacentEdge") +AV = TypeVar("AV", bound="Solid3dGetNextAdjacentEdge") + @attr.s(auto_attribs=True) class Solid3dGetNextAdjacentEdge: - """ The response from the `Solid3dGetNextAdjacentEdge` command. """ # noqa: E501 - edge: Union[Unset, str] = UNSET + """The response from the `Solid3dGetNextAdjacentEdge` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + edge: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - edge = self.edge + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edge is not UNSET: - field_dict['edge'] = edge + def to_dict(self) -> Dict[str, Any]: + edge = self.edge - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge is not UNSET: + field_dict["edge"] = edge - @classmethod - def from_dict(cls: Type[RY], src_dict: Dict[str, Any]) -> RY: - d = src_dict.copy() - edge = d.pop("edge", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[AV], src_dict: Dict[str, Any]) -> AV: + d = src_dict.copy() + edge = d.pop("edge", UNSET) - solid3d_get_next_adjacent_edge = cls( - edge= edge, - ) + solid3d_get_next_adjacent_edge = cls( + edge=edge, + ) - solid3d_get_next_adjacent_edge.additional_properties = d - return solid3d_get_next_adjacent_edge + solid3d_get_next_adjacent_edge.additional_properties = d + return solid3d_get_next_adjacent_edge - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/solid3d_get_opposite_edge.py b/kittycad/models/solid3d_get_opposite_edge.py index 72c6cb78c..14a947e5b 100644 --- a/kittycad/models/solid3d_get_opposite_edge.py +++ b/kittycad/models/solid3d_get_opposite_edge.py @@ -4,51 +4,52 @@ from ..types import UNSET, Unset -AE = TypeVar("AE", bound="Solid3dGetOppositeEdge") +BR = TypeVar("BR", bound="Solid3dGetOppositeEdge") + @attr.s(auto_attribs=True) class Solid3dGetOppositeEdge: - """ The response from the `Solid3dGetOppositeEdge` command. """ # noqa: E501 - edge: Union[Unset, str] = UNSET + """The response from the `Solid3dGetOppositeEdge` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + edge: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - edge = self.edge + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edge is not UNSET: - field_dict['edge'] = edge + def to_dict(self) -> Dict[str, Any]: + edge = self.edge - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge is not UNSET: + field_dict["edge"] = edge - @classmethod - def from_dict(cls: Type[AE], src_dict: Dict[str, Any]) -> AE: - d = src_dict.copy() - edge = d.pop("edge", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[BR], src_dict: Dict[str, Any]) -> BR: + d = src_dict.copy() + edge = d.pop("edge", UNSET) - solid3d_get_opposite_edge = cls( - edge= edge, - ) + solid3d_get_opposite_edge = cls( + edge=edge, + ) - solid3d_get_opposite_edge.additional_properties = d - return solid3d_get_opposite_edge + solid3d_get_opposite_edge.additional_properties = d + return solid3d_get_opposite_edge - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/solid3d_get_prev_adjacent_edge.py b/kittycad/models/solid3d_get_prev_adjacent_edge.py index 7f2391253..a7ba9bcdb 100644 --- a/kittycad/models/solid3d_get_prev_adjacent_edge.py +++ b/kittycad/models/solid3d_get_prev_adjacent_edge.py @@ -4,51 +4,52 @@ from ..types import UNSET, Unset -AD = TypeVar("AD", bound="Solid3dGetPrevAdjacentEdge") +WM = TypeVar("WM", bound="Solid3dGetPrevAdjacentEdge") + @attr.s(auto_attribs=True) class Solid3dGetPrevAdjacentEdge: - """ The response from the `Solid3dGetPrevAdjacentEdge` command. """ # noqa: E501 - edge: Union[Unset, str] = UNSET + """The response from the `Solid3dGetPrevAdjacentEdge` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + edge: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - edge = self.edge + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edge is not UNSET: - field_dict['edge'] = edge + def to_dict(self) -> Dict[str, Any]: + edge = self.edge - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge is not UNSET: + field_dict["edge"] = edge - @classmethod - def from_dict(cls: Type[AD], src_dict: Dict[str, Any]) -> AD: - d = src_dict.copy() - edge = d.pop("edge", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[WM], src_dict: Dict[str, Any]) -> WM: + d = src_dict.copy() + edge = d.pop("edge", UNSET) - solid3d_get_prev_adjacent_edge = cls( - edge= edge, - ) + solid3d_get_prev_adjacent_edge = cls( + edge=edge, + ) - solid3d_get_prev_adjacent_edge.additional_properties = d - return solid3d_get_prev_adjacent_edge + solid3d_get_prev_adjacent_edge.additional_properties = d + return solid3d_get_prev_adjacent_edge - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/stl_storage.py b/kittycad/models/stl_storage.py index b68f1d686..1f9fc8f62 100644 --- a/kittycad/models/stl_storage.py +++ b/kittycad/models/stl_storage.py @@ -2,13 +2,14 @@ class StlStorage(str, Enum): - """ Export storage. """ # noqa: E501 - """# Plaintext encoding. """ # noqa: E501 - ASCII = 'ascii' - """# Binary STL encoding. + """Export storage.""" # noqa: E501 -This is the default setting. """ # noqa: E501 - BINARY = 'binary' + """# Plaintext encoding. """ # noqa: E501 + ASCII = "ascii" + """# Binary STL encoding. - def __str__(self) -> str: - return str(self.value) +This is the default setting. """ # noqa: E501 + BINARY = "binary" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/success_web_socket_response.py b/kittycad/models/success_web_socket_response.py index d4fa24883..1d7297dec 100644 --- a/kittycad/models/success_web_socket_response.py +++ b/kittycad/models/success_web_socket_response.py @@ -5,71 +5,72 @@ from ..models.ok_web_socket_response_data import OkWebSocketResponseData from ..types import UNSET, Unset -AB = TypeVar("AB", bound="SuccessWebSocketResponse") +OK = TypeVar("OK", bound="SuccessWebSocketResponse") + @attr.s(auto_attribs=True) class SuccessWebSocketResponse: - """ Successful Websocket response. """ # noqa: E501 - request_id: Union[Unset, str] = UNSET - resp: Union[Unset, OkWebSocketResponseData] = UNSET - success: Union[Unset, bool] = False - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - request_id = self.request_id - if not isinstance(self.resp, Unset): - resp = self.resp - success = self.success - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if request_id is not UNSET: - field_dict['request_id'] = request_id - if resp is not UNSET: - field_dict['resp'] = resp - if success is not UNSET: - field_dict['success'] = success - - return field_dict - - @classmethod - def from_dict(cls: Type[AB], src_dict: Dict[str, Any]) -> AB: - d = src_dict.copy() - request_id = d.pop("request_id", UNSET) - - _resp = d.pop("resp", UNSET) - resp: Union[Unset, OkWebSocketResponseData] - if isinstance(_resp, Unset): - resp = UNSET - else: - resp = _resp # type: ignore[arg-type] - - success = d.pop("success", UNSET) - - - success_web_socket_response = cls( - request_id= request_id, - resp= resp, - success= success, - ) - - success_web_socket_response.additional_properties = d - return success_web_socket_response - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Successful Websocket response.""" # noqa: E501 + + request_id: Union[Unset, str] = UNSET + resp: Union[Unset, OkWebSocketResponseData] = UNSET + success: Union[Unset, bool] = False + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + request_id = self.request_id + if not isinstance(self.resp, Unset): + resp = self.resp + success = self.success + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if request_id is not UNSET: + field_dict["request_id"] = request_id + if resp is not UNSET: + field_dict["resp"] = resp + if success is not UNSET: + field_dict["success"] = success + + return field_dict + + @classmethod + def from_dict(cls: Type[OK], src_dict: Dict[str, Any]) -> OK: + d = src_dict.copy() + request_id = d.pop("request_id", UNSET) + + _resp = d.pop("resp", UNSET) + resp: Union[Unset, OkWebSocketResponseData] + if isinstance(_resp, Unset): + resp = UNSET + else: + resp = _resp # type: ignore[arg-type] + + success = d.pop("success", UNSET) + + success_web_socket_response = cls( + request_id=request_id, + resp=resp, + success=success, + ) + + success_web_socket_response.additional_properties = d + return success_web_socket_response + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/surface_area.py b/kittycad/models/surface_area.py index f415a0058..06fa26395 100644 --- a/kittycad/models/surface_area.py +++ b/kittycad/models/surface_area.py @@ -5,64 +5,65 @@ from ..models.unit_area import UnitArea from ..types import UNSET, Unset -VY = TypeVar("VY", bound="SurfaceArea") +MU = TypeVar("MU", bound="SurfaceArea") + @attr.s(auto_attribs=True) class SurfaceArea: - """ The surface area response. """ # noqa: E501 - output_unit: Union[Unset, UnitArea] = UNSET - surface_area: Union[Unset, float] = UNSET + """The surface area response.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + output_unit: Union[Unset, UnitArea] = UNSET + surface_area: Union[Unset, float] = UNSET - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - surface_area = self.surface_area + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if surface_area is not UNSET: - field_dict['surface_area'] = surface_area + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + surface_area = self.surface_area - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if surface_area is not UNSET: + field_dict["surface_area"] = surface_area - @classmethod - def from_dict(cls: Type[VY], src_dict: Dict[str, Any]) -> VY: - d = src_dict.copy() - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitArea] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + return field_dict - surface_area = d.pop("surface_area", UNSET) + @classmethod + def from_dict(cls: Type[MU], src_dict: Dict[str, Any]) -> MU: + d = src_dict.copy() + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitArea] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + surface_area = d.pop("surface_area", UNSET) - surface_area = cls( - output_unit= output_unit, - surface_area= surface_area, - ) + surface_area = cls( + output_unit=output_unit, + surface_area=surface_area, + ) - surface_area.additional_properties = d - return surface_area + surface_area.additional_properties = d + return surface_area - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/system.py b/kittycad/models/system.py index 1ef0b1160..3c77bce63 100644 --- a/kittycad/models/system.py +++ b/kittycad/models/system.py @@ -5,76 +5,78 @@ from ..models.axis_direction_pair import AxisDirectionPair from ..types import UNSET, Unset -DW = TypeVar("DW", bound="System") +OP = TypeVar("OP", bound="System") + @attr.s(auto_attribs=True) class System: - """ Co-ordinate system definition. + """Co-ordinate system definition. -The `up` axis must be orthogonal to the `forward` axis. + The `up` axis must be orthogonal to the `forward` axis. -See [cglearn.eu] for background reading. + See [cglearn.eu] for background reading. -[cglearn.eu](https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1) """ # noqa: E501 - forward: Union[Unset, AxisDirectionPair] = UNSET - up: Union[Unset, AxisDirectionPair] = UNSET + [cglearn.eu](https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1) + """ # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + forward: Union[Unset, AxisDirectionPair] = UNSET + up: Union[Unset, AxisDirectionPair] = UNSET - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.forward, Unset): - forward = self.forward - if not isinstance(self.up, Unset): - up = self.up + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if forward is not UNSET: - field_dict['forward'] = forward - if up is not UNSET: - field_dict['up'] = up + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.forward, Unset): + forward = self.forward + if not isinstance(self.up, Unset): + up = self.up - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if forward is not UNSET: + field_dict["forward"] = forward + if up is not UNSET: + field_dict["up"] = up - @classmethod - def from_dict(cls: Type[DW], src_dict: Dict[str, Any]) -> DW: - d = src_dict.copy() - _forward = d.pop("forward", UNSET) - forward: Union[Unset, AxisDirectionPair] - if isinstance(_forward, Unset): - forward = UNSET - else: - forward = _forward # type: ignore[arg-type] + return field_dict - _up = d.pop("up", UNSET) - up: Union[Unset, AxisDirectionPair] - if isinstance(_up, Unset): - up = UNSET - else: - up = _up # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[OP], src_dict: Dict[str, Any]) -> OP: + d = src_dict.copy() + _forward = d.pop("forward", UNSET) + forward: Union[Unset, AxisDirectionPair] + if isinstance(_forward, Unset): + forward = UNSET + else: + forward = _forward # type: ignore[arg-type] + _up = d.pop("up", UNSET) + up: Union[Unset, AxisDirectionPair] + if isinstance(_up, Unset): + up = UNSET + else: + up = _up # type: ignore[arg-type] - system = cls( - forward= forward, - up= up, - ) + system = cls( + forward=forward, + up=up, + ) - system.additional_properties = d - return system + system.additional_properties = d + return system - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/take_snapshot.py b/kittycad/models/take_snapshot.py index 5b1261dd2..84b75320b 100644 --- a/kittycad/models/take_snapshot.py +++ b/kittycad/models/take_snapshot.py @@ -5,58 +5,59 @@ from ..models.base64data import Base64Data from ..types import UNSET, Unset -MC = TypeVar("MC", bound="TakeSnapshot") +WW = TypeVar("WW", bound="TakeSnapshot") + @attr.s(auto_attribs=True) class TakeSnapshot: - """ The response from the `TakeSnapshot` command. """ # noqa: E501 - contents: Union[Unset, Base64Data] = UNSET + """The response from the `TakeSnapshot` command.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + contents: Union[Unset, Base64Data] = UNSET - def to_dict(self) -> Dict[str, Any]: - contents: Union[Unset, str] = UNSET - if not isinstance(self.contents, Unset): - contents = self.contents.get_encoded() + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if contents is not UNSET: - field_dict['contents'] = contents + def to_dict(self) -> Dict[str, Any]: + contents: Union[Unset, str] = UNSET + if not isinstance(self.contents, Unset): + contents = self.contents.get_encoded() - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contents is not UNSET: + field_dict["contents"] = contents - @classmethod - def from_dict(cls: Type[MC], src_dict: Dict[str, Any]) -> MC: - d = src_dict.copy() - _contents = d.pop("contents", UNSET) - contents: Union[Unset, Base64Data] - if isinstance(_contents, Unset): - contents = UNSET - else: - contents = Base64Data(bytes(_contents, 'utf-8')) + return field_dict + @classmethod + def from_dict(cls: Type[WW], src_dict: Dict[str, Any]) -> WW: + d = src_dict.copy() + _contents = d.pop("contents", UNSET) + contents: Union[Unset, Base64Data] + if isinstance(_contents, Unset): + contents = UNSET + else: + contents = Base64Data(bytes(_contents, "utf-8")) - take_snapshot = cls( - contents= contents, - ) + take_snapshot = cls( + contents=contents, + ) - take_snapshot.additional_properties = d - return take_snapshot + take_snapshot.additional_properties = d + return take_snapshot - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/text_to_cad.py b/kittycad/models/text_to_cad.py index 8ae9bb312..644d8e4d1 100644 --- a/kittycad/models/text_to_cad.py +++ b/kittycad/models/text_to_cad.py @@ -11,198 +11,204 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -AV = TypeVar("AV", bound="TextToCad") +LV = TypeVar("LV", bound="TextToCad") + @attr.s(auto_attribs=True) class TextToCad: - """ A response from a text to CAD prompt. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - feedback: Union[Unset, AiFeedback] = UNSET - id: Union[Unset, str] = UNSET - model_version: Union[Unset, str] = UNSET - output_format: Union[Unset, FileExportFormat] = UNSET - outputs: Union[Unset, Dict[str, Base64Data]] = UNSET - prompt: Union[Unset, str] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - if not isinstance(self.feedback, Unset): - feedback = self.feedback - id = self.id - model_version = self.model_version - if not isinstance(self.output_format, Unset): - output_format = self.output_format - outputs: Union[Unset, Dict[str, str]] = UNSET - if not isinstance(self.outputs, Unset): - new_dict: Dict[str, str] = {} - for key, value in self.outputs.items(): - new_dict[key] = value.get_encoded() - outputs = new_dict - prompt = self.prompt - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if feedback is not UNSET: - field_dict['feedback'] = feedback - if id is not UNSET: - field_dict['id'] = id - if model_version is not UNSET: - field_dict['model_version'] = model_version - if output_format is not UNSET: - field_dict['output_format'] = output_format - if outputs is not UNSET: - field_dict['outputs'] = outputs - if prompt is not UNSET: - field_dict['prompt'] = prompt - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[AV], src_dict: Dict[str, Any]) -> AV: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _feedback = d.pop("feedback", UNSET) - feedback: Union[Unset, AiFeedback] - if isinstance(_feedback, Unset): - feedback = UNSET - else: - feedback = _feedback # type: ignore[arg-type] - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - model_version = d.pop("model_version", UNSET) - - _output_format = d.pop("output_format", UNSET) - output_format: Union[Unset, FileExportFormat] - if isinstance(_output_format, Unset): - output_format = UNSET - else: - output_format = _output_format # type: ignore[arg-type] - - _outputs = d.pop("outputs", UNSET) - if isinstance(_outputs, Unset): - outputs = UNSET - else: - new_map: Dict[str, Base64Data] = {} - for k, v in _outputs.items(): - new_map[k] = Base64Data(bytes(v, 'utf-8')) - outputs = new_map # type: ignore - - prompt = d.pop("prompt", UNSET) - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - text_to_cad = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - feedback= feedback, - id= id, - model_version= model_version, - output_format= output_format, - outputs= outputs, - prompt= prompt, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - text_to_cad.additional_properties = d - return text_to_cad - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """A response from a text to CAD prompt.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + feedback: Union[Unset, AiFeedback] = UNSET + id: Union[Unset, str] = UNSET + model_version: Union[Unset, str] = UNSET + output_format: Union[Unset, FileExportFormat] = UNSET + outputs: Union[Unset, Dict[str, Base64Data]] = UNSET + prompt: Union[Unset, str] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + if not isinstance(self.feedback, Unset): + feedback = self.feedback + id = self.id + model_version = self.model_version + if not isinstance(self.output_format, Unset): + output_format = self.output_format + outputs: Union[Unset, Dict[str, str]] = UNSET + if not isinstance(self.outputs, Unset): + new_dict: Dict[str, str] = {} + for key, value in self.outputs.items(): + new_dict[key] = value.get_encoded() + outputs = new_dict + prompt = self.prompt + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if feedback is not UNSET: + field_dict["feedback"] = feedback + if id is not UNSET: + field_dict["id"] = id + if model_version is not UNSET: + field_dict["model_version"] = model_version + if output_format is not UNSET: + field_dict["output_format"] = output_format + if outputs is not UNSET: + field_dict["outputs"] = outputs + if prompt is not UNSET: + field_dict["prompt"] = prompt + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[LV], src_dict: Dict[str, Any]) -> LV: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _feedback = d.pop("feedback", UNSET) + feedback: Union[Unset, AiFeedback] + if isinstance(_feedback, Unset): + feedback = UNSET + else: + feedback = _feedback # type: ignore[arg-type] + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + model_version = d.pop("model_version", UNSET) + + _output_format = d.pop("output_format", UNSET) + output_format: Union[Unset, FileExportFormat] + if isinstance(_output_format, Unset): + output_format = UNSET + else: + output_format = _output_format # type: ignore[arg-type] + + _outputs = d.pop("outputs", UNSET) + if isinstance(_outputs, Unset): + outputs = UNSET + else: + new_map: Dict[str, Base64Data] = {} + for k, v in _outputs.items(): + new_map[k] = Base64Data(bytes(v, "utf-8")) + outputs = new_map # type: ignore + + prompt = d.pop("prompt", UNSET) + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + text_to_cad = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + feedback=feedback, + id=id, + model_version=model_version, + output_format=output_format, + outputs=outputs, + prompt=prompt, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + text_to_cad.additional_properties = d + return text_to_cad + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/text_to_cad_create_body.py b/kittycad/models/text_to_cad_create_body.py index bd6972dc8..078b21ba2 100644 --- a/kittycad/models/text_to_cad_create_body.py +++ b/kittycad/models/text_to_cad_create_body.py @@ -4,51 +4,52 @@ from ..types import UNSET, Unset -BR = TypeVar("BR", bound="TextToCadCreateBody") +II = TypeVar("II", bound="TextToCadCreateBody") + @attr.s(auto_attribs=True) class TextToCadCreateBody: - """ Body for generating models from text. """ # noqa: E501 - prompt: Union[Unset, str] = UNSET + """Body for generating models from text.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + prompt: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: - prompt = self.prompt + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if prompt is not UNSET: - field_dict['prompt'] = prompt + def to_dict(self) -> Dict[str, Any]: + prompt = self.prompt - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if prompt is not UNSET: + field_dict["prompt"] = prompt - @classmethod - def from_dict(cls: Type[BR], src_dict: Dict[str, Any]) -> BR: - d = src_dict.copy() - prompt = d.pop("prompt", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[II], src_dict: Dict[str, Any]) -> II: + d = src_dict.copy() + prompt = d.pop("prompt", UNSET) - text_to_cad_create_body = cls( - prompt= prompt, - ) + text_to_cad_create_body = cls( + prompt=prompt, + ) - text_to_cad_create_body.additional_properties = d - return text_to_cad_create_body + text_to_cad_create_body.additional_properties = d + return text_to_cad_create_body - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/text_to_cad_results_page.py b/kittycad/models/text_to_cad_results_page.py index f781104b5..ba87f4979 100644 --- a/kittycad/models/text_to_cad_results_page.py +++ b/kittycad/models/text_to_cad_results_page.py @@ -4,63 +4,67 @@ from ..types import UNSET, Unset -WM = TypeVar("WM", bound="TextToCadResultsPage") +FC = TypeVar("FC", bound="TextToCadResultsPage") + @attr.s(auto_attribs=True) class TextToCadResultsPage: - """ A single page of results """ # noqa: E501 - from ..models.text_to_cad import TextToCad - items: Union[Unset, List[TextToCad]] = UNSET - next_page: Union[Unset, str] = UNSET + """A single page of results""" # noqa: E501 + + from ..models.text_to_cad import TextToCad + + items: Union[Unset, List[TextToCad]] = UNSET + next_page: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + from ..models.text_to_cad import TextToCad - def to_dict(self) -> Dict[str, Any]: - from ..models.text_to_cad import TextToCad - items: Union[Unset, List[TextToCad]] = UNSET - if not isinstance(self.items, Unset): - items = self.items - next_page = self.next_page + items: Union[Unset, List[TextToCad]] = UNSET + if not isinstance(self.items, Unset): + items = self.items + next_page = self.next_page - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if items is not UNSET: - field_dict['items'] = items - if next_page is not UNSET: - field_dict['next_page'] = next_page + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if items is not UNSET: + field_dict["items"] = items + if next_page is not UNSET: + field_dict["next_page"] = next_page - return field_dict + return field_dict - @classmethod - def from_dict(cls: Type[WM], src_dict: Dict[str, Any]) -> WM: - d = src_dict.copy() - from ..models.text_to_cad import TextToCad - items = cast(List[TextToCad], d.pop("items", UNSET)) + @classmethod + def from_dict(cls: Type[FC], src_dict: Dict[str, Any]) -> FC: + d = src_dict.copy() + from ..models.text_to_cad import TextToCad - next_page = d.pop("next_page", UNSET) + items = cast(List[TextToCad], d.pop("items", UNSET)) + next_page = d.pop("next_page", UNSET) - text_to_cad_results_page = cls( - items= items, - next_page= next_page, - ) + text_to_cad_results_page = cls( + items=items, + next_page=next_page, + ) - text_to_cad_results_page.additional_properties = d - return text_to_cad_results_page + text_to_cad_results_page.additional_properties = d + return text_to_cad_results_page - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_angle.py b/kittycad/models/unit_angle.py index 030f9fd23..e45be0db5 100644 --- a/kittycad/models/unit_angle.py +++ b/kittycad/models/unit_angle.py @@ -2,11 +2,12 @@ class UnitAngle(str, Enum): - """ The valid types of angle formats. """ # noqa: E501 - """# Degrees """ # noqa: E501 - DEGREES = 'degrees' - """# Radians """ # noqa: E501 - RADIANS = 'radians' - - def __str__(self) -> str: - return str(self.value) + """The valid types of angle formats.""" # noqa: E501 + + """# Degrees """ # noqa: E501 + DEGREES = "degrees" + """# Radians """ # noqa: E501 + RADIANS = "radians" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_angle_conversion.py b/kittycad/models/unit_angle_conversion.py index 20a60488c..e49814f7d 100644 --- a/kittycad/models/unit_angle_conversion.py +++ b/kittycad/models/unit_angle_conversion.py @@ -9,179 +9,185 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -OK = TypeVar("OK", bound="UnitAngleConversion") +OA = TypeVar("OA", bound="UnitAngleConversion") + @attr.s(auto_attribs=True) class UnitAngleConversion: - """ Result of converting between units. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitAngle] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitAngle] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if input is not UNSET: - field_dict['input'] = input - if input_unit is not UNSET: - field_dict['input_unit'] = input_unit - if output is not UNSET: - field_dict['output'] = output - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[OK], src_dict: Dict[str, Any]) -> OK: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - input = d.pop("input", UNSET) - - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitAngle] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] - - output = d.pop("output", UNSET) - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitAngle] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - unit_angle_conversion = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - input= input, - input_unit= input_unit, - output= output, - output_unit= output_unit, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - unit_angle_conversion.additional_properties = d - return unit_angle_conversion - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Result of converting between units.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitAngle] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitAngle] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if input is not UNSET: + field_dict["input"] = input + if input_unit is not UNSET: + field_dict["input_unit"] = input_unit + if output is not UNSET: + field_dict["output"] = output + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[OA], src_dict: Dict[str, Any]) -> OA: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + input = d.pop("input", UNSET) + + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitAngle] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] + + output = d.pop("output", UNSET) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitAngle] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + unit_angle_conversion = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + input=input, + input_unit=input_unit, + output=output, + output_unit=output_unit, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + unit_angle_conversion.additional_properties = d + return unit_angle_conversion + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_area.py b/kittycad/models/unit_area.py index c2542add2..6a3f7dc8c 100644 --- a/kittycad/models/unit_area.py +++ b/kittycad/models/unit_area.py @@ -2,23 +2,24 @@ class UnitArea(str, Enum): - """ The valid types of area units. """ # noqa: E501 - """# Square centimeters """ # noqa: E501 - CM2 = 'cm2' - """# Square decimeters """ # noqa: E501 - DM2 = 'dm2' - """# Square feet """ # noqa: E501 - FT2 = 'ft2' - """# Square inches """ # noqa: E501 - IN2 = 'in2' - """# Square kilometers """ # noqa: E501 - KM2 = 'km2' - """# Square meters """ # noqa: E501 - M2 = 'm2' - """# Square millimeters """ # noqa: E501 - MM2 = 'mm2' - """# Square yards """ # noqa: E501 - YD2 = 'yd2' + """The valid types of area units.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# Square centimeters """ # noqa: E501 + CM2 = "cm2" + """# Square decimeters """ # noqa: E501 + DM2 = "dm2" + """# Square feet """ # noqa: E501 + FT2 = "ft2" + """# Square inches """ # noqa: E501 + IN2 = "in2" + """# Square kilometers """ # noqa: E501 + KM2 = "km2" + """# Square meters """ # noqa: E501 + M2 = "m2" + """# Square millimeters """ # noqa: E501 + MM2 = "mm2" + """# Square yards """ # noqa: E501 + YD2 = "yd2" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_area_conversion.py b/kittycad/models/unit_area_conversion.py index f5b3d7c80..c32d75a1e 100644 --- a/kittycad/models/unit_area_conversion.py +++ b/kittycad/models/unit_area_conversion.py @@ -9,179 +9,185 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -MU = TypeVar("MU", bound="UnitAreaConversion") +EI = TypeVar("EI", bound="UnitAreaConversion") + @attr.s(auto_attribs=True) class UnitAreaConversion: - """ Result of converting between units. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitArea] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitArea] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if input is not UNSET: - field_dict['input'] = input - if input_unit is not UNSET: - field_dict['input_unit'] = input_unit - if output is not UNSET: - field_dict['output'] = output - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[MU], src_dict: Dict[str, Any]) -> MU: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - input = d.pop("input", UNSET) - - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitArea] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] - - output = d.pop("output", UNSET) - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitArea] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - unit_area_conversion = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - input= input, - input_unit= input_unit, - output= output, - output_unit= output_unit, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - unit_area_conversion.additional_properties = d - return unit_area_conversion - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Result of converting between units.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitArea] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitArea] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if input is not UNSET: + field_dict["input"] = input + if input_unit is not UNSET: + field_dict["input_unit"] = input_unit + if output is not UNSET: + field_dict["output"] = output + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[EI], src_dict: Dict[str, Any]) -> EI: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + input = d.pop("input", UNSET) + + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitArea] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] + + output = d.pop("output", UNSET) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitArea] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + unit_area_conversion = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + input=input, + input_unit=input_unit, + output=output, + output_unit=output_unit, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + unit_area_conversion.additional_properties = d + return unit_area_conversion + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_current.py b/kittycad/models/unit_current.py index c442e72f3..8734c82e9 100644 --- a/kittycad/models/unit_current.py +++ b/kittycad/models/unit_current.py @@ -2,15 +2,16 @@ class UnitCurrent(str, Enum): - """ The valid types of current units. """ # noqa: E501 - """# Amperes """ # noqa: E501 - AMPERES = 'amperes' - """# Microamperes """ # noqa: E501 - MICROAMPERES = 'microamperes' - """# Milliamperes """ # noqa: E501 - MILLIAMPERES = 'milliamperes' - """# Nanoamperes """ # noqa: E501 - NANOAMPERES = 'nanoamperes' + """The valid types of current units.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# Amperes """ # noqa: E501 + AMPERES = "amperes" + """# Microamperes """ # noqa: E501 + MICROAMPERES = "microamperes" + """# Milliamperes """ # noqa: E501 + MILLIAMPERES = "milliamperes" + """# Nanoamperes """ # noqa: E501 + NANOAMPERES = "nanoamperes" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_current_conversion.py b/kittycad/models/unit_current_conversion.py index c6d005a5e..36fd7eb4e 100644 --- a/kittycad/models/unit_current_conversion.py +++ b/kittycad/models/unit_current_conversion.py @@ -9,179 +9,185 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -OP = TypeVar("OP", bound="UnitCurrentConversion") +CQ = TypeVar("CQ", bound="UnitCurrentConversion") + @attr.s(auto_attribs=True) class UnitCurrentConversion: - """ Result of converting between units. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitCurrent] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitCurrent] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if input is not UNSET: - field_dict['input'] = input - if input_unit is not UNSET: - field_dict['input_unit'] = input_unit - if output is not UNSET: - field_dict['output'] = output - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[OP], src_dict: Dict[str, Any]) -> OP: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - input = d.pop("input", UNSET) - - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitCurrent] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] - - output = d.pop("output", UNSET) - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitCurrent] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - unit_current_conversion = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - input= input, - input_unit= input_unit, - output= output, - output_unit= output_unit, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - unit_current_conversion.additional_properties = d - return unit_current_conversion - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Result of converting between units.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitCurrent] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitCurrent] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if input is not UNSET: + field_dict["input"] = input + if input_unit is not UNSET: + field_dict["input_unit"] = input_unit + if output is not UNSET: + field_dict["output"] = output + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[CQ], src_dict: Dict[str, Any]) -> CQ: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + input = d.pop("input", UNSET) + + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitCurrent] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] + + output = d.pop("output", UNSET) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitCurrent] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + unit_current_conversion = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + input=input, + input_unit=input_unit, + output=output, + output_unit=output_unit, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + unit_current_conversion.additional_properties = d + return unit_current_conversion + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_density.py b/kittycad/models/unit_density.py index f13eb10e3..53534b784 100644 --- a/kittycad/models/unit_density.py +++ b/kittycad/models/unit_density.py @@ -2,11 +2,12 @@ class UnitDensity(str, Enum): - """ The valid types for density units. """ # noqa: E501 - """# Pounds per cubic feet. """ # noqa: E501 - LB_FT3 = 'lb:ft3' - """# Kilograms per cubic meter. """ # noqa: E501 - KG_M3 = 'kg:m3' - - def __str__(self) -> str: - return str(self.value) + """The valid types for density units.""" # noqa: E501 + + """# Pounds per cubic feet. """ # noqa: E501 + LB_FT3 = "lb:ft3" + """# Kilograms per cubic meter. """ # noqa: E501 + KG_M3 = "kg:m3" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_energy.py b/kittycad/models/unit_energy.py index 82fd1caf4..20ea3892a 100644 --- a/kittycad/models/unit_energy.py +++ b/kittycad/models/unit_energy.py @@ -2,19 +2,20 @@ class UnitEnergy(str, Enum): - """ The valid types of energy units. """ # noqa: E501 - """# British Thermal Unit (BTU) """ # noqa: E501 - BTU = 'btu' - """# Electron Volts (eV) """ # noqa: E501 - ELECTRONVOLTS = 'electronvolts' - """# Joules (or watt-seconds) """ # noqa: E501 - JOULES = 'joules' - """# Kilocalories (often just called calories) """ # noqa: E501 - KILOCALORIES = 'kilocalories' - """# Kilowatt hours (kWh) """ # noqa: E501 - KILOWATT_HOURS = 'kilowatt_hours' - """# Watt hours (Wh) """ # noqa: E501 - WATT_HOURS = 'watt_hours' + """The valid types of energy units.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# British Thermal Unit (BTU) """ # noqa: E501 + BTU = "btu" + """# Electron Volts (eV) """ # noqa: E501 + ELECTRONVOLTS = "electronvolts" + """# Joules (or watt-seconds) """ # noqa: E501 + JOULES = "joules" + """# Kilocalories (often just called calories) """ # noqa: E501 + KILOCALORIES = "kilocalories" + """# Kilowatt hours (kWh) """ # noqa: E501 + KILOWATT_HOURS = "kilowatt_hours" + """# Watt hours (Wh) """ # noqa: E501 + WATT_HOURS = "watt_hours" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_energy_conversion.py b/kittycad/models/unit_energy_conversion.py index 9ad2a96a9..c8c85ae1e 100644 --- a/kittycad/models/unit_energy_conversion.py +++ b/kittycad/models/unit_energy_conversion.py @@ -9,179 +9,185 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -WW = TypeVar("WW", bound="UnitEnergyConversion") +JE = TypeVar("JE", bound="UnitEnergyConversion") + @attr.s(auto_attribs=True) class UnitEnergyConversion: - """ Result of converting between units. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitEnergy] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitEnergy] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if input is not UNSET: - field_dict['input'] = input - if input_unit is not UNSET: - field_dict['input_unit'] = input_unit - if output is not UNSET: - field_dict['output'] = output - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[WW], src_dict: Dict[str, Any]) -> WW: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - input = d.pop("input", UNSET) - - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitEnergy] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] - - output = d.pop("output", UNSET) - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitEnergy] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - unit_energy_conversion = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - input= input, - input_unit= input_unit, - output= output, - output_unit= output_unit, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - unit_energy_conversion.additional_properties = d - return unit_energy_conversion - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Result of converting between units.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitEnergy] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitEnergy] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if input is not UNSET: + field_dict["input"] = input + if input_unit is not UNSET: + field_dict["input_unit"] = input_unit + if output is not UNSET: + field_dict["output"] = output + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[JE], src_dict: Dict[str, Any]) -> JE: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + input = d.pop("input", UNSET) + + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitEnergy] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] + + output = d.pop("output", UNSET) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitEnergy] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + unit_energy_conversion = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + input=input, + input_unit=input_unit, + output=output, + output_unit=output_unit, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + unit_energy_conversion.additional_properties = d + return unit_energy_conversion + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_force.py b/kittycad/models/unit_force.py index 27e52407d..913b8fa8b 100644 --- a/kittycad/models/unit_force.py +++ b/kittycad/models/unit_force.py @@ -2,21 +2,22 @@ class UnitForce(str, Enum): - """ The valid types of force units. """ # noqa: E501 - """# Dynes """ # noqa: E501 - DYNES = 'dynes' - """# Kiloponds """ # noqa: E501 - KILOPONDS = 'kiloponds' - """# Micronewtons """ # noqa: E501 - MICRONEWTONS = 'micronewtons' - """# Millinewtons """ # noqa: E501 - MILLINEWTONS = 'millinewtons' - """# Newtons """ # noqa: E501 - NEWTONS = 'newtons' - """# Poundals """ # noqa: E501 - POUNDALS = 'poundals' - """# Pounds """ # noqa: E501 - POUNDS = 'pounds' + """The valid types of force units.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# Dynes """ # noqa: E501 + DYNES = "dynes" + """# Kiloponds """ # noqa: E501 + KILOPONDS = "kiloponds" + """# Micronewtons """ # noqa: E501 + MICRONEWTONS = "micronewtons" + """# Millinewtons """ # noqa: E501 + MILLINEWTONS = "millinewtons" + """# Newtons """ # noqa: E501 + NEWTONS = "newtons" + """# Poundals """ # noqa: E501 + POUNDALS = "poundals" + """# Pounds """ # noqa: E501 + POUNDS = "pounds" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_force_conversion.py b/kittycad/models/unit_force_conversion.py index bfb668509..71b1488c4 100644 --- a/kittycad/models/unit_force_conversion.py +++ b/kittycad/models/unit_force_conversion.py @@ -9,179 +9,185 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -LV = TypeVar("LV", bound="UnitForceConversion") +RD = TypeVar("RD", bound="UnitForceConversion") + @attr.s(auto_attribs=True) class UnitForceConversion: - """ Result of converting between units. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitForce] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitForce] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if input is not UNSET: - field_dict['input'] = input - if input_unit is not UNSET: - field_dict['input_unit'] = input_unit - if output is not UNSET: - field_dict['output'] = output - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[LV], src_dict: Dict[str, Any]) -> LV: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - input = d.pop("input", UNSET) - - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitForce] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] - - output = d.pop("output", UNSET) - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitForce] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - unit_force_conversion = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - input= input, - input_unit= input_unit, - output= output, - output_unit= output_unit, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - unit_force_conversion.additional_properties = d - return unit_force_conversion - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Result of converting between units.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitForce] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitForce] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if input is not UNSET: + field_dict["input"] = input + if input_unit is not UNSET: + field_dict["input_unit"] = input_unit + if output is not UNSET: + field_dict["output"] = output + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[RD], src_dict: Dict[str, Any]) -> RD: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + input = d.pop("input", UNSET) + + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitForce] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] + + output = d.pop("output", UNSET) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitForce] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + unit_force_conversion = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + input=input, + input_unit=input_unit, + output=output, + output_unit=output_unit, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + unit_force_conversion.additional_properties = d + return unit_force_conversion + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_frequency.py b/kittycad/models/unit_frequency.py index 06ca62536..58d7525b2 100644 --- a/kittycad/models/unit_frequency.py +++ b/kittycad/models/unit_frequency.py @@ -2,23 +2,24 @@ class UnitFrequency(str, Enum): - """ The valid types of frequency units. """ # noqa: E501 - """# Gigahertz """ # noqa: E501 - GIGAHERTZ = 'gigahertz' - """# Hertz """ # noqa: E501 - HERTZ = 'hertz' - """# Kilohertz """ # noqa: E501 - KILOHERTZ = 'kilohertz' - """# Megahertz """ # noqa: E501 - MEGAHERTZ = 'megahertz' - """# Microhertz """ # noqa: E501 - MICROHERTZ = 'microhertz' - """# Millihertz """ # noqa: E501 - MILLIHERTZ = 'millihertz' - """# Nanohertz """ # noqa: E501 - NANOHERTZ = 'nanohertz' - """# Terahertz """ # noqa: E501 - TERAHERTZ = 'terahertz' + """The valid types of frequency units.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# Gigahertz """ # noqa: E501 + GIGAHERTZ = "gigahertz" + """# Hertz """ # noqa: E501 + HERTZ = "hertz" + """# Kilohertz """ # noqa: E501 + KILOHERTZ = "kilohertz" + """# Megahertz """ # noqa: E501 + MEGAHERTZ = "megahertz" + """# Microhertz """ # noqa: E501 + MICROHERTZ = "microhertz" + """# Millihertz """ # noqa: E501 + MILLIHERTZ = "millihertz" + """# Nanohertz """ # noqa: E501 + NANOHERTZ = "nanohertz" + """# Terahertz """ # noqa: E501 + TERAHERTZ = "terahertz" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_frequency_conversion.py b/kittycad/models/unit_frequency_conversion.py index cb4f1570c..76eb88066 100644 --- a/kittycad/models/unit_frequency_conversion.py +++ b/kittycad/models/unit_frequency_conversion.py @@ -9,179 +9,185 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -II = TypeVar("II", bound="UnitFrequencyConversion") +JW = TypeVar("JW", bound="UnitFrequencyConversion") + @attr.s(auto_attribs=True) class UnitFrequencyConversion: - """ Result of converting between units. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitFrequency] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitFrequency] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if input is not UNSET: - field_dict['input'] = input - if input_unit is not UNSET: - field_dict['input_unit'] = input_unit - if output is not UNSET: - field_dict['output'] = output - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[II], src_dict: Dict[str, Any]) -> II: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - input = d.pop("input", UNSET) - - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitFrequency] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] - - output = d.pop("output", UNSET) - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitFrequency] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - unit_frequency_conversion = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - input= input, - input_unit= input_unit, - output= output, - output_unit= output_unit, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - unit_frequency_conversion.additional_properties = d - return unit_frequency_conversion - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Result of converting between units.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitFrequency] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitFrequency] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if input is not UNSET: + field_dict["input"] = input + if input_unit is not UNSET: + field_dict["input_unit"] = input_unit + if output is not UNSET: + field_dict["output"] = output + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[JW], src_dict: Dict[str, Any]) -> JW: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + input = d.pop("input", UNSET) + + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitFrequency] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] + + output = d.pop("output", UNSET) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitFrequency] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + unit_frequency_conversion = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + input=input, + input_unit=input_unit, + output=output, + output_unit=output_unit, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + unit_frequency_conversion.additional_properties = d + return unit_frequency_conversion + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_length.py b/kittycad/models/unit_length.py index ed6f7fdde..801239d92 100644 --- a/kittycad/models/unit_length.py +++ b/kittycad/models/unit_length.py @@ -2,19 +2,20 @@ class UnitLength(str, Enum): - """ The valid types of length units. """ # noqa: E501 - """# Centimeters """ # noqa: E501 - CM = 'cm' - """# Feet """ # noqa: E501 - FT = 'ft' - """# Inches """ # noqa: E501 - IN = 'in' - """# Meters """ # noqa: E501 - M = 'm' - """# Millimeters """ # noqa: E501 - MM = 'mm' - """# Yards """ # noqa: E501 - YD = 'yd' + """The valid types of length units.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# Centimeters """ # noqa: E501 + CM = "cm" + """# Feet """ # noqa: E501 + FT = "ft" + """# Inches """ # noqa: E501 + IN = "in" + """# Meters """ # noqa: E501 + M = "m" + """# Millimeters """ # noqa: E501 + MM = "mm" + """# Yards """ # noqa: E501 + YD = "yd" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_length_conversion.py b/kittycad/models/unit_length_conversion.py index 43147260a..307deff2a 100644 --- a/kittycad/models/unit_length_conversion.py +++ b/kittycad/models/unit_length_conversion.py @@ -9,179 +9,185 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -FC = TypeVar("FC", bound="UnitLengthConversion") +KZ = TypeVar("KZ", bound="UnitLengthConversion") + @attr.s(auto_attribs=True) class UnitLengthConversion: - """ Result of converting between units. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitLength] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitLength] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if input is not UNSET: - field_dict['input'] = input - if input_unit is not UNSET: - field_dict['input_unit'] = input_unit - if output is not UNSET: - field_dict['output'] = output - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[FC], src_dict: Dict[str, Any]) -> FC: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - input = d.pop("input", UNSET) - - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitLength] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] - - output = d.pop("output", UNSET) - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitLength] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - unit_length_conversion = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - input= input, - input_unit= input_unit, - output= output, - output_unit= output_unit, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - unit_length_conversion.additional_properties = d - return unit_length_conversion - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Result of converting between units.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitLength] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitLength] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if input is not UNSET: + field_dict["input"] = input + if input_unit is not UNSET: + field_dict["input_unit"] = input_unit + if output is not UNSET: + field_dict["output"] = output + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[KZ], src_dict: Dict[str, Any]) -> KZ: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + input = d.pop("input", UNSET) + + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitLength] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] + + output = d.pop("output", UNSET) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitLength] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + unit_length_conversion = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + input=input, + input_unit=input_unit, + output=output, + output_unit=output_unit, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + unit_length_conversion.additional_properties = d + return unit_length_conversion + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_mass.py b/kittycad/models/unit_mass.py index 9d06128da..62b9804de 100644 --- a/kittycad/models/unit_mass.py +++ b/kittycad/models/unit_mass.py @@ -2,13 +2,14 @@ class UnitMass(str, Enum): - """ The valid types of mass units. """ # noqa: E501 - """# Grams """ # noqa: E501 - G = 'g' - """# Kilograms """ # noqa: E501 - KG = 'kg' - """# Pounds """ # noqa: E501 - LB = 'lb' - - def __str__(self) -> str: - return str(self.value) + """The valid types of mass units.""" # noqa: E501 + + """# Grams """ # noqa: E501 + G = "g" + """# Kilograms """ # noqa: E501 + KG = "kg" + """# Pounds """ # noqa: E501 + LB = "lb" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_mass_conversion.py b/kittycad/models/unit_mass_conversion.py index 9e35f965d..3f23c10a5 100644 --- a/kittycad/models/unit_mass_conversion.py +++ b/kittycad/models/unit_mass_conversion.py @@ -9,179 +9,185 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -OA = TypeVar("OA", bound="UnitMassConversion") +AS = TypeVar("AS", bound="UnitMassConversion") + @attr.s(auto_attribs=True) class UnitMassConversion: - """ Result of converting between units. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitMass] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitMass] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if input is not UNSET: - field_dict['input'] = input - if input_unit is not UNSET: - field_dict['input_unit'] = input_unit - if output is not UNSET: - field_dict['output'] = output - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[OA], src_dict: Dict[str, Any]) -> OA: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - input = d.pop("input", UNSET) - - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitMass] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] - - output = d.pop("output", UNSET) - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitMass] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - unit_mass_conversion = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - input= input, - input_unit= input_unit, - output= output, - output_unit= output_unit, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - unit_mass_conversion.additional_properties = d - return unit_mass_conversion - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Result of converting between units.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitMass] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitMass] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if input is not UNSET: + field_dict["input"] = input + if input_unit is not UNSET: + field_dict["input_unit"] = input_unit + if output is not UNSET: + field_dict["output"] = output + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[AS], src_dict: Dict[str, Any]) -> AS: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + input = d.pop("input", UNSET) + + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitMass] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] + + output = d.pop("output", UNSET) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitMass] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + unit_mass_conversion = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + input=input, + input_unit=input_unit, + output=output, + output_unit=output_unit, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + unit_mass_conversion.additional_properties = d + return unit_mass_conversion + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_power.py b/kittycad/models/unit_power.py index fce712a2c..95dffd8bb 100644 --- a/kittycad/models/unit_power.py +++ b/kittycad/models/unit_power.py @@ -2,21 +2,22 @@ class UnitPower(str, Enum): - """ The valid types of power units. """ # noqa: E501 - """# British thermal units (BTU) per minute """ # noqa: E501 - BTU_PER_MINUTE = 'btu_per_minute' - """# Horsepower (hp) """ # noqa: E501 - HORSEPOWER = 'horsepower' - """# Kilowatts """ # noqa: E501 - KILOWATTS = 'kilowatts' - """# Metric horsepower (PS) """ # noqa: E501 - METRIC_HORSEPOWER = 'metric_horsepower' - """# Microwatts """ # noqa: E501 - MICROWATTS = 'microwatts' - """# Millwatts """ # noqa: E501 - MILLIWATTS = 'milliwatts' - """# Watts """ # noqa: E501 - WATTS = 'watts' + """The valid types of power units.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# British thermal units (BTU) per minute """ # noqa: E501 + BTU_PER_MINUTE = "btu_per_minute" + """# Horsepower (hp) """ # noqa: E501 + HORSEPOWER = "horsepower" + """# Kilowatts """ # noqa: E501 + KILOWATTS = "kilowatts" + """# Metric horsepower (PS) """ # noqa: E501 + METRIC_HORSEPOWER = "metric_horsepower" + """# Microwatts """ # noqa: E501 + MICROWATTS = "microwatts" + """# Millwatts """ # noqa: E501 + MILLIWATTS = "milliwatts" + """# Watts """ # noqa: E501 + WATTS = "watts" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_power_conversion.py b/kittycad/models/unit_power_conversion.py index 4c0343c8a..bc7de1eb0 100644 --- a/kittycad/models/unit_power_conversion.py +++ b/kittycad/models/unit_power_conversion.py @@ -9,179 +9,185 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -EI = TypeVar("EI", bound="UnitPowerConversion") +IU = TypeVar("IU", bound="UnitPowerConversion") + @attr.s(auto_attribs=True) class UnitPowerConversion: - """ Result of converting between units. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitPower] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitPower] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if input is not UNSET: - field_dict['input'] = input - if input_unit is not UNSET: - field_dict['input_unit'] = input_unit - if output is not UNSET: - field_dict['output'] = output - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[EI], src_dict: Dict[str, Any]) -> EI: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - input = d.pop("input", UNSET) - - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitPower] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] - - output = d.pop("output", UNSET) - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitPower] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - unit_power_conversion = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - input= input, - input_unit= input_unit, - output= output, - output_unit= output_unit, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - unit_power_conversion.additional_properties = d - return unit_power_conversion - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Result of converting between units.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitPower] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitPower] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if input is not UNSET: + field_dict["input"] = input + if input_unit is not UNSET: + field_dict["input_unit"] = input_unit + if output is not UNSET: + field_dict["output"] = output + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[IU], src_dict: Dict[str, Any]) -> IU: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + input = d.pop("input", UNSET) + + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitPower] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] + + output = d.pop("output", UNSET) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitPower] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + unit_power_conversion = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + input=input, + input_unit=input_unit, + output=output, + output_unit=output_unit, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + unit_power_conversion.additional_properties = d + return unit_power_conversion + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_pressure.py b/kittycad/models/unit_pressure.py index 69a45ae79..15b6c40b3 100644 --- a/kittycad/models/unit_pressure.py +++ b/kittycad/models/unit_pressure.py @@ -2,21 +2,22 @@ class UnitPressure(str, Enum): - """ The valid types of pressure units. """ # noqa: E501 - """# Atmospheres """ # noqa: E501 - ATMOSPHERES = 'atmospheres' - """# Bars """ # noqa: E501 - BARS = 'bars' - """# Hectopascals """ # noqa: E501 - HECTOPASCALS = 'hectopascals' - """# Kilopascals """ # noqa: E501 - KILOPASCALS = 'kilopascals' - """# Millibars """ # noqa: E501 - MILLIBARS = 'millibars' - """# Pascals """ # noqa: E501 - PASCALS = 'pascals' - """# Pounds per square inch (PSI) - """ # noqa: E501 - PSI = 'psi' + """The valid types of pressure units.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# Atmospheres """ # noqa: E501 + ATMOSPHERES = "atmospheres" + """# Bars """ # noqa: E501 + BARS = "bars" + """# Hectopascals """ # noqa: E501 + HECTOPASCALS = "hectopascals" + """# Kilopascals """ # noqa: E501 + KILOPASCALS = "kilopascals" + """# Millibars """ # noqa: E501 + MILLIBARS = "millibars" + """# Pascals """ # noqa: E501 + PASCALS = "pascals" + """# Pounds per square inch (PSI) - """ # noqa: E501 + PSI = "psi" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_pressure_conversion.py b/kittycad/models/unit_pressure_conversion.py index a77bd8ce7..846812fd4 100644 --- a/kittycad/models/unit_pressure_conversion.py +++ b/kittycad/models/unit_pressure_conversion.py @@ -9,179 +9,185 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -CQ = TypeVar("CQ", bound="UnitPressureConversion") +YQ = TypeVar("YQ", bound="UnitPressureConversion") + @attr.s(auto_attribs=True) class UnitPressureConversion: - """ Result of converting between units. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitPressure] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitPressure] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if input is not UNSET: - field_dict['input'] = input - if input_unit is not UNSET: - field_dict['input_unit'] = input_unit - if output is not UNSET: - field_dict['output'] = output - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[CQ], src_dict: Dict[str, Any]) -> CQ: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - input = d.pop("input", UNSET) - - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitPressure] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] - - output = d.pop("output", UNSET) - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitPressure] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - unit_pressure_conversion = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - input= input, - input_unit= input_unit, - output= output, - output_unit= output_unit, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - unit_pressure_conversion.additional_properties = d - return unit_pressure_conversion - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Result of converting between units.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitPressure] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitPressure] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if input is not UNSET: + field_dict["input"] = input + if input_unit is not UNSET: + field_dict["input_unit"] = input_unit + if output is not UNSET: + field_dict["output"] = output + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[YQ], src_dict: Dict[str, Any]) -> YQ: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + input = d.pop("input", UNSET) + + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitPressure] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] + + output = d.pop("output", UNSET) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitPressure] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + unit_pressure_conversion = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + input=input, + input_unit=input_unit, + output=output, + output_unit=output_unit, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + unit_pressure_conversion.additional_properties = d + return unit_pressure_conversion + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_temperature.py b/kittycad/models/unit_temperature.py index df857069d..72a1e9382 100644 --- a/kittycad/models/unit_temperature.py +++ b/kittycad/models/unit_temperature.py @@ -2,15 +2,16 @@ class UnitTemperature(str, Enum): - """ The valid types of temperature units. """ # noqa: E501 - """# Celsius """ # noqa: E501 - CELSIUS = 'celsius' - """# Fahrenheit """ # noqa: E501 - FAHRENHEIT = 'fahrenheit' - """# Kelvin """ # noqa: E501 - KELVIN = 'kelvin' - """# Rankine """ # noqa: E501 - RANKINE = 'rankine' + """The valid types of temperature units.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# Celsius """ # noqa: E501 + CELSIUS = "celsius" + """# Fahrenheit """ # noqa: E501 + FAHRENHEIT = "fahrenheit" + """# Kelvin """ # noqa: E501 + KELVIN = "kelvin" + """# Rankine """ # noqa: E501 + RANKINE = "rankine" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_temperature_conversion.py b/kittycad/models/unit_temperature_conversion.py index 22127bf09..1c3fe2a9c 100644 --- a/kittycad/models/unit_temperature_conversion.py +++ b/kittycad/models/unit_temperature_conversion.py @@ -9,179 +9,185 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -JE = TypeVar("JE", bound="UnitTemperatureConversion") +NQ = TypeVar("NQ", bound="UnitTemperatureConversion") + @attr.s(auto_attribs=True) class UnitTemperatureConversion: - """ Result of converting between units. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitTemperature] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitTemperature] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if input is not UNSET: - field_dict['input'] = input - if input_unit is not UNSET: - field_dict['input_unit'] = input_unit - if output is not UNSET: - field_dict['output'] = output - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[JE], src_dict: Dict[str, Any]) -> JE: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - input = d.pop("input", UNSET) - - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitTemperature] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] - - output = d.pop("output", UNSET) - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitTemperature] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - unit_temperature_conversion = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - input= input, - input_unit= input_unit, - output= output, - output_unit= output_unit, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - unit_temperature_conversion.additional_properties = d - return unit_temperature_conversion - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Result of converting between units.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitTemperature] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitTemperature] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if input is not UNSET: + field_dict["input"] = input + if input_unit is not UNSET: + field_dict["input_unit"] = input_unit + if output is not UNSET: + field_dict["output"] = output + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[NQ], src_dict: Dict[str, Any]) -> NQ: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + input = d.pop("input", UNSET) + + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitTemperature] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] + + output = d.pop("output", UNSET) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitTemperature] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + unit_temperature_conversion = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + input=input, + input_unit=input_unit, + output=output, + output_unit=output_unit, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + unit_temperature_conversion.additional_properties = d + return unit_temperature_conversion + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_torque.py b/kittycad/models/unit_torque.py index f0afeb50a..02c71e8ea 100644 --- a/kittycad/models/unit_torque.py +++ b/kittycad/models/unit_torque.py @@ -2,11 +2,12 @@ class UnitTorque(str, Enum): - """ The valid types of torque units. """ # noqa: E501 - """# Newton metres """ # noqa: E501 - NEWTON_METRES = 'newton_metres' - """# Pound foot """ # noqa: E501 - POUND_FOOT = 'pound_foot' - - def __str__(self) -> str: - return str(self.value) + """The valid types of torque units.""" # noqa: E501 + + """# Newton metres """ # noqa: E501 + NEWTON_METRES = "newton_metres" + """# Pound foot """ # noqa: E501 + POUND_FOOT = "pound_foot" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_torque_conversion.py b/kittycad/models/unit_torque_conversion.py index 104f1c565..f6a53b700 100644 --- a/kittycad/models/unit_torque_conversion.py +++ b/kittycad/models/unit_torque_conversion.py @@ -9,179 +9,185 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -RD = TypeVar("RD", bound="UnitTorqueConversion") +EW = TypeVar("EW", bound="UnitTorqueConversion") + @attr.s(auto_attribs=True) class UnitTorqueConversion: - """ Result of converting between units. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitTorque] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitTorque] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if input is not UNSET: - field_dict['input'] = input - if input_unit is not UNSET: - field_dict['input_unit'] = input_unit - if output is not UNSET: - field_dict['output'] = output - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[RD], src_dict: Dict[str, Any]) -> RD: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - input = d.pop("input", UNSET) - - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitTorque] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] - - output = d.pop("output", UNSET) - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitTorque] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - unit_torque_conversion = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - input= input, - input_unit= input_unit, - output= output, - output_unit= output_unit, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - unit_torque_conversion.additional_properties = d - return unit_torque_conversion - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Result of converting between units.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitTorque] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitTorque] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if input is not UNSET: + field_dict["input"] = input + if input_unit is not UNSET: + field_dict["input_unit"] = input_unit + if output is not UNSET: + field_dict["output"] = output + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[EW], src_dict: Dict[str, Any]) -> EW: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + input = d.pop("input", UNSET) + + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitTorque] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] + + output = d.pop("output", UNSET) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitTorque] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + unit_torque_conversion = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + input=input, + input_unit=input_unit, + output=output, + output_unit=output_unit, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + unit_torque_conversion.additional_properties = d + return unit_torque_conversion + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_volume.py b/kittycad/models/unit_volume.py index 7142d28f0..edc51cda3 100644 --- a/kittycad/models/unit_volume.py +++ b/kittycad/models/unit_volume.py @@ -2,25 +2,26 @@ class UnitVolume(str, Enum): - """ The valid types of volume units. """ # noqa: E501 - """# Cubic centimeters (cc or cm³) """ # noqa: E501 - CM3 = 'cm3' - """# Cubic feet (ft³) """ # noqa: E501 - FT3 = 'ft3' - """# Cubic inches (cu in or in³) """ # noqa: E501 - IN3 = 'in3' - """# Cubic meters (m³) """ # noqa: E501 - M3 = 'm3' - """# Cubic yards (yd³) """ # noqa: E501 - YD3 = 'yd3' - """# US Fluid Ounces (fl oz) """ # noqa: E501 - USFLOZ = 'usfloz' - """# US Gallons (gal US) """ # noqa: E501 - USGAL = 'usgal' - """# Liters (l) """ # noqa: E501 - L = 'l' - """# Milliliters (ml) """ # noqa: E501 - ML = 'ml' + """The valid types of volume units.""" # noqa: E501 - def __str__(self) -> str: - return str(self.value) + """# Cubic centimeters (cc or cm³) """ # noqa: E501 + CM3 = "cm3" + """# Cubic feet (ft³) """ # noqa: E501 + FT3 = "ft3" + """# Cubic inches (cu in or in³) """ # noqa: E501 + IN3 = "in3" + """# Cubic meters (m³) """ # noqa: E501 + M3 = "m3" + """# Cubic yards (yd³) """ # noqa: E501 + YD3 = "yd3" + """# US Fluid Ounces (fl oz) """ # noqa: E501 + USFLOZ = "usfloz" + """# US Gallons (gal US) """ # noqa: E501 + USGAL = "usgal" + """# Liters (l) """ # noqa: E501 + L = "l" + """# Milliliters (ml) """ # noqa: E501 + ML = "ml" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_volume_conversion.py b/kittycad/models/unit_volume_conversion.py index 0cdabc5f4..16802513c 100644 --- a/kittycad/models/unit_volume_conversion.py +++ b/kittycad/models/unit_volume_conversion.py @@ -9,179 +9,185 @@ from ..models.uuid import Uuid from ..types import UNSET, Unset -JW = TypeVar("JW", bound="UnitVolumeConversion") +BU = TypeVar("BU", bound="UnitVolumeConversion") + @attr.s(auto_attribs=True) class UnitVolumeConversion: - """ Result of converting between units. """ # noqa: E501 - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitVolume] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitVolume] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict['completed_at'] = completed_at - if created_at is not UNSET: - field_dict['created_at'] = created_at - if error is not UNSET: - field_dict['error'] = error - if id is not UNSET: - field_dict['id'] = id - if input is not UNSET: - field_dict['input'] = input - if input_unit is not UNSET: - field_dict['input_unit'] = input_unit - if output is not UNSET: - field_dict['output'] = output - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if started_at is not UNSET: - field_dict['started_at'] = started_at - if status is not UNSET: - field_dict['status'] = status - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - if user_id is not UNSET: - field_dict['user_id'] = user_id - - return field_dict - - @classmethod - def from_dict(cls: Type[JW], src_dict: Dict[str, Any]) -> JW: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - input = d.pop("input", UNSET) - - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitVolume] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] - - output = d.pop("output", UNSET) - - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitVolume] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - - unit_volume_conversion = cls( - completed_at= completed_at, - created_at= created_at, - error= error, - id= id, - input= input, - input_unit= input_unit, - output= output, - output_unit= output_unit, - started_at= started_at, - status= status, - updated_at= updated_at, - user_id= user_id, - ) - - unit_volume_conversion.additional_properties = d - return unit_volume_conversion - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """Result of converting between units.""" # noqa: E501 + + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitVolume] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitVolume] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + completed_at: Union[Unset, str] = UNSET + if not isinstance(self.completed_at, Unset): + completed_at = self.completed_at.isoformat() + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + error = self.error + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if created_at is not UNSET: + field_dict["created_at"] = created_at + if error is not UNSET: + field_dict["error"] = error + if id is not UNSET: + field_dict["id"] = id + if input is not UNSET: + field_dict["input"] = input + if input_unit is not UNSET: + field_dict["input_unit"] = input_unit + if output is not UNSET: + field_dict["output"] = output + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if started_at is not UNSET: + field_dict["started_at"] = started_at + if status is not UNSET: + field_dict["status"] = status + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[BU], src_dict: Dict[str, Any]) -> BU: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + error = d.pop("error", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + input = d.pop("input", UNSET) + + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitVolume] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] + + output = d.pop("output", UNSET) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitVolume] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) + + _status = d.pop("status", UNSET) + status: Union[Unset, ApiCallStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + _user_id = d.pop("user_id", UNSET) + user_id: Union[Unset, Uuid] + if isinstance(_user_id, Unset): + user_id = UNSET + else: + user_id = _user_id # type: ignore[arg-type] + + unit_volume_conversion = cls( + completed_at=completed_at, + created_at=created_at, + error=error, + id=id, + input=input, + input_unit=input_unit, + output=output, + output_unit=output_unit, + started_at=started_at, + status=status, + updated_at=updated_at, + user_id=user_id, + ) + + unit_volume_conversion.additional_properties = d + return unit_volume_conversion + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/update_user.py b/kittycad/models/update_user.py index 18a75901c..0ed484a6b 100644 --- a/kittycad/models/update_user.py +++ b/kittycad/models/update_user.py @@ -4,86 +4,87 @@ from ..types import UNSET, Unset -KZ = TypeVar("KZ", bound="UpdateUser") +BT = TypeVar("BT", bound="UpdateUser") + @attr.s(auto_attribs=True) class UpdateUser: - """ The user-modifiable parts of a User. """ # noqa: E501 - company: Union[Unset, str] = UNSET - discord: Union[Unset, str] = UNSET - first_name: Union[Unset, str] = UNSET - github: Union[Unset, str] = UNSET - last_name: Union[Unset, str] = UNSET - phone: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - company = self.company - discord = self.discord - first_name = self.first_name - github = self.github - last_name = self.last_name - phone = self.phone - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if company is not UNSET: - field_dict['company'] = company - if discord is not UNSET: - field_dict['discord'] = discord - if first_name is not UNSET: - field_dict['first_name'] = first_name - if github is not UNSET: - field_dict['github'] = github - if last_name is not UNSET: - field_dict['last_name'] = last_name - if phone is not UNSET: - field_dict['phone'] = phone - - return field_dict - - @classmethod - def from_dict(cls: Type[KZ], src_dict: Dict[str, Any]) -> KZ: - d = src_dict.copy() - company = d.pop("company", UNSET) - - discord = d.pop("discord", UNSET) - - first_name = d.pop("first_name", UNSET) - - github = d.pop("github", UNSET) - - last_name = d.pop("last_name", UNSET) - - phone = d.pop("phone", UNSET) - - - update_user = cls( - company= company, - discord= discord, - first_name= first_name, - github= github, - last_name= last_name, - phone= phone, - ) - - update_user.additional_properties = d - return update_user - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """The user-modifiable parts of a User.""" # noqa: E501 + + company: Union[Unset, str] = UNSET + discord: Union[Unset, str] = UNSET + first_name: Union[Unset, str] = UNSET + github: Union[Unset, str] = UNSET + last_name: Union[Unset, str] = UNSET + phone: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + company = self.company + discord = self.discord + first_name = self.first_name + github = self.github + last_name = self.last_name + phone = self.phone + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if company is not UNSET: + field_dict["company"] = company + if discord is not UNSET: + field_dict["discord"] = discord + if first_name is not UNSET: + field_dict["first_name"] = first_name + if github is not UNSET: + field_dict["github"] = github + if last_name is not UNSET: + field_dict["last_name"] = last_name + if phone is not UNSET: + field_dict["phone"] = phone + + return field_dict + + @classmethod + def from_dict(cls: Type[BT], src_dict: Dict[str, Any]) -> BT: + d = src_dict.copy() + company = d.pop("company", UNSET) + + discord = d.pop("discord", UNSET) + + first_name = d.pop("first_name", UNSET) + + github = d.pop("github", UNSET) + + last_name = d.pop("last_name", UNSET) + + phone = d.pop("phone", UNSET) + + update_user = cls( + company=company, + discord=discord, + first_name=first_name, + github=github, + last_name=last_name, + phone=phone, + ) + + update_user.additional_properties = d + return update_user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/user.py b/kittycad/models/user.py index 10adf4eb6..f4f59fd6e 100644 --- a/kittycad/models/user.py +++ b/kittycad/models/user.py @@ -4,158 +4,165 @@ import attr from dateutil.parser import isoparse +from ..models.uuid import Uuid from ..types import UNSET, Unset -AS = TypeVar("AS", bound="User") +GR = TypeVar("GR", bound="User") + @attr.s(auto_attribs=True) class User: - """ A user. """ # noqa: E501 - company: Union[Unset, str] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - discord: Union[Unset, str] = UNSET - email: Union[Unset, str] = UNSET - email_verified: Union[Unset, datetime.datetime] = UNSET - first_name: Union[Unset, str] = UNSET - github: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - image: Union[Unset, str] = UNSET - last_name: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - phone: Union[Unset, str] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - company = self.company - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - discord = self.discord - email = self.email - email_verified: Union[Unset, str] = UNSET - if not isinstance(self.email_verified, Unset): - email_verified = self.email_verified.isoformat() - first_name = self.first_name - github = self.github - id = self.id - image = self.image - last_name = self.last_name - name = self.name - phone = self.phone - 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.update(self.additional_properties) - field_dict.update({}) - if company is not UNSET: - field_dict['company'] = company - if created_at is not UNSET: - field_dict['created_at'] = created_at - if discord is not UNSET: - field_dict['discord'] = discord - if email is not UNSET: - field_dict['email'] = email - if email_verified is not UNSET: - field_dict['email_verified'] = email_verified - if first_name is not UNSET: - field_dict['first_name'] = first_name - if github is not UNSET: - field_dict['github'] = github - if id is not UNSET: - field_dict['id'] = id - if image is not UNSET: - field_dict['image'] = image - if last_name is not UNSET: - field_dict['last_name'] = last_name - if name is not UNSET: - field_dict['name'] = name - if phone is not UNSET: - field_dict['phone'] = phone - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: Type[AS], src_dict: Dict[str, Any]) -> AS: - d = src_dict.copy() - company = d.pop("company", UNSET) - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - discord = d.pop("discord", UNSET) - - email = d.pop("email", UNSET) - - _email_verified = d.pop("email_verified", UNSET) - email_verified: Union[Unset, datetime.datetime] - if isinstance(_email_verified, Unset): - email_verified = UNSET - else: - email_verified = isoparse(_email_verified) - - first_name = d.pop("first_name", UNSET) - - github = d.pop("github", UNSET) - - id = d.pop("id", UNSET) - - image = d.pop("image", UNSET) - - last_name = d.pop("last_name", UNSET) - - name = d.pop("name", UNSET) - - phone = d.pop("phone", UNSET) - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - - user = cls( - company= company, - created_at= created_at, - discord= discord, - email= email, - email_verified= email_verified, - first_name= first_name, - github= github, - id= id, - image= image, - last_name= last_name, - name= name, - phone= phone, - updated_at= updated_at, - ) - - user.additional_properties = d - return user - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """A user.""" # noqa: E501 + + company: Union[Unset, str] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + discord: Union[Unset, str] = UNSET + email: Union[Unset, str] = UNSET + email_verified: Union[Unset, datetime.datetime] = UNSET + first_name: Union[Unset, str] = UNSET + github: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + image: Union[Unset, str] = UNSET + last_name: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + phone: Union[Unset, str] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + company = self.company + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + discord = self.discord + email = self.email + email_verified: Union[Unset, str] = UNSET + if not isinstance(self.email_verified, Unset): + email_verified = self.email_verified.isoformat() + first_name = self.first_name + github = self.github + id = self.id + image = self.image + last_name = self.last_name + name = self.name + phone = self.phone + 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.update(self.additional_properties) + field_dict.update({}) + if company is not UNSET: + field_dict["company"] = company + if created_at is not UNSET: + field_dict["created_at"] = created_at + if discord is not UNSET: + field_dict["discord"] = discord + if email is not UNSET: + field_dict["email"] = email + if email_verified is not UNSET: + field_dict["email_verified"] = email_verified + if first_name is not UNSET: + field_dict["first_name"] = first_name + if github is not UNSET: + field_dict["github"] = github + if id is not UNSET: + field_dict["id"] = id + if image is not UNSET: + field_dict["image"] = image + if last_name is not UNSET: + field_dict["last_name"] = last_name + if name is not UNSET: + field_dict["name"] = name + if phone is not UNSET: + field_dict["phone"] = phone + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: Type[GR], src_dict: Dict[str, Any]) -> GR: + d = src_dict.copy() + company = d.pop("company", UNSET) + + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + discord = d.pop("discord", UNSET) + + email = d.pop("email", UNSET) + + _email_verified = d.pop("email_verified", UNSET) + email_verified: Union[Unset, datetime.datetime] + if isinstance(_email_verified, Unset): + email_verified = UNSET + else: + email_verified = isoparse(_email_verified) + + first_name = d.pop("first_name", UNSET) + + github = d.pop("github", UNSET) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + image = d.pop("image", UNSET) + + last_name = d.pop("last_name", UNSET) + + name = d.pop("name", UNSET) + + phone = d.pop("phone", UNSET) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + user = cls( + company=company, + created_at=created_at, + discord=discord, + email=email, + email_verified=email_verified, + first_name=first_name, + github=github, + id=id, + image=image, + last_name=last_name, + name=name, + phone=phone, + updated_at=updated_at, + ) + + user.additional_properties = d + return user + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/user_results_page.py b/kittycad/models/user_results_page.py index 62a80b938..df79ad03b 100644 --- a/kittycad/models/user_results_page.py +++ b/kittycad/models/user_results_page.py @@ -4,63 +4,67 @@ from ..types import UNSET, Unset -IU = TypeVar("IU", bound="UserResultsPage") +AG = TypeVar("AG", bound="UserResultsPage") + @attr.s(auto_attribs=True) class UserResultsPage: - """ A single page of results """ # noqa: E501 - from ..models.user import User - items: Union[Unset, List[User]] = UNSET - next_page: Union[Unset, str] = UNSET + """A single page of results""" # noqa: E501 + + from ..models.user import User + + items: Union[Unset, List[User]] = UNSET + next_page: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + from ..models.user import User - def to_dict(self) -> Dict[str, Any]: - from ..models.user import User - items: Union[Unset, List[User]] = UNSET - if not isinstance(self.items, Unset): - items = self.items - next_page = self.next_page + items: Union[Unset, List[User]] = UNSET + if not isinstance(self.items, Unset): + items = self.items + next_page = self.next_page - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if items is not UNSET: - field_dict['items'] = items - if next_page is not UNSET: - field_dict['next_page'] = next_page + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if items is not UNSET: + field_dict["items"] = items + if next_page is not UNSET: + field_dict["next_page"] = next_page - return field_dict + return field_dict - @classmethod - def from_dict(cls: Type[IU], src_dict: Dict[str, Any]) -> IU: - d = src_dict.copy() - from ..models.user import User - items = cast(List[User], d.pop("items", UNSET)) + @classmethod + def from_dict(cls: Type[AG], src_dict: Dict[str, Any]) -> AG: + d = src_dict.copy() + from ..models.user import User - next_page = d.pop("next_page", UNSET) + items = cast(List[User], d.pop("items", UNSET)) + next_page = d.pop("next_page", UNSET) - user_results_page = cls( - items= items, - next_page= next_page, - ) + user_results_page = cls( + items=items, + next_page=next_page, + ) - user_results_page.additional_properties = d - return user_results_page + user_results_page.additional_properties = d + return user_results_page - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/uuid.py b/kittycad/models/uuid.py index 19b528669..89c0dbd36 100644 --- a/kittycad/models/uuid.py +++ b/kittycad/models/uuid.py @@ -1,4 +1,3 @@ class Uuid(str): - - def __str__(self) -> str: - return self + def __str__(self) -> str: + return self diff --git a/kittycad/models/uuid_binary.py b/kittycad/models/uuid_binary.py new file mode 100644 index 000000000..36dc9f9e0 --- /dev/null +++ b/kittycad/models/uuid_binary.py @@ -0,0 +1,3 @@ +class UuidBinary(str): + def __str__(self) -> str: + return self diff --git a/kittycad/models/verification_token.py b/kittycad/models/verification_token.py index b15ffebe3..eac8efc32 100644 --- a/kittycad/models/verification_token.py +++ b/kittycad/models/verification_token.py @@ -4,104 +4,111 @@ import attr from dateutil.parser import isoparse +from ..models.uuid import Uuid from ..types import UNSET, Unset -YQ = TypeVar("YQ", bound="VerificationToken") +EJ = TypeVar("EJ", bound="VerificationToken") + @attr.s(auto_attribs=True) class VerificationToken: - """ A verification token for a user. - -This is typically used to verify a user's email address. """ # noqa: E501 - created_at: Union[Unset, datetime.datetime] = UNSET - expires: Union[Unset, datetime.datetime] = UNSET - id: Union[Unset, str] = UNSET - identifier: Union[Unset, str] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - expires: Union[Unset, str] = UNSET - if not isinstance(self.expires, Unset): - expires = self.expires.isoformat() - id = self.id - identifier = self.identifier - 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.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict['created_at'] = created_at - if expires is not UNSET: - field_dict['expires'] = expires - if id is not UNSET: - field_dict['id'] = id - if identifier is not UNSET: - field_dict['identifier'] = identifier - if updated_at is not UNSET: - field_dict['updated_at'] = updated_at - - return field_dict - - @classmethod - def from_dict(cls: Type[YQ], src_dict: Dict[str, Any]) -> YQ: - d = src_dict.copy() - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - _expires = d.pop("expires", UNSET) - expires: Union[Unset, datetime.datetime] - if isinstance(_expires, Unset): - expires = UNSET - else: - expires = isoparse(_expires) - - id = d.pop("id", UNSET) - - identifier = d.pop("identifier", UNSET) - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - - verification_token = cls( - created_at= created_at, - expires= expires, - id= id, - identifier= identifier, - updated_at= updated_at, - ) - - verification_token.additional_properties = d - return verification_token - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + """A verification token for a user. + + This is typically used to verify a user's email address.""" # noqa: E501 + + created_at: Union[Unset, datetime.datetime] = UNSET + expires: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + identifier: Union[Unset, str] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + expires: Union[Unset, str] = UNSET + if not isinstance(self.expires, Unset): + expires = self.expires.isoformat() + id = self.id + identifier = self.identifier + 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.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict["created_at"] = created_at + if expires is not UNSET: + field_dict["expires"] = expires + if id is not UNSET: + field_dict["id"] = id + if identifier is not UNSET: + field_dict["identifier"] = identifier + if updated_at is not UNSET: + field_dict["updated_at"] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: Type[EJ], src_dict: Dict[str, Any]) -> EJ: + d = src_dict.copy() + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _expires = d.pop("expires", UNSET) + expires: Union[Unset, datetime.datetime] + if isinstance(_expires, Unset): + expires = UNSET + else: + expires = isoparse(_expires) + + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] + + identifier = d.pop("identifier", UNSET) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + verification_token = cls( + created_at=created_at, + expires=expires, + id=id, + identifier=identifier, + updated_at=updated_at, + ) + + verification_token.additional_properties = d + return verification_token + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/volume.py b/kittycad/models/volume.py index 1bbf38dd3..f0ec2cc0c 100644 --- a/kittycad/models/volume.py +++ b/kittycad/models/volume.py @@ -5,64 +5,65 @@ from ..models.unit_volume import UnitVolume from ..types import UNSET, Unset -NQ = TypeVar("NQ", bound="Volume") +EA = TypeVar("EA", bound="Volume") + @attr.s(auto_attribs=True) class Volume: - """ The volume response. """ # noqa: E501 - output_unit: Union[Unset, UnitVolume] = UNSET - volume: Union[Unset, float] = UNSET + """The volume response.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + output_unit: Union[Unset, UnitVolume] = UNSET + volume: Union[Unset, float] = UNSET - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - volume = self.volume + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if output_unit is not UNSET: - field_dict['output_unit'] = output_unit - if volume is not UNSET: - field_dict['volume'] = volume + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + volume = self.volume - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if volume is not UNSET: + field_dict["volume"] = volume - @classmethod - def from_dict(cls: Type[NQ], src_dict: Dict[str, Any]) -> NQ: - d = src_dict.copy() - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitVolume] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + return field_dict - volume = d.pop("volume", UNSET) + @classmethod + def from_dict(cls: Type[EA], src_dict: Dict[str, Any]) -> EA: + d = src_dict.copy() + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitVolume] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + volume = d.pop("volume", UNSET) - volume = cls( - output_unit= output_unit, - volume= volume, - ) + volume = cls( + output_unit=output_unit, + volume=volume, + ) - volume.additional_properties = d - return volume + volume.additional_properties = d + return volume - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/web_socket_request.py b/kittycad/models/web_socket_request.py index faf3b1895..2ae22deeb 100644 --- a/kittycad/models/web_socket_request.py +++ b/kittycad/models/web_socket_request.py @@ -9,384 +9,391 @@ from ..models.rtc_session_description import RtcSessionDescription from ..types import UNSET, Unset -EW = TypeVar("EW", bound="trickle_ice") +LQ = TypeVar("LQ", bound="trickle_ice") + @attr.s(auto_attribs=True) class trickle_ice: - """ The trickle ICE candidate request. """ # noqa: E501 - candidate: Union[Unset, RtcIceCandidateInit] = UNSET - type: str = "trickle_ice" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The trickle ICE candidate request.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.candidate, Unset): - candidate = self.candidate - type = self.type + candidate: Union[Unset, RtcIceCandidateInit] = UNSET + type: str = "trickle_ice" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if candidate is not UNSET: - field_dict['candidate'] = candidate - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.candidate, Unset): + candidate = self.candidate + type = self.type - @classmethod - def from_dict(cls: Type[EW], src_dict: Dict[str, Any]) -> EW: - d = src_dict.copy() - _candidate = d.pop("candidate", UNSET) - candidate: Union[Unset, RtcIceCandidateInit] - if isinstance(_candidate, Unset): - candidate = UNSET - else: - candidate = _candidate # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if candidate is not UNSET: + field_dict["candidate"] = candidate + field_dict["type"] = type - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[LQ], src_dict: Dict[str, Any]) -> LQ: + d = src_dict.copy() + _candidate = d.pop("candidate", UNSET) + candidate: Union[Unset, RtcIceCandidateInit] + if isinstance(_candidate, Unset): + candidate = UNSET + else: + candidate = _candidate # type: ignore[arg-type] - trickle_ice = cls( - candidate= candidate, - type= type, - ) + type = d.pop("type", UNSET) - trickle_ice.additional_properties = d - return trickle_ice + trickle_ice = cls( + candidate=candidate, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + trickle_ice.additional_properties = d + return trickle_ice - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +VW = TypeVar("VW", bound="sdp_offer") -BU = TypeVar("BU", bound="sdp_offer") @attr.s(auto_attribs=True) class sdp_offer: - """ The SDP offer request. """ # noqa: E501 - offer: Union[Unset, RtcSessionDescription] = UNSET - type: str = "sdp_offer" + """The SDP offer request.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + offer: Union[Unset, RtcSessionDescription] = UNSET + type: str = "sdp_offer" - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.offer, Unset): - offer = self.offer - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if offer is not UNSET: - field_dict['offer'] = offer - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.offer, Unset): + offer = self.offer + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if offer is not UNSET: + field_dict["offer"] = offer + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[BU], src_dict: Dict[str, Any]) -> BU: - d = src_dict.copy() - _offer = d.pop("offer", UNSET) - offer: Union[Unset, RtcSessionDescription] - if isinstance(_offer, Unset): - offer = UNSET - else: - offer = _offer # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[VW], src_dict: Dict[str, Any]) -> VW: + d = src_dict.copy() + _offer = d.pop("offer", UNSET) + offer: Union[Unset, RtcSessionDescription] + if isinstance(_offer, Unset): + offer = UNSET + else: + offer = _offer # type: ignore[arg-type] + type = d.pop("type", UNSET) - sdp_offer = cls( - offer= offer, - type= type, - ) + sdp_offer = cls( + offer=offer, + type=type, + ) - sdp_offer.additional_properties = d - return sdp_offer + sdp_offer.additional_properties = d + return sdp_offer - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +DP = TypeVar("DP", bound="modeling_cmd_req") -BT = TypeVar("BT", bound="modeling_cmd_req") - @attr.s(auto_attribs=True) class modeling_cmd_req: - """ The modeling command request. """ # noqa: E501 - cmd: Union[Unset, ModelingCmd] = UNSET - cmd_id: Union[Unset, ModelingCmdId] = UNSET - type: str = "modeling_cmd_req" - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + """The modeling command request.""" # noqa: E501 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.cmd, Unset): - cmd = self.cmd - if not isinstance(self.cmd_id, Unset): - cmd_id = self.cmd_id - type = self.type + cmd: Union[Unset, ModelingCmd] = UNSET + cmd_id: Union[Unset, ModelingCmdId] = UNSET + type: str = "modeling_cmd_req" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if cmd is not UNSET: - field_dict['cmd'] = cmd - if cmd_id is not UNSET: - field_dict['cmd_id'] = cmd_id - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.cmd, Unset): + cmd = self.cmd + if not isinstance(self.cmd_id, Unset): + cmd_id = self.cmd_id + type = self.type - @classmethod - def from_dict(cls: Type[BT], src_dict: Dict[str, Any]) -> BT: - d = src_dict.copy() - _cmd = d.pop("cmd", UNSET) - cmd: Union[Unset, ModelingCmd] - if isinstance(_cmd, Unset): - cmd = UNSET - else: - cmd = _cmd # type: ignore[arg-type] + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cmd is not UNSET: + field_dict["cmd"] = cmd + if cmd_id is not UNSET: + field_dict["cmd_id"] = cmd_id + field_dict["type"] = type - _cmd_id = d.pop("cmd_id", UNSET) - cmd_id: Union[Unset, ModelingCmdId] - if isinstance(_cmd_id, Unset): - cmd_id = UNSET - else: - cmd_id = _cmd_id # type: ignore[arg-type] + return field_dict - type = d.pop("type", UNSET) + @classmethod + def from_dict(cls: Type[DP], src_dict: Dict[str, Any]) -> DP: + d = src_dict.copy() + _cmd = d.pop("cmd", UNSET) + cmd: Union[Unset, ModelingCmd] + if isinstance(_cmd, Unset): + cmd = UNSET + else: + cmd = _cmd # type: ignore[arg-type] + _cmd_id = d.pop("cmd_id", UNSET) + cmd_id: Union[Unset, ModelingCmdId] + if isinstance(_cmd_id, Unset): + cmd_id = UNSET + else: + cmd_id = _cmd_id # type: ignore[arg-type] - modeling_cmd_req = cls( - cmd= cmd, - cmd_id= cmd_id, - type= type, - ) + type = d.pop("type", UNSET) - modeling_cmd_req.additional_properties = d - return modeling_cmd_req + modeling_cmd_req = cls( + cmd=cmd, + cmd_id=cmd_id, + type=type, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + modeling_cmd_req.additional_properties = d + return modeling_cmd_req - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +JO = TypeVar("JO", bound="modeling_cmd_batch_req") -GR = TypeVar("GR", bound="modeling_cmd_batch_req") @attr.s(auto_attribs=True) class modeling_cmd_batch_req: - """ A sequence of modeling requests. If any request fails, following requests will not be tried. """ # noqa: E501 - from ..models.modeling_cmd_req import ModelingCmdReq - requests: Union[Unset, List[ModelingCmdReq]] = UNSET - type: str = "modeling_cmd_batch_req" + """A sequence of modeling requests. If any request fails, following requests will not be tried.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + from ..models.modeling_cmd_req import ModelingCmdReq - def to_dict(self) -> Dict[str, Any]: - from ..models.modeling_cmd_req import ModelingCmdReq - requests: Union[Unset, List[ModelingCmdReq]] = UNSET - if not isinstance(self.requests, Unset): - requests = self.requests - type = self.type + requests: Union[Unset, List[ModelingCmdReq]] = UNSET + type: str = "modeling_cmd_batch_req" - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if requests is not UNSET: - field_dict['requests'] = requests - field_dict['type'] = type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - return field_dict + def to_dict(self) -> Dict[str, Any]: + from ..models.modeling_cmd_req import ModelingCmdReq - @classmethod - def from_dict(cls: Type[GR], src_dict: Dict[str, Any]) -> GR: - d = src_dict.copy() - from ..models.modeling_cmd_req import ModelingCmdReq - requests = cast(List[ModelingCmdReq], d.pop("requests", UNSET)) + requests: Union[Unset, List[ModelingCmdReq]] = UNSET + if not isinstance(self.requests, Unset): + requests = self.requests + type = self.type - type = d.pop("type", UNSET) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if requests is not UNSET: + field_dict["requests"] = requests + field_dict["type"] = type + return field_dict - modeling_cmd_batch_req = cls( - requests= requests, - type= type, - ) + @classmethod + def from_dict(cls: Type[JO], src_dict: Dict[str, Any]) -> JO: + d = src_dict.copy() + from ..models.modeling_cmd_req import ModelingCmdReq - modeling_cmd_batch_req.additional_properties = d - return modeling_cmd_batch_req + requests = cast(List[ModelingCmdReq], d.pop("requests", UNSET)) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + type = d.pop("type", UNSET) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + modeling_cmd_batch_req = cls( + requests=requests, + type=type, + ) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + modeling_cmd_batch_req.additional_properties = d + return modeling_cmd_batch_req - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +OF = TypeVar("OF", bound="ping") -AG = TypeVar("AG", bound="ping") @attr.s(auto_attribs=True) class ping: - """ The client-to-server Ping to ensure the WebSocket stays alive. """ # noqa: E501 - type: str = "ping" + """The client-to-server Ping to ensure the WebSocket stays alive.""" # noqa: E501 - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + type: str = "ping" - def to_dict(self) -> Dict[str, Any]: - type = self.type + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict['type'] = type + def to_dict(self) -> Dict[str, Any]: + type = self.type - return field_dict + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type - @classmethod - def from_dict(cls: Type[AG], src_dict: Dict[str, Any]) -> AG: - d = src_dict.copy() - type = d.pop("type", UNSET) + return field_dict + @classmethod + def from_dict(cls: Type[OF], src_dict: Dict[str, Any]) -> OF: + d = src_dict.copy() + type = d.pop("type", UNSET) - ping = cls( - type= type, - ) + ping = cls( + type=type, + ) - ping.additional_properties = d - return ping + ping.additional_properties = d + return ping - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties +TE = TypeVar("TE", bound="metrics_response") -EJ = TypeVar("EJ", bound="metrics_response") - @attr.s(auto_attribs=True) class metrics_response: - """ The response to a metrics collection request from the server. """ # noqa: E501 - metrics: Union[Unset, ClientMetrics] = UNSET - type: str = "metrics_response" + """The response to a metrics collection request from the server.""" # noqa: E501 + + metrics: Union[Unset, ClientMetrics] = UNSET + type: str = "metrics_response" - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.metrics, Unset): - metrics = self.metrics - type = self.type + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.metrics, Unset): + metrics = self.metrics + type = self.type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if metrics is not UNSET: - field_dict['metrics'] = metrics - field_dict['type'] = type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if metrics is not UNSET: + field_dict["metrics"] = metrics + field_dict["type"] = type - return field_dict + return field_dict - @classmethod - def from_dict(cls: Type[EJ], src_dict: Dict[str, Any]) -> EJ: - d = src_dict.copy() - _metrics = d.pop("metrics", UNSET) - metrics: Union[Unset, ClientMetrics] - if isinstance(_metrics, Unset): - metrics = UNSET - else: - metrics = _metrics # type: ignore[arg-type] + @classmethod + def from_dict(cls: Type[TE], src_dict: Dict[str, Any]) -> TE: + d = src_dict.copy() + _metrics = d.pop("metrics", UNSET) + metrics: Union[Unset, ClientMetrics] + if isinstance(_metrics, Unset): + metrics = UNSET + else: + metrics = _metrics # type: ignore[arg-type] - type = d.pop("type", UNSET) + type = d.pop("type", UNSET) + metrics_response = cls( + metrics=metrics, + type=type, + ) - metrics_response = cls( - metrics= metrics, - type= type, - ) + metrics_response.additional_properties = d + return metrics_response - metrics_response.additional_properties = d - return metrics_response + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties - def __contains__(self, key: str) -> bool: - return key in self.additional_properties -WebSocketRequest = Union[trickle_ice, sdp_offer, modeling_cmd_req, modeling_cmd_batch_req, ping, metrics_response] +WebSocketRequest = Union[ + trickle_ice, + sdp_offer, + modeling_cmd_req, + modeling_cmd_batch_req, + ping, + metrics_response, +]