thrustlab 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. thrustlab/__init__.py +23 -0
  2. thrustlab/_async_polling.py +47 -0
  3. thrustlab/_http.py +166 -0
  4. thrustlab/_models/__init__.py +211 -0
  5. thrustlab/_models/api_key.py +184 -0
  6. thrustlab/_models/api_key_create.py +74 -0
  7. thrustlab/_models/api_key_with_secret.py +192 -0
  8. thrustlab/_models/billing_portal_session_resource.py +74 -0
  9. thrustlab/_models/checkout_session_resource.py +94 -0
  10. thrustlab/_models/component_brand.py +80 -0
  11. thrustlab/_models/component_brands_response.py +108 -0
  12. thrustlab/_models/component_create_body.py +83 -0
  13. thrustlab/_models/component_create_body_spec_json.py +46 -0
  14. thrustlab/_models/component_list_response.py +108 -0
  15. thrustlab/_models/component_patch.py +111 -0
  16. thrustlab/_models/component_patch_spec_json_type_0.py +46 -0
  17. thrustlab/_models/component_resource.py +188 -0
  18. thrustlab/_models/component_resource_spec_json.py +46 -0
  19. thrustlab/_models/create_webhook_endpoint_v1_webhook_endpoints_post_response_create_webhook_endpoint_v1_webhook_endpoints_post.py +50 -0
  20. thrustlab/_models/credit_balance_resource.py +135 -0
  21. thrustlab/_models/credit_bucket_breakdown.py +92 -0
  22. thrustlab/_models/credit_bucket_breakdown_type.py +9 -0
  23. thrustlab/_models/credit_usage_event_resource.py +154 -0
  24. thrustlab/_models/credit_usage_event_resource_credit_type.py +9 -0
  25. thrustlab/_models/credit_usage_event_resource_type.py +16 -0
  26. thrustlab/_models/credit_usage_list_response.py +116 -0
  27. thrustlab/_models/credit_usage_related_resource.py +71 -0
  28. thrustlab/_models/credit_usage_related_resource_object.py +9 -0
  29. thrustlab/_models/fire_test_event_v1_webhook_endpoints_public_id_test_post_response_fire_test_event_v1_webhook_endpoints_public_id_test_post.py +48 -0
  30. thrustlab/_models/get_delivery_v1_webhook_endpoints_public_id_deliveries_delivery_public_id_get_response_get_delivery_v1_webhook_endpoints_public_id_deliveries_delivery_public_id_get.py +49 -0
  31. thrustlab/_models/get_event_v1_events_event_id_get_response_get_event_v1_events_event_id_get.py +46 -0
  32. thrustlab/_models/get_webhook_endpoint_v1_webhook_endpoints_public_id_get_response_get_webhook_endpoint_v1_webhook_endpoints_public_id_get.py +48 -0
  33. thrustlab/_models/http_validation_error.py +79 -0
  34. thrustlab/_models/list_deliveries_v1_webhook_endpoints_public_id_deliveries_get_response_list_deliveries_v1_webhook_endpoints_public_id_deliveries_get.py +49 -0
  35. thrustlab/_models/list_events_v1_events_get_response_list_events_v1_events_get.py +46 -0
  36. thrustlab/_models/list_response_api_key.py +116 -0
  37. thrustlab/_models/list_webhook_endpoints_v1_webhook_endpoints_get_response_list_webhook_endpoints_v1_webhook_endpoints_get.py +46 -0
  38. thrustlab/_models/patch_webhook_endpoint_v1_webhook_endpoints_public_id_patch_response_patch_webhook_endpoint_v1_webhook_endpoints_public_id_patch.py +49 -0
  39. thrustlab/_models/portal_session_in.py +42 -0
  40. thrustlab/_models/project_create_body.py +103 -0
  41. thrustlab/_models/project_list_response.py +108 -0
  42. thrustlab/_models/project_patch.py +113 -0
  43. thrustlab/_models/project_resource.py +127 -0
  44. thrustlab/_models/retry_delivery_v1_webhook_endpoints_public_id_deliveries_delivery_public_id_retry_post_response_retry_delivery_v1_webhook_endpoints_public_id_deliveries_delivery_public_id_retry_post.py +49 -0
  45. thrustlab/_models/rotate_webhook_secret_v1_webhook_endpoints_public_id_rotate_secret_post_response_rotate_webhook_secret_v1_webhook_endpoints_public_id_rotate_secret_post.py +49 -0
  46. thrustlab/_models/rotor_group_in.py +107 -0
  47. thrustlab/_models/rotor_group_resource.py +97 -0
  48. thrustlab/_models/simulation_cancel_body.py +24 -0
  49. thrustlab/_models/simulation_create_body.py +128 -0
  50. thrustlab/_models/simulation_inputs.py +66 -0
  51. thrustlab/_models/simulation_list_response.py +88 -0
  52. thrustlab/_models/simulation_patch.py +121 -0
  53. thrustlab/_models/simulation_patch_plot_config_json_type_0_item.py +46 -0
  54. thrustlab/_models/simulation_resource.py +283 -0
  55. thrustlab/_models/simulation_resource_error_type_0.py +46 -0
  56. thrustlab/_models/simulation_resource_plot_config_json_type_0_item.py +46 -0
  57. thrustlab/_models/simulation_resource_result_type_0.py +46 -0
  58. thrustlab/_models/starred_component_create_body.py +80 -0
  59. thrustlab/_models/starred_component_list_response.py +108 -0
  60. thrustlab/_models/starred_component_resource.py +106 -0
  61. thrustlab/_models/submission_create_body.py +121 -0
  62. thrustlab/_models/submission_create_body_data_json.py +46 -0
  63. thrustlab/_models/submission_list_response.py +108 -0
  64. thrustlab/_models/submission_patch.py +174 -0
  65. thrustlab/_models/submission_patch_data_json_type_0.py +46 -0
  66. thrustlab/_models/submission_resource.py +197 -0
  67. thrustlab/_models/submission_resource_data_json.py +46 -0
  68. thrustlab/_models/subscription_create.py +58 -0
  69. thrustlab/_models/subscription_resource.py +168 -0
  70. thrustlab/_models/subscription_resource_status.py +12 -0
  71. thrustlab/_models/subscription_resource_tier.py +12 -0
  72. thrustlab/_models/sweep_cancel_body.py +42 -0
  73. thrustlab/_models/sweep_config_in.py +172 -0
  74. thrustlab/_models/sweep_create_body.py +138 -0
  75. thrustlab/_models/sweep_inputs.py +66 -0
  76. thrustlab/_models/sweep_list_response.py +88 -0
  77. thrustlab/_models/sweep_param_range_in.py +136 -0
  78. thrustlab/_models/sweep_param_range_in_mode.py +9 -0
  79. thrustlab/_models/sweep_patch.py +121 -0
  80. thrustlab/_models/sweep_patch_plot_config_json_type_0_item.py +46 -0
  81. thrustlab/_models/sweep_point_list_response.py +88 -0
  82. thrustlab/_models/sweep_point_resource.py +103 -0
  83. thrustlab/_models/sweep_point_resource_inputs.py +46 -0
  84. thrustlab/_models/sweep_point_resource_rotors_type_0.py +46 -0
  85. thrustlab/_models/sweep_resource.py +327 -0
  86. thrustlab/_models/sweep_resource_error_type_0.py +46 -0
  87. thrustlab/_models/sweep_resource_plot_config_json_type_0_item.py +46 -0
  88. thrustlab/_models/sweep_resource_summary_type_0.py +46 -0
  89. thrustlab/_models/sweep_resource_sweep_config_type_0.py +46 -0
  90. thrustlab/_models/sweep_rotor_group_in.py +95 -0
  91. thrustlab/_models/types.py +55 -0
  92. thrustlab/_models/user_patch.py +73 -0
  93. thrustlab/_models/user_resource.py +170 -0
  94. thrustlab/_models/v1_health_v1_health_get_response_v1_health_v1_health_get.py +46 -0
  95. thrustlab/_models/validation_error.py +90 -0
  96. thrustlab/_models/webhook_endpoint_create.py +91 -0
  97. thrustlab/_models/webhook_endpoint_patch.py +144 -0
  98. thrustlab/_pagination.py +109 -0
  99. thrustlab/_version.py +3 -0
  100. thrustlab/client.py +100 -0
  101. thrustlab/exceptions.py +121 -0
  102. thrustlab/resources/__init__.py +1 -0
  103. thrustlab/resources/_base.py +12 -0
  104. thrustlab/resources/api_keys.py +43 -0
  105. thrustlab/resources/components.py +60 -0
  106. thrustlab/resources/credits.py +40 -0
  107. thrustlab/resources/projects.py +54 -0
  108. thrustlab/resources/simulations.py +74 -0
  109. thrustlab/resources/starred_components.py +57 -0
  110. thrustlab/resources/submissions.py +44 -0
  111. thrustlab/resources/subscriptions.py +42 -0
  112. thrustlab/resources/sweeps.py +96 -0
  113. thrustlab/resources/users.py +13 -0
  114. thrustlab/resources/webhook_endpoints.py +138 -0
  115. thrustlab/webhooks.py +121 -0
  116. thrustlab-0.1.0.dist-info/METADATA +190 -0
  117. thrustlab-0.1.0.dist-info/RECORD +119 -0
  118. thrustlab-0.1.0.dist-info/WHEEL +4 -0
  119. thrustlab-0.1.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,108 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar, cast
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from thrustlab._models.types import UNSET, Unset
10
+
11
+ if TYPE_CHECKING:
12
+ from thrustlab._models.project_resource import ProjectResource
13
+
14
+
15
+ T = TypeVar("T", bound="ProjectListResponse")
16
+
17
+
18
+ @_attrs_define
19
+ class ProjectListResponse:
20
+ """
21
+ Attributes:
22
+ data (list[ProjectResource]):
23
+ has_more (bool):
24
+ next_cursor (None | str):
25
+ object_ (str | Unset): Default: 'list'.
26
+ """
27
+
28
+ data: list[ProjectResource]
29
+ has_more: bool
30
+ next_cursor: None | str
31
+ object_: str | Unset = "list"
32
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
33
+
34
+ def to_dict(self) -> dict[str, Any]:
35
+ data = []
36
+ for data_item_data in self.data:
37
+ data_item = data_item_data.to_dict()
38
+ data.append(data_item)
39
+
40
+ has_more = self.has_more
41
+
42
+ next_cursor: None | str
43
+ next_cursor = self.next_cursor
44
+
45
+ object_ = self.object_
46
+
47
+ field_dict: dict[str, Any] = {}
48
+ field_dict.update(self.additional_properties)
49
+ field_dict.update(
50
+ {
51
+ "data": data,
52
+ "has_more": has_more,
53
+ "next_cursor": next_cursor,
54
+ }
55
+ )
56
+ if object_ is not UNSET:
57
+ field_dict["object"] = object_
58
+
59
+ return field_dict
60
+
61
+ @classmethod
62
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
63
+ from thrustlab._models.project_resource import ProjectResource
64
+
65
+ d = dict(src_dict)
66
+ data = []
67
+ _data = d.pop("data")
68
+ for data_item_data in _data:
69
+ data_item = ProjectResource.from_dict(data_item_data)
70
+
71
+ data.append(data_item)
72
+
73
+ has_more = d.pop("has_more")
74
+
75
+ def _parse_next_cursor(data: object) -> None | str:
76
+ if data is None:
77
+ return data
78
+ return cast(None | str, data)
79
+
80
+ next_cursor = _parse_next_cursor(d.pop("next_cursor"))
81
+
82
+ object_ = d.pop("object", UNSET)
83
+
84
+ project_list_response = cls(
85
+ data=data,
86
+ has_more=has_more,
87
+ next_cursor=next_cursor,
88
+ object_=object_,
89
+ )
90
+
91
+ project_list_response.additional_properties = d
92
+ return project_list_response
93
+
94
+ @property
95
+ def additional_keys(self) -> list[str]:
96
+ return list(self.additional_properties.keys())
97
+
98
+ def __getitem__(self, key: str) -> Any:
99
+ return self.additional_properties[key]
100
+
101
+ def __setitem__(self, key: str, value: Any) -> None:
102
+ self.additional_properties[key] = value
103
+
104
+ def __delitem__(self, key: str) -> None:
105
+ del self.additional_properties[key]
106
+
107
+ def __contains__(self, key: str) -> bool:
108
+ return key in self.additional_properties
@@ -0,0 +1,113 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar, cast
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from thrustlab._models.types import UNSET, Unset
10
+
11
+ T = TypeVar("T", bound="ProjectPatch")
12
+
13
+
14
+ @_attrs_define
15
+ class ProjectPatch:
16
+ """
17
+ Attributes:
18
+ aircraft_type_tag (None | str | Unset):
19
+ name (None | str | Unset):
20
+ notes (None | str | Unset):
21
+ """
22
+
23
+ aircraft_type_tag: None | str | Unset = UNSET
24
+ name: None | str | Unset = UNSET
25
+ notes: None | str | Unset = UNSET
26
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ aircraft_type_tag: None | str | Unset
30
+ if isinstance(self.aircraft_type_tag, Unset):
31
+ aircraft_type_tag = UNSET
32
+ else:
33
+ aircraft_type_tag = self.aircraft_type_tag
34
+
35
+ name: None | str | Unset
36
+ if isinstance(self.name, Unset):
37
+ name = UNSET
38
+ else:
39
+ name = self.name
40
+
41
+ notes: None | str | Unset
42
+ if isinstance(self.notes, Unset):
43
+ notes = UNSET
44
+ else:
45
+ notes = self.notes
46
+
47
+ field_dict: dict[str, Any] = {}
48
+ field_dict.update(self.additional_properties)
49
+ field_dict.update({})
50
+ if aircraft_type_tag is not UNSET:
51
+ field_dict["aircraft_type_tag"] = aircraft_type_tag
52
+ if name is not UNSET:
53
+ field_dict["name"] = name
54
+ if notes is not UNSET:
55
+ field_dict["notes"] = notes
56
+
57
+ return field_dict
58
+
59
+ @classmethod
60
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
61
+ d = dict(src_dict)
62
+
63
+ def _parse_aircraft_type_tag(data: object) -> None | str | Unset:
64
+ if data is None:
65
+ return data
66
+ if isinstance(data, Unset):
67
+ return data
68
+ return cast(None | str | Unset, data)
69
+
70
+ aircraft_type_tag = _parse_aircraft_type_tag(d.pop("aircraft_type_tag", UNSET))
71
+
72
+ def _parse_name(data: object) -> None | str | Unset:
73
+ if data is None:
74
+ return data
75
+ if isinstance(data, Unset):
76
+ return data
77
+ return cast(None | str | Unset, data)
78
+
79
+ name = _parse_name(d.pop("name", UNSET))
80
+
81
+ def _parse_notes(data: object) -> None | str | Unset:
82
+ if data is None:
83
+ return data
84
+ if isinstance(data, Unset):
85
+ return data
86
+ return cast(None | str | Unset, data)
87
+
88
+ notes = _parse_notes(d.pop("notes", UNSET))
89
+
90
+ project_patch = cls(
91
+ aircraft_type_tag=aircraft_type_tag,
92
+ name=name,
93
+ notes=notes,
94
+ )
95
+
96
+ project_patch.additional_properties = d
97
+ return project_patch
98
+
99
+ @property
100
+ def additional_keys(self) -> list[str]:
101
+ return list(self.additional_properties.keys())
102
+
103
+ def __getitem__(self, key: str) -> Any:
104
+ return self.additional_properties[key]
105
+
106
+ def __setitem__(self, key: str, value: Any) -> None:
107
+ self.additional_properties[key] = value
108
+
109
+ def __delitem__(self, key: str) -> None:
110
+ del self.additional_properties[key]
111
+
112
+ def __contains__(self, key: str) -> bool:
113
+ return key in self.additional_properties
@@ -0,0 +1,127 @@
1
+ from __future__ import annotations
2
+
3
+ import datetime
4
+ from collections.abc import Mapping
5
+ from typing import Any, TypeVar, cast
6
+
7
+ from attrs import define as _attrs_define
8
+ from attrs import field as _attrs_field
9
+ from dateutil.parser import isoparse
10
+
11
+ from thrustlab._models.types import UNSET, Unset
12
+
13
+ T = TypeVar("T", bound="ProjectResource")
14
+
15
+
16
+ @_attrs_define
17
+ class ProjectResource:
18
+ """
19
+ Attributes:
20
+ aircraft_type_tag (None | str):
21
+ created_at (datetime.datetime):
22
+ id (str):
23
+ name (str):
24
+ notes (None | str):
25
+ updated_at (datetime.datetime):
26
+ object_ (str | Unset): Default: 'project'.
27
+ """
28
+
29
+ aircraft_type_tag: None | str
30
+ created_at: datetime.datetime
31
+ id: str
32
+ name: str
33
+ notes: None | str
34
+ updated_at: datetime.datetime
35
+ object_: str | Unset = "project"
36
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
37
+
38
+ def to_dict(self) -> dict[str, Any]:
39
+ aircraft_type_tag: None | str
40
+ aircraft_type_tag = self.aircraft_type_tag
41
+
42
+ created_at = self.created_at.isoformat()
43
+
44
+ id = self.id
45
+
46
+ name = self.name
47
+
48
+ notes: None | str
49
+ notes = self.notes
50
+
51
+ updated_at = self.updated_at.isoformat()
52
+
53
+ object_ = self.object_
54
+
55
+ field_dict: dict[str, Any] = {}
56
+ field_dict.update(self.additional_properties)
57
+ field_dict.update(
58
+ {
59
+ "aircraft_type_tag": aircraft_type_tag,
60
+ "created_at": created_at,
61
+ "id": id,
62
+ "name": name,
63
+ "notes": notes,
64
+ "updated_at": updated_at,
65
+ }
66
+ )
67
+ if object_ is not UNSET:
68
+ field_dict["object"] = object_
69
+
70
+ return field_dict
71
+
72
+ @classmethod
73
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
74
+ d = dict(src_dict)
75
+
76
+ def _parse_aircraft_type_tag(data: object) -> None | str:
77
+ if data is None:
78
+ return data
79
+ return cast(None | str, data)
80
+
81
+ aircraft_type_tag = _parse_aircraft_type_tag(d.pop("aircraft_type_tag"))
82
+
83
+ created_at = isoparse(d.pop("created_at"))
84
+
85
+ id = d.pop("id")
86
+
87
+ name = d.pop("name")
88
+
89
+ def _parse_notes(data: object) -> None | str:
90
+ if data is None:
91
+ return data
92
+ return cast(None | str, data)
93
+
94
+ notes = _parse_notes(d.pop("notes"))
95
+
96
+ updated_at = isoparse(d.pop("updated_at"))
97
+
98
+ object_ = d.pop("object", UNSET)
99
+
100
+ project_resource = cls(
101
+ aircraft_type_tag=aircraft_type_tag,
102
+ created_at=created_at,
103
+ id=id,
104
+ name=name,
105
+ notes=notes,
106
+ updated_at=updated_at,
107
+ object_=object_,
108
+ )
109
+
110
+ project_resource.additional_properties = d
111
+ return project_resource
112
+
113
+ @property
114
+ def additional_keys(self) -> list[str]:
115
+ return list(self.additional_properties.keys())
116
+
117
+ def __getitem__(self, key: str) -> Any:
118
+ return self.additional_properties[key]
119
+
120
+ def __setitem__(self, key: str, value: Any) -> None:
121
+ self.additional_properties[key] = value
122
+
123
+ def __delitem__(self, key: str) -> None:
124
+ del self.additional_properties[key]
125
+
126
+ def __contains__(self, key: str) -> bool:
127
+ return key in self.additional_properties
@@ -0,0 +1,49 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ T = TypeVar(
10
+ "T",
11
+ bound="RetryDeliveryV1WebhookEndpointsPublicIdDeliveriesDeliveryPublicIdRetryPostResponseRetryDeliveryV1WebhookEndpointsPublicIdDeliveriesDeliveryPublicIdRetryPost",
12
+ )
13
+
14
+
15
+ @_attrs_define
16
+ class RetryDeliveryV1WebhookEndpointsPublicIdDeliveriesDeliveryPublicIdRetryPostResponseRetryDeliveryV1WebhookEndpointsPublicIdDeliveriesDeliveryPublicIdRetryPost:
17
+ """ """
18
+
19
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
20
+
21
+ def to_dict(self) -> dict[str, Any]:
22
+ field_dict: dict[str, Any] = {}
23
+ field_dict.update(self.additional_properties)
24
+
25
+ return field_dict
26
+
27
+ @classmethod
28
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
29
+ d = dict(src_dict)
30
+ retry_delivery_v1_webhook_endpoints_public_id_deliveries_delivery_public_id_retry_post_response_retry_delivery_v1_webhook_endpoints_public_id_deliveries_delivery_public_id_retry_post = cls()
31
+
32
+ retry_delivery_v1_webhook_endpoints_public_id_deliveries_delivery_public_id_retry_post_response_retry_delivery_v1_webhook_endpoints_public_id_deliveries_delivery_public_id_retry_post.additional_properties = d
33
+ return retry_delivery_v1_webhook_endpoints_public_id_deliveries_delivery_public_id_retry_post_response_retry_delivery_v1_webhook_endpoints_public_id_deliveries_delivery_public_id_retry_post
34
+
35
+ @property
36
+ def additional_keys(self) -> list[str]:
37
+ return list(self.additional_properties.keys())
38
+
39
+ def __getitem__(self, key: str) -> Any:
40
+ return self.additional_properties[key]
41
+
42
+ def __setitem__(self, key: str, value: Any) -> None:
43
+ self.additional_properties[key] = value
44
+
45
+ def __delitem__(self, key: str) -> None:
46
+ del self.additional_properties[key]
47
+
48
+ def __contains__(self, key: str) -> bool:
49
+ return key in self.additional_properties
@@ -0,0 +1,49 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ T = TypeVar(
10
+ "T",
11
+ bound="RotateWebhookSecretV1WebhookEndpointsPublicIdRotateSecretPostResponseRotateWebhookSecretV1WebhookEndpointsPublicIdRotateSecretPost",
12
+ )
13
+
14
+
15
+ @_attrs_define
16
+ class RotateWebhookSecretV1WebhookEndpointsPublicIdRotateSecretPostResponseRotateWebhookSecretV1WebhookEndpointsPublicIdRotateSecretPost:
17
+ """ """
18
+
19
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
20
+
21
+ def to_dict(self) -> dict[str, Any]:
22
+ field_dict: dict[str, Any] = {}
23
+ field_dict.update(self.additional_properties)
24
+
25
+ return field_dict
26
+
27
+ @classmethod
28
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
29
+ d = dict(src_dict)
30
+ rotate_webhook_secret_v1_webhook_endpoints_public_id_rotate_secret_post_response_rotate_webhook_secret_v1_webhook_endpoints_public_id_rotate_secret_post = cls()
31
+
32
+ rotate_webhook_secret_v1_webhook_endpoints_public_id_rotate_secret_post_response_rotate_webhook_secret_v1_webhook_endpoints_public_id_rotate_secret_post.additional_properties = d
33
+ return rotate_webhook_secret_v1_webhook_endpoints_public_id_rotate_secret_post_response_rotate_webhook_secret_v1_webhook_endpoints_public_id_rotate_secret_post
34
+
35
+ @property
36
+ def additional_keys(self) -> list[str]:
37
+ return list(self.additional_properties.keys())
38
+
39
+ def __getitem__(self, key: str) -> Any:
40
+ return self.additional_properties[key]
41
+
42
+ def __setitem__(self, key: str, value: Any) -> None:
43
+ self.additional_properties[key] = value
44
+
45
+ def __delitem__(self, key: str) -> None:
46
+ del self.additional_properties[key]
47
+
48
+ def __contains__(self, key: str) -> bool:
49
+ return key in self.additional_properties
@@ -0,0 +1,107 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar, cast
5
+
6
+ from attrs import define as _attrs_define
7
+
8
+ from thrustlab._models.types import UNSET, Unset
9
+
10
+ T = TypeVar("T", bound="RotorGroupIn")
11
+
12
+
13
+ @_attrs_define
14
+ class RotorGroupIn:
15
+ """
16
+ Attributes:
17
+ label (str):
18
+ propeller_component_id (str):
19
+ throttle_pct (float):
20
+ count (int | Unset): Default: 1.
21
+ esc_motor_wire_resistance_mohm (float | Unset): Default: 0.0.
22
+ esc_resistance_mohm (float | Unset): Default: 0.0.
23
+ motor_component_id (None | str | Unset):
24
+ """
25
+
26
+ label: str
27
+ propeller_component_id: str
28
+ throttle_pct: float
29
+ count: int | Unset = 1
30
+ esc_motor_wire_resistance_mohm: float | Unset = 0.0
31
+ esc_resistance_mohm: float | Unset = 0.0
32
+ motor_component_id: None | str | Unset = UNSET
33
+
34
+ def to_dict(self) -> dict[str, Any]:
35
+ label = self.label
36
+
37
+ propeller_component_id = self.propeller_component_id
38
+
39
+ throttle_pct = self.throttle_pct
40
+
41
+ count = self.count
42
+
43
+ esc_motor_wire_resistance_mohm = self.esc_motor_wire_resistance_mohm
44
+
45
+ esc_resistance_mohm = self.esc_resistance_mohm
46
+
47
+ motor_component_id: None | str | Unset
48
+ if isinstance(self.motor_component_id, Unset):
49
+ motor_component_id = UNSET
50
+ else:
51
+ motor_component_id = self.motor_component_id
52
+
53
+ field_dict: dict[str, Any] = {}
54
+
55
+ field_dict.update(
56
+ {
57
+ "label": label,
58
+ "propeller_component_id": propeller_component_id,
59
+ "throttle_pct": throttle_pct,
60
+ }
61
+ )
62
+ if count is not UNSET:
63
+ field_dict["count"] = count
64
+ if esc_motor_wire_resistance_mohm is not UNSET:
65
+ field_dict["esc_motor_wire_resistance_mohm"] = esc_motor_wire_resistance_mohm
66
+ if esc_resistance_mohm is not UNSET:
67
+ field_dict["esc_resistance_mohm"] = esc_resistance_mohm
68
+ if motor_component_id is not UNSET:
69
+ field_dict["motor_component_id"] = motor_component_id
70
+
71
+ return field_dict
72
+
73
+ @classmethod
74
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
75
+ d = dict(src_dict)
76
+ label = d.pop("label")
77
+
78
+ propeller_component_id = d.pop("propeller_component_id")
79
+
80
+ throttle_pct = d.pop("throttle_pct")
81
+
82
+ count = d.pop("count", UNSET)
83
+
84
+ esc_motor_wire_resistance_mohm = d.pop("esc_motor_wire_resistance_mohm", UNSET)
85
+
86
+ esc_resistance_mohm = d.pop("esc_resistance_mohm", UNSET)
87
+
88
+ def _parse_motor_component_id(data: object) -> None | str | Unset:
89
+ if data is None:
90
+ return data
91
+ if isinstance(data, Unset):
92
+ return data
93
+ return cast(None | str | Unset, data)
94
+
95
+ motor_component_id = _parse_motor_component_id(d.pop("motor_component_id", UNSET))
96
+
97
+ rotor_group_in = cls(
98
+ label=label,
99
+ propeller_component_id=propeller_component_id,
100
+ throttle_pct=throttle_pct,
101
+ count=count,
102
+ esc_motor_wire_resistance_mohm=esc_motor_wire_resistance_mohm,
103
+ esc_resistance_mohm=esc_resistance_mohm,
104
+ motor_component_id=motor_component_id,
105
+ )
106
+
107
+ return rotor_group_in
@@ -0,0 +1,97 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar, cast
5
+
6
+ from attrs import define as _attrs_define
7
+
8
+ T = TypeVar("T", bound="RotorGroupResource")
9
+
10
+
11
+ @_attrs_define
12
+ class RotorGroupResource:
13
+ """Reused by SimulationResource and SweepResource.
14
+
15
+ Attributes:
16
+ count (int):
17
+ esc_motor_wire_resistance_mohm (float):
18
+ esc_resistance_mohm (float):
19
+ label (str):
20
+ motor_component_id (None | str):
21
+ propeller_component_id (str):
22
+ throttle_pct (float):
23
+ """
24
+
25
+ count: int
26
+ esc_motor_wire_resistance_mohm: float
27
+ esc_resistance_mohm: float
28
+ label: str
29
+ motor_component_id: None | str
30
+ propeller_component_id: str
31
+ throttle_pct: float
32
+
33
+ def to_dict(self) -> dict[str, Any]:
34
+ count = self.count
35
+
36
+ esc_motor_wire_resistance_mohm = self.esc_motor_wire_resistance_mohm
37
+
38
+ esc_resistance_mohm = self.esc_resistance_mohm
39
+
40
+ label = self.label
41
+
42
+ motor_component_id: None | str
43
+ motor_component_id = self.motor_component_id
44
+
45
+ propeller_component_id = self.propeller_component_id
46
+
47
+ throttle_pct = self.throttle_pct
48
+
49
+ field_dict: dict[str, Any] = {}
50
+
51
+ field_dict.update(
52
+ {
53
+ "count": count,
54
+ "esc_motor_wire_resistance_mohm": esc_motor_wire_resistance_mohm,
55
+ "esc_resistance_mohm": esc_resistance_mohm,
56
+ "label": label,
57
+ "motor_component_id": motor_component_id,
58
+ "propeller_component_id": propeller_component_id,
59
+ "throttle_pct": throttle_pct,
60
+ }
61
+ )
62
+
63
+ return field_dict
64
+
65
+ @classmethod
66
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
67
+ d = dict(src_dict)
68
+ count = d.pop("count")
69
+
70
+ esc_motor_wire_resistance_mohm = d.pop("esc_motor_wire_resistance_mohm")
71
+
72
+ esc_resistance_mohm = d.pop("esc_resistance_mohm")
73
+
74
+ label = d.pop("label")
75
+
76
+ def _parse_motor_component_id(data: object) -> None | str:
77
+ if data is None:
78
+ return data
79
+ return cast(None | str, data)
80
+
81
+ motor_component_id = _parse_motor_component_id(d.pop("motor_component_id"))
82
+
83
+ propeller_component_id = d.pop("propeller_component_id")
84
+
85
+ throttle_pct = d.pop("throttle_pct")
86
+
87
+ rotor_group_resource = cls(
88
+ count=count,
89
+ esc_motor_wire_resistance_mohm=esc_motor_wire_resistance_mohm,
90
+ esc_resistance_mohm=esc_resistance_mohm,
91
+ label=label,
92
+ motor_component_id=motor_component_id,
93
+ propeller_component_id=propeller_component_id,
94
+ throttle_pct=throttle_pct,
95
+ )
96
+
97
+ return rotor_group_resource
@@ -0,0 +1,24 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+
8
+ T = TypeVar("T", bound="SimulationCancelBody")
9
+
10
+
11
+ @_attrs_define
12
+ class SimulationCancelBody:
13
+ """ """
14
+
15
+ def to_dict(self) -> dict[str, Any]:
16
+ field_dict: dict[str, Any] = {}
17
+
18
+ return field_dict
19
+
20
+ @classmethod
21
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
22
+ simulation_cancel_body = cls()
23
+
24
+ return simulation_cancel_body