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,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="GetDeliveryV1WebhookEndpointsPublicIdDeliveriesDeliveryPublicIdGetResponseGetDeliveryV1WebhookEndpointsPublicIdDeliveriesDeliveryPublicIdGet",
12
+ )
13
+
14
+
15
+ @_attrs_define
16
+ class GetDeliveryV1WebhookEndpointsPublicIdDeliveriesDeliveryPublicIdGetResponseGetDeliveryV1WebhookEndpointsPublicIdDeliveriesDeliveryPublicIdGet:
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
+ 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 = cls()
31
+
32
+ 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.additional_properties = d
33
+ return 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
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,46 @@
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("T", bound="GetEventV1EventsEventIdGetResponseGetEventV1EventsEventIdGet")
10
+
11
+
12
+ @_attrs_define
13
+ class GetEventV1EventsEventIdGetResponseGetEventV1EventsEventIdGet:
14
+ """ """
15
+
16
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
17
+
18
+ def to_dict(self) -> dict[str, Any]:
19
+ field_dict: dict[str, Any] = {}
20
+ field_dict.update(self.additional_properties)
21
+
22
+ return field_dict
23
+
24
+ @classmethod
25
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
26
+ d = dict(src_dict)
27
+ get_event_v1_events_event_id_get_response_get_event_v1_events_event_id_get = cls()
28
+
29
+ get_event_v1_events_event_id_get_response_get_event_v1_events_event_id_get.additional_properties = d
30
+ return get_event_v1_events_event_id_get_response_get_event_v1_events_event_id_get
31
+
32
+ @property
33
+ def additional_keys(self) -> list[str]:
34
+ return list(self.additional_properties.keys())
35
+
36
+ def __getitem__(self, key: str) -> Any:
37
+ return self.additional_properties[key]
38
+
39
+ def __setitem__(self, key: str, value: Any) -> None:
40
+ self.additional_properties[key] = value
41
+
42
+ def __delitem__(self, key: str) -> None:
43
+ del self.additional_properties[key]
44
+
45
+ def __contains__(self, key: str) -> bool:
46
+ return key in self.additional_properties
@@ -0,0 +1,48 @@
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", bound="GetWebhookEndpointV1WebhookEndpointsPublicIdGetResponseGetWebhookEndpointV1WebhookEndpointsPublicIdGet"
11
+ )
12
+
13
+
14
+ @_attrs_define
15
+ class GetWebhookEndpointV1WebhookEndpointsPublicIdGetResponseGetWebhookEndpointV1WebhookEndpointsPublicIdGet:
16
+ """ """
17
+
18
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
19
+
20
+ def to_dict(self) -> dict[str, Any]:
21
+ field_dict: dict[str, Any] = {}
22
+ field_dict.update(self.additional_properties)
23
+
24
+ return field_dict
25
+
26
+ @classmethod
27
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
28
+ d = dict(src_dict)
29
+ get_webhook_endpoint_v1_webhook_endpoints_public_id_get_response_get_webhook_endpoint_v1_webhook_endpoints_public_id_get = cls()
30
+
31
+ get_webhook_endpoint_v1_webhook_endpoints_public_id_get_response_get_webhook_endpoint_v1_webhook_endpoints_public_id_get.additional_properties = d
32
+ return get_webhook_endpoint_v1_webhook_endpoints_public_id_get_response_get_webhook_endpoint_v1_webhook_endpoints_public_id_get
33
+
34
+ @property
35
+ def additional_keys(self) -> list[str]:
36
+ return list(self.additional_properties.keys())
37
+
38
+ def __getitem__(self, key: str) -> Any:
39
+ return self.additional_properties[key]
40
+
41
+ def __setitem__(self, key: str, value: Any) -> None:
42
+ self.additional_properties[key] = value
43
+
44
+ def __delitem__(self, key: str) -> None:
45
+ del self.additional_properties[key]
46
+
47
+ def __contains__(self, key: str) -> bool:
48
+ return key in self.additional_properties
@@ -0,0 +1,79 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar
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.validation_error import ValidationError
13
+
14
+
15
+ T = TypeVar("T", bound="HTTPValidationError")
16
+
17
+
18
+ @_attrs_define
19
+ class HTTPValidationError:
20
+ """
21
+ Attributes:
22
+ detail (list[ValidationError] | Unset):
23
+ """
24
+
25
+ detail: list[ValidationError] | Unset = UNSET
26
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ detail: list[dict[str, Any]] | Unset = UNSET
30
+ if not isinstance(self.detail, Unset):
31
+ detail = []
32
+ for detail_item_data in self.detail:
33
+ detail_item = detail_item_data.to_dict()
34
+ detail.append(detail_item)
35
+
36
+ field_dict: dict[str, Any] = {}
37
+ field_dict.update(self.additional_properties)
38
+ field_dict.update({})
39
+ if detail is not UNSET:
40
+ field_dict["detail"] = detail
41
+
42
+ return field_dict
43
+
44
+ @classmethod
45
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
46
+ from thrustlab._models.validation_error import ValidationError
47
+
48
+ d = dict(src_dict)
49
+ _detail = d.pop("detail", UNSET)
50
+ detail: list[ValidationError] | Unset = UNSET
51
+ if _detail is not UNSET:
52
+ detail = []
53
+ for detail_item_data in _detail:
54
+ detail_item = ValidationError.from_dict(detail_item_data)
55
+
56
+ detail.append(detail_item)
57
+
58
+ http_validation_error = cls(
59
+ detail=detail,
60
+ )
61
+
62
+ http_validation_error.additional_properties = d
63
+ return http_validation_error
64
+
65
+ @property
66
+ def additional_keys(self) -> list[str]:
67
+ return list(self.additional_properties.keys())
68
+
69
+ def __getitem__(self, key: str) -> Any:
70
+ return self.additional_properties[key]
71
+
72
+ def __setitem__(self, key: str, value: Any) -> None:
73
+ self.additional_properties[key] = value
74
+
75
+ def __delitem__(self, key: str) -> None:
76
+ del self.additional_properties[key]
77
+
78
+ def __contains__(self, key: str) -> bool:
79
+ 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="ListDeliveriesV1WebhookEndpointsPublicIdDeliveriesGetResponseListDeliveriesV1WebhookEndpointsPublicIdDeliveriesGet",
12
+ )
13
+
14
+
15
+ @_attrs_define
16
+ class ListDeliveriesV1WebhookEndpointsPublicIdDeliveriesGetResponseListDeliveriesV1WebhookEndpointsPublicIdDeliveriesGet:
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
+ list_deliveries_v1_webhook_endpoints_public_id_deliveries_get_response_list_deliveries_v1_webhook_endpoints_public_id_deliveries_get = cls()
31
+
32
+ list_deliveries_v1_webhook_endpoints_public_id_deliveries_get_response_list_deliveries_v1_webhook_endpoints_public_id_deliveries_get.additional_properties = d
33
+ return list_deliveries_v1_webhook_endpoints_public_id_deliveries_get_response_list_deliveries_v1_webhook_endpoints_public_id_deliveries_get
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,46 @@
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("T", bound="ListEventsV1EventsGetResponseListEventsV1EventsGet")
10
+
11
+
12
+ @_attrs_define
13
+ class ListEventsV1EventsGetResponseListEventsV1EventsGet:
14
+ """ """
15
+
16
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
17
+
18
+ def to_dict(self) -> dict[str, Any]:
19
+ field_dict: dict[str, Any] = {}
20
+ field_dict.update(self.additional_properties)
21
+
22
+ return field_dict
23
+
24
+ @classmethod
25
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
26
+ d = dict(src_dict)
27
+ list_events_v1_events_get_response_list_events_v1_events_get = cls()
28
+
29
+ list_events_v1_events_get_response_list_events_v1_events_get.additional_properties = d
30
+ return list_events_v1_events_get_response_list_events_v1_events_get
31
+
32
+ @property
33
+ def additional_keys(self) -> list[str]:
34
+ return list(self.additional_properties.keys())
35
+
36
+ def __getitem__(self, key: str) -> Any:
37
+ return self.additional_properties[key]
38
+
39
+ def __setitem__(self, key: str, value: Any) -> None:
40
+ self.additional_properties[key] = value
41
+
42
+ def __delitem__(self, key: str) -> None:
43
+ del self.additional_properties[key]
44
+
45
+ def __contains__(self, key: str) -> bool:
46
+ return key in self.additional_properties
@@ -0,0 +1,116 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, Literal, 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.api_key import ApiKey
13
+
14
+
15
+ T = TypeVar("T", bound="ListResponseApiKey")
16
+
17
+
18
+ @_attrs_define
19
+ class ListResponseApiKey:
20
+ """
21
+ Attributes:
22
+ data (list[ApiKey]):
23
+ has_more (bool):
24
+ next_cursor (None | str | Unset):
25
+ object_ (Literal['list'] | Unset): Default: 'list'.
26
+ """
27
+
28
+ data: list[ApiKey]
29
+ has_more: bool
30
+ next_cursor: None | str | Unset = UNSET
31
+ object_: Literal["list"] | 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 | Unset
43
+ if isinstance(self.next_cursor, Unset):
44
+ next_cursor = UNSET
45
+ else:
46
+ next_cursor = self.next_cursor
47
+
48
+ object_ = self.object_
49
+
50
+ field_dict: dict[str, Any] = {}
51
+ field_dict.update(self.additional_properties)
52
+ field_dict.update(
53
+ {
54
+ "data": data,
55
+ "has_more": has_more,
56
+ }
57
+ )
58
+ if next_cursor is not UNSET:
59
+ field_dict["next_cursor"] = next_cursor
60
+ if object_ is not UNSET:
61
+ field_dict["object"] = object_
62
+
63
+ return field_dict
64
+
65
+ @classmethod
66
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
67
+ from thrustlab._models.api_key import ApiKey
68
+
69
+ d = dict(src_dict)
70
+ data = []
71
+ _data = d.pop("data")
72
+ for data_item_data in _data:
73
+ data_item = ApiKey.from_dict(data_item_data)
74
+
75
+ data.append(data_item)
76
+
77
+ has_more = d.pop("has_more")
78
+
79
+ def _parse_next_cursor(data: object) -> None | str | Unset:
80
+ if data is None:
81
+ return data
82
+ if isinstance(data, Unset):
83
+ return data
84
+ return cast(None | str | Unset, data)
85
+
86
+ next_cursor = _parse_next_cursor(d.pop("next_cursor", UNSET))
87
+
88
+ object_ = cast(Literal["list"] | Unset, d.pop("object", UNSET))
89
+ if object_ != "list" and not isinstance(object_, Unset):
90
+ raise ValueError(f"object must match const 'list', got '{object_}'")
91
+
92
+ list_response_api_key = cls(
93
+ data=data,
94
+ has_more=has_more,
95
+ next_cursor=next_cursor,
96
+ object_=object_,
97
+ )
98
+
99
+ list_response_api_key.additional_properties = d
100
+ return list_response_api_key
101
+
102
+ @property
103
+ def additional_keys(self) -> list[str]:
104
+ return list(self.additional_properties.keys())
105
+
106
+ def __getitem__(self, key: str) -> Any:
107
+ return self.additional_properties[key]
108
+
109
+ def __setitem__(self, key: str, value: Any) -> None:
110
+ self.additional_properties[key] = value
111
+
112
+ def __delitem__(self, key: str) -> None:
113
+ del self.additional_properties[key]
114
+
115
+ def __contains__(self, key: str) -> bool:
116
+ return key in self.additional_properties
@@ -0,0 +1,46 @@
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("T", bound="ListWebhookEndpointsV1WebhookEndpointsGetResponseListWebhookEndpointsV1WebhookEndpointsGet")
10
+
11
+
12
+ @_attrs_define
13
+ class ListWebhookEndpointsV1WebhookEndpointsGetResponseListWebhookEndpointsV1WebhookEndpointsGet:
14
+ """ """
15
+
16
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
17
+
18
+ def to_dict(self) -> dict[str, Any]:
19
+ field_dict: dict[str, Any] = {}
20
+ field_dict.update(self.additional_properties)
21
+
22
+ return field_dict
23
+
24
+ @classmethod
25
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
26
+ d = dict(src_dict)
27
+ list_webhook_endpoints_v1_webhook_endpoints_get_response_list_webhook_endpoints_v1_webhook_endpoints_get = cls()
28
+
29
+ list_webhook_endpoints_v1_webhook_endpoints_get_response_list_webhook_endpoints_v1_webhook_endpoints_get.additional_properties = d
30
+ return list_webhook_endpoints_v1_webhook_endpoints_get_response_list_webhook_endpoints_v1_webhook_endpoints_get
31
+
32
+ @property
33
+ def additional_keys(self) -> list[str]:
34
+ return list(self.additional_properties.keys())
35
+
36
+ def __getitem__(self, key: str) -> Any:
37
+ return self.additional_properties[key]
38
+
39
+ def __setitem__(self, key: str, value: Any) -> None:
40
+ self.additional_properties[key] = value
41
+
42
+ def __delitem__(self, key: str) -> None:
43
+ del self.additional_properties[key]
44
+
45
+ def __contains__(self, key: str) -> bool:
46
+ 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="PatchWebhookEndpointV1WebhookEndpointsPublicIdPatchResponsePatchWebhookEndpointV1WebhookEndpointsPublicIdPatch",
12
+ )
13
+
14
+
15
+ @_attrs_define
16
+ class PatchWebhookEndpointV1WebhookEndpointsPublicIdPatchResponsePatchWebhookEndpointV1WebhookEndpointsPublicIdPatch:
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
+ patch_webhook_endpoint_v1_webhook_endpoints_public_id_patch_response_patch_webhook_endpoint_v1_webhook_endpoints_public_id_patch = cls()
31
+
32
+ patch_webhook_endpoint_v1_webhook_endpoints_public_id_patch_response_patch_webhook_endpoint_v1_webhook_endpoints_public_id_patch.additional_properties = d
33
+ return patch_webhook_endpoint_v1_webhook_endpoints_public_id_patch_response_patch_webhook_endpoint_v1_webhook_endpoints_public_id_patch
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,42 @@
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="PortalSessionIn")
9
+
10
+
11
+ @_attrs_define
12
+ class PortalSessionIn:
13
+ """
14
+ Attributes:
15
+ return_url (str):
16
+ """
17
+
18
+ return_url: str
19
+
20
+ def to_dict(self) -> dict[str, Any]:
21
+ return_url = self.return_url
22
+
23
+ field_dict: dict[str, Any] = {}
24
+
25
+ field_dict.update(
26
+ {
27
+ "return_url": return_url,
28
+ }
29
+ )
30
+
31
+ return field_dict
32
+
33
+ @classmethod
34
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
35
+ d = dict(src_dict)
36
+ return_url = d.pop("return_url")
37
+
38
+ portal_session_in = cls(
39
+ return_url=return_url,
40
+ )
41
+
42
+ return portal_session_in
@@ -0,0 +1,103 @@
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="ProjectCreateBody")
12
+
13
+
14
+ @_attrs_define
15
+ class ProjectCreateBody:
16
+ """
17
+ Attributes:
18
+ name (str):
19
+ aircraft_type_tag (None | str | Unset):
20
+ notes (None | str | Unset):
21
+ """
22
+
23
+ name: str
24
+ aircraft_type_tag: 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
+ name = self.name
30
+
31
+ aircraft_type_tag: None | str | Unset
32
+ if isinstance(self.aircraft_type_tag, Unset):
33
+ aircraft_type_tag = UNSET
34
+ else:
35
+ aircraft_type_tag = self.aircraft_type_tag
36
+
37
+ notes: None | str | Unset
38
+ if isinstance(self.notes, Unset):
39
+ notes = UNSET
40
+ else:
41
+ notes = self.notes
42
+
43
+ field_dict: dict[str, Any] = {}
44
+ field_dict.update(self.additional_properties)
45
+ field_dict.update(
46
+ {
47
+ "name": name,
48
+ }
49
+ )
50
+ if aircraft_type_tag is not UNSET:
51
+ field_dict["aircraft_type_tag"] = aircraft_type_tag
52
+ if notes is not UNSET:
53
+ field_dict["notes"] = notes
54
+
55
+ return field_dict
56
+
57
+ @classmethod
58
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
59
+ d = dict(src_dict)
60
+ name = d.pop("name")
61
+
62
+ def _parse_aircraft_type_tag(data: object) -> None | str | Unset:
63
+ if data is None:
64
+ return data
65
+ if isinstance(data, Unset):
66
+ return data
67
+ return cast(None | str | Unset, data)
68
+
69
+ aircraft_type_tag = _parse_aircraft_type_tag(d.pop("aircraft_type_tag", UNSET))
70
+
71
+ def _parse_notes(data: object) -> None | str | Unset:
72
+ if data is None:
73
+ return data
74
+ if isinstance(data, Unset):
75
+ return data
76
+ return cast(None | str | Unset, data)
77
+
78
+ notes = _parse_notes(d.pop("notes", UNSET))
79
+
80
+ project_create_body = cls(
81
+ name=name,
82
+ aircraft_type_tag=aircraft_type_tag,
83
+ notes=notes,
84
+ )
85
+
86
+ project_create_body.additional_properties = d
87
+ return project_create_body
88
+
89
+ @property
90
+ def additional_keys(self) -> list[str]:
91
+ return list(self.additional_properties.keys())
92
+
93
+ def __getitem__(self, key: str) -> Any:
94
+ return self.additional_properties[key]
95
+
96
+ def __setitem__(self, key: str, value: Any) -> None:
97
+ self.additional_properties[key] = value
98
+
99
+ def __delitem__(self, key: str) -> None:
100
+ del self.additional_properties[key]
101
+
102
+ def __contains__(self, key: str) -> bool:
103
+ return key in self.additional_properties