waldur-api-client 7.7.5__py3-none-any.whl → 7.7.7__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.

Potentially problematic release.


This version of waldur-api-client might be problematic. Click here for more details.

Files changed (229) hide show
  1. waldur_api_client/api/booking_resources/booking_resources_count.py +34 -11
  2. waldur_api_client/api/booking_resources/booking_resources_list.py +34 -11
  3. waldur_api_client/api/customers/customers_project_metadata_compliance_details_list.py +189 -0
  4. waldur_api_client/api/customers/customers_project_metadata_compliance_overview_list.py +189 -0
  5. waldur_api_client/api/customers/customers_project_metadata_compliance_projects_list.py +187 -0
  6. waldur_api_client/api/customers/customers_project_metadata_question_answers_list.py +187 -0
  7. waldur_api_client/api/marketplace_integration_statuses/marketplace_integration_statuses_count.py +34 -11
  8. waldur_api_client/api/marketplace_integration_statuses/marketplace_integration_statuses_list.py +34 -11
  9. waldur_api_client/api/marketplace_offering_files/marketplace_offering_files_count.py +34 -11
  10. waldur_api_client/api/marketplace_offering_files/marketplace_offering_files_list.py +34 -11
  11. waldur_api_client/api/marketplace_offering_terms_of_service/__init__.py +1 -0
  12. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_count.py +274 -0
  13. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_create.py +152 -0
  14. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_destroy.py +89 -0
  15. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_list.py +277 -0
  16. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_partial_update.py +164 -0
  17. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_retrieve.py +142 -0
  18. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_update.py +164 -0
  19. waldur_api_client/api/marketplace_offering_user_roles/marketplace_offering_user_roles_count.py +34 -11
  20. waldur_api_client/api/marketplace_offering_user_roles/marketplace_offering_user_roles_list.py +34 -11
  21. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_checklist_retrieve.py +154 -0
  22. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_checklist_review_retrieve.py +154 -0
  23. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_completion_review_status_retrieve.py +154 -0
  24. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_completion_status_retrieve.py +154 -0
  25. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_count.py +34 -11
  26. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_list.py +34 -11
  27. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_submit_answers.py +179 -0
  28. waldur_api_client/api/marketplace_orders/marketplace_orders_count.py +19 -0
  29. waldur_api_client/api/marketplace_orders/marketplace_orders_list.py +19 -0
  30. waldur_api_client/api/marketplace_plans/marketplace_plans_count.py +19 -0
  31. waldur_api_client/api/marketplace_plans/marketplace_plans_list.py +19 -0
  32. waldur_api_client/api/marketplace_plans/marketplace_plans_usage_stats_count.py +19 -0
  33. waldur_api_client/api/marketplace_plans/marketplace_plans_usage_stats_list.py +19 -0
  34. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_count.py +34 -11
  35. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_list.py +34 -11
  36. waldur_api_client/api/marketplace_resources/marketplace_resources_count.py +34 -11
  37. waldur_api_client/api/marketplace_resources/marketplace_resources_list.py +34 -11
  38. waldur_api_client/api/marketplace_robot_accounts/marketplace_robot_accounts_list.py +23 -0
  39. waldur_api_client/api/marketplace_robot_accounts/marketplace_robot_accounts_retrieve.py +30 -1
  40. waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_count.py +34 -11
  41. waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_list.py +34 -11
  42. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_project_service_accounts_list.py +276 -0
  43. waldur_api_client/api/marketplace_service_providers/service_provider_compliance_overview.py +189 -0
  44. waldur_api_client/api/marketplace_service_providers/service_provider_offering_users_compliance.py +222 -0
  45. waldur_api_client/api/marketplace_user_offering_consents/__init__.py +1 -0
  46. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_count.py +307 -0
  47. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_create.py +152 -0
  48. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_destroy.py +89 -0
  49. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_list.py +310 -0
  50. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_partial_update.py +164 -0
  51. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_retrieve.py +142 -0
  52. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_revoke.py +146 -0
  53. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_update.py +164 -0
  54. waldur_api_client/api/public_maintenance_announcements/__init__.py +1 -0
  55. waldur_api_client/api/public_maintenance_announcements/public_maintenance_announcements_count.py +325 -0
  56. waldur_api_client/api/public_maintenance_announcements/public_maintenance_announcements_list.py +328 -0
  57. waldur_api_client/api/public_maintenance_announcements/public_maintenance_announcements_retrieve.py +144 -0
  58. waldur_api_client/api/remote_waldur_api/remote_waldur_api_remote_resource_order_status_retrieve.py +145 -0
  59. waldur_api_client/api/remote_waldur_api/remote_waldur_api_remote_resource_status_retrieve.py +147 -0
  60. waldur_api_client/api/remote_waldur_api/remote_waldur_api_remote_resource_team_status_list.py +188 -0
  61. waldur_api_client/models/__init__.py +118 -4
  62. waldur_api_client/models/admin_announcement.py +109 -1
  63. waldur_api_client/models/admin_announcement_maintenance_affected_offerings_item.py +103 -0
  64. waldur_api_client/models/admin_announcements_list_field_item.py +8 -0
  65. waldur_api_client/models/admin_announcements_retrieve_field_item.py +8 -0
  66. waldur_api_client/models/azure_sql_server_create_order_attributes.py +83 -0
  67. waldur_api_client/models/azure_virtual_machine_create_order_attributes.py +99 -0
  68. waldur_api_client/models/basic_user.py +30 -21
  69. waldur_api_client/models/booking_offerings_list_field_item.py +1 -2
  70. waldur_api_client/models/booking_offerings_retrieve_field_item.py +1 -2
  71. waldur_api_client/models/booking_resource.py +10 -9
  72. waldur_api_client/models/booking_resources_list_field_item.py +1 -1
  73. waldur_api_client/models/booking_resources_retrieve_field_item.py +1 -1
  74. waldur_api_client/models/checklist_info.py +76 -0
  75. waldur_api_client/models/compliance_overview.py +91 -0
  76. waldur_api_client/models/create_router.py +1 -1
  77. waldur_api_client/models/create_router_request.py +1 -1
  78. waldur_api_client/models/customer.py +51 -0
  79. waldur_api_client/models/customers_list_field_item.py +2 -0
  80. waldur_api_client/models/customers_retrieve_field_item.py +2 -0
  81. waldur_api_client/models/fingerprint.py +19 -17
  82. waldur_api_client/models/generic_order_attributes.py +69 -0
  83. waldur_api_client/models/google_auth_authorize_retrieve_field_item.py +1 -0
  84. waldur_api_client/models/google_auth_list_field_item.py +1 -0
  85. waldur_api_client/models/google_auth_retrieve_field_item.py +1 -0
  86. waldur_api_client/models/google_credentials.py +9 -0
  87. waldur_api_client/models/group_invitation.py +24 -0
  88. waldur_api_client/models/group_invitation_request.py +10 -0
  89. waldur_api_client/models/instance_flavor_change_request.py +1 -1
  90. waldur_api_client/models/maintenance_announcement.py +8 -0
  91. waldur_api_client/models/marketplace_managed_rancher_create_order_attributes.py +144 -0
  92. waldur_api_client/models/marketplace_offering_terms_of_service_count_o_item.py +13 -0
  93. waldur_api_client/models/marketplace_offering_terms_of_service_list_o_item.py +13 -0
  94. waldur_api_client/models/marketplace_orders_list_field_item.py +1 -1
  95. waldur_api_client/models/marketplace_orders_retrieve_field_item.py +1 -1
  96. waldur_api_client/models/marketplace_provider_offerings_list_customer_service_accounts_retrieve_field_item.py +1 -2
  97. waldur_api_client/models/marketplace_provider_offerings_list_field_item.py +1 -2
  98. waldur_api_client/models/marketplace_provider_offerings_list_project_service_accounts_retrieve_field_item.py +1 -2
  99. waldur_api_client/models/marketplace_provider_offerings_retrieve_field_item.py +1 -2
  100. waldur_api_client/models/marketplace_provider_offerings_stats_retrieve_field_item.py +1 -2
  101. waldur_api_client/models/marketplace_provider_offerings_user_has_resource_access_retrieve_field_item.py +1 -2
  102. waldur_api_client/models/marketplace_provider_resources_details_retrieve_field_item.py +1 -1
  103. waldur_api_client/models/marketplace_provider_resources_list_field_item.py +1 -1
  104. waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +1 -1
  105. waldur_api_client/models/marketplace_public_offerings_list_field_item.py +1 -2
  106. waldur_api_client/models/marketplace_public_offerings_retrieve_field_item.py +1 -2
  107. waldur_api_client/models/marketplace_rancher_create_order_attributes.py +145 -0
  108. waldur_api_client/models/marketplace_resources_details_retrieve_field_item.py +1 -1
  109. waldur_api_client/models/marketplace_resources_list_field_item.py +1 -1
  110. waldur_api_client/models/marketplace_resources_retrieve_field_item.py +1 -1
  111. waldur_api_client/models/marketplace_robot_accounts_list_field_item.py +32 -0
  112. waldur_api_client/models/marketplace_robot_accounts_retrieve_field_item.py +32 -0
  113. waldur_api_client/models/marketplace_service_providers_list_field_item.py +1 -0
  114. waldur_api_client/models/marketplace_service_providers_retrieve_field_item.py +1 -0
  115. waldur_api_client/models/marketplace_user_offering_consents_count_o_item.py +15 -0
  116. waldur_api_client/models/marketplace_user_offering_consents_list_o_item.py +15 -0
  117. waldur_api_client/models/offering.py +9 -18
  118. waldur_api_client/models/offering_create.py +8 -18
  119. waldur_api_client/models/offering_create_request.py +0 -18
  120. waldur_api_client/models/offering_overview_update_request.py +0 -18
  121. waldur_api_client/models/offering_terms_of_service.py +142 -0
  122. waldur_api_client/models/offering_terms_of_service_create.py +107 -0
  123. waldur_api_client/models/offering_terms_of_service_create_request.py +107 -0
  124. waldur_api_client/models/offering_terms_of_service_request.py +96 -0
  125. waldur_api_client/models/open_stack_backend_instance.py +2 -2
  126. waldur_api_client/models/open_stack_backend_volumes.py +3 -3
  127. waldur_api_client/models/open_stack_backup.py +1 -1
  128. waldur_api_client/models/open_stack_backup_restoration.py +8 -5
  129. waldur_api_client/models/open_stack_backup_restoration_request.py +28 -3
  130. waldur_api_client/models/open_stack_fixed_ip.py +2 -2
  131. waldur_api_client/models/open_stack_fixed_ip_request.py +2 -2
  132. waldur_api_client/models/open_stack_floating_ip.py +5 -4
  133. waldur_api_client/models/open_stack_instance.py +17 -15
  134. waldur_api_client/models/open_stack_instance_allowed_address_pairs_update_request.py +3 -2
  135. waldur_api_client/models/open_stack_instance_availability_zone.py +1 -1
  136. waldur_api_client/models/open_stack_instance_create_order_attributes.py +283 -0
  137. waldur_api_client/models/open_stack_instance_request.py +4 -3
  138. waldur_api_client/models/open_stack_instance_security_groups_update_request.py +1 -1
  139. waldur_api_client/models/open_stack_nested_floating_ip.py +3 -3
  140. waldur_api_client/models/open_stack_nested_instance.py +1 -1
  141. waldur_api_client/models/open_stack_nested_port.py +5 -5
  142. waldur_api_client/models/open_stack_nested_port_request.py +1 -1
  143. waldur_api_client/models/open_stack_nested_security_group.py +16 -16
  144. waldur_api_client/models/open_stack_nested_security_group_request.py +59 -0
  145. waldur_api_client/models/{nested_security_group_rule_request.py → open_stack_nested_security_group_rules_item.py} +73 -63
  146. waldur_api_client/models/open_stack_nested_sub_net.py +4 -4
  147. waldur_api_client/models/open_stack_nested_sub_net_request.py +4 -4
  148. waldur_api_client/models/open_stack_nested_volume.py +3 -3
  149. waldur_api_client/models/open_stack_nested_volume_request.py +3 -3
  150. waldur_api_client/models/open_stack_network.py +23 -3
  151. waldur_api_client/models/open_stack_port.py +10 -9
  152. waldur_api_client/models/open_stack_port_ip_update_request.py +2 -2
  153. waldur_api_client/models/open_stack_port_request.py +3 -3
  154. waldur_api_client/models/open_stack_router.py +2 -2
  155. waldur_api_client/models/open_stack_router_interface_request.py +4 -2
  156. waldur_api_client/models/open_stack_security_group_rule_create.py +6 -5
  157. waldur_api_client/models/open_stack_security_group_rule_create_request.py +6 -5
  158. waldur_api_client/models/open_stack_security_group_rule_update_request.py +10 -9
  159. waldur_api_client/models/open_stack_server_group.py +2 -1
  160. waldur_api_client/models/open_stack_server_group_request.py +2 -1
  161. waldur_api_client/models/open_stack_snapshot.py +2 -2
  162. waldur_api_client/models/open_stack_snapshot_restoration.py +1 -1
  163. waldur_api_client/models/open_stack_sub_net.py +5 -5
  164. waldur_api_client/models/open_stack_sub_net_request.py +2 -2
  165. waldur_api_client/models/open_stack_tenant.py +41 -3
  166. waldur_api_client/models/open_stack_tenant_create_order_attributes.py +130 -0
  167. waldur_api_client/models/open_stack_volume.py +9 -9
  168. waldur_api_client/models/open_stack_volume_create_order_attributes.py +155 -0
  169. waldur_api_client/models/open_stack_volume_request.py +1 -1
  170. waldur_api_client/models/openstack_networks_list_field_item.py +1 -0
  171. waldur_api_client/models/openstack_networks_retrieve_field_item.py +1 -0
  172. waldur_api_client/models/openstack_tenants_list_field_item.py +3 -0
  173. waldur_api_client/models/openstack_tenants_retrieve_field_item.py +3 -0
  174. waldur_api_client/models/order_create.py +0 -8
  175. waldur_api_client/models/order_create_request.py +181 -4
  176. waldur_api_client/models/order_details.py +0 -9
  177. waldur_api_client/models/patched_offering_terms_of_service_request.py +96 -0
  178. waldur_api_client/models/patched_open_stack_instance_request.py +4 -3
  179. waldur_api_client/models/patched_open_stack_server_group_request.py +2 -1
  180. waldur_api_client/models/patched_open_stack_sub_net_request.py +2 -2
  181. waldur_api_client/models/patched_open_stack_volume_request.py +1 -1
  182. waldur_api_client/models/patched_user_offering_consent_request.py +59 -0
  183. waldur_api_client/models/permission_project.py +147 -0
  184. waldur_api_client/models/permission_request.py +2 -2
  185. waldur_api_client/models/project_answer.py +122 -0
  186. waldur_api_client/models/project_detail.py +133 -0
  187. waldur_api_client/models/project_details_response.py +115 -0
  188. waldur_api_client/models/provider_offering_details.py +9 -18
  189. waldur_api_client/models/provider_offering_details_request.py +0 -18
  190. waldur_api_client/models/public_maintenance_announcement.py +217 -0
  191. waldur_api_client/models/public_maintenance_announcement_state_enum.py +10 -0
  192. waldur_api_client/models/public_maintenance_announcements_count_o_item.py +15 -0
  193. waldur_api_client/models/public_maintenance_announcements_count_state_item.py +12 -0
  194. waldur_api_client/models/public_maintenance_announcements_list_o_item.py +15 -0
  195. waldur_api_client/models/public_maintenance_announcements_list_state_item.py +12 -0
  196. waldur_api_client/models/public_offering_details.py +9 -18
  197. waldur_api_client/models/question_answer.py +176 -0
  198. waldur_api_client/models/question_answer_project_answers_item.py +44 -0
  199. waldur_api_client/models/question_answer_question_options_item.py +44 -0
  200. waldur_api_client/models/rancher_cluster_security_group_rule.py +5 -4
  201. waldur_api_client/models/rancher_cluster_security_group_rule_request.py +5 -4
  202. waldur_api_client/models/remote_project_update_request.py +2 -2
  203. waldur_api_client/models/remote_resource_order.py +88 -0
  204. waldur_api_client/models/remote_resource_order_remote_state_enum.py +15 -0
  205. waldur_api_client/models/remote_resource_sync_status.py +123 -0
  206. waldur_api_client/models/remote_resource_sync_status_remote_state_enum.py +13 -0
  207. waldur_api_client/models/remote_resource_team_member.py +85 -0
  208. waldur_api_client/models/resource.py +10 -9
  209. waldur_api_client/models/robot_account_details.py +226 -144
  210. waldur_api_client/models/service_provider.py +9 -0
  211. waldur_api_client/models/service_provider_compliance_overview.py +122 -0
  212. waldur_api_client/models/service_provider_offering_user_compliance.py +179 -0
  213. waldur_api_client/models/service_provider_offering_user_compliance_state_enum.py +17 -0
  214. waldur_api_client/models/slurm_invoices_slurm_package_create_order_attributes.py +75 -0
  215. waldur_api_client/models/sync_status_enum.py +10 -0
  216. waldur_api_client/models/user_offering_consent.py +202 -0
  217. waldur_api_client/models/user_offering_consent_create.py +60 -0
  218. waldur_api_client/models/user_offering_consent_create_request.py +60 -0
  219. waldur_api_client/models/user_offering_consent_request.py +59 -0
  220. waldur_api_client/models/v_mware_virtual_machine_create_order_attributes.py +228 -0
  221. waldur_api_client/models/v_mware_virtual_machine_create_order_attributes_guest_os_type_1.py +155 -0
  222. waldur_api_client/models/v_mware_virtual_machine_create_order_attributes_guest_os_type_2_type_1.py +155 -0
  223. waldur_api_client/models/v_mware_virtual_machine_create_order_attributes_guest_os_type_3_type_1.py +155 -0
  224. waldur_api_client/models/volume_attach_request.py +1 -1
  225. {waldur_api_client-7.7.5.dist-info → waldur_api_client-7.7.7.dist-info}/METADATA +1 -1
  226. {waldur_api_client-7.7.5.dist-info → waldur_api_client-7.7.7.dist-info}/RECORD +228 -138
  227. waldur_api_client/models/nested_security_group_rule.py +0 -222
  228. {waldur_api_client-7.7.5.dist-info → waldur_api_client-7.7.7.dist-info}/LICENSE +0 -0
  229. {waldur_api_client-7.7.5.dist-info → waldur_api_client-7.7.7.dist-info}/WHEEL +0 -0
@@ -0,0 +1,146 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Union
3
+ from uuid import UUID
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.user_offering_consent import UserOfferingConsent
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ uuid: UUID,
15
+ ) -> dict[str, Any]:
16
+ _kwargs: dict[str, Any] = {
17
+ "method": "post",
18
+ "url": f"/api/marketplace-user-offering-consents/{uuid}/revoke/",
19
+ }
20
+
21
+ return _kwargs
22
+
23
+
24
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> UserOfferingConsent:
25
+ if response.status_code == 200:
26
+ response_200 = UserOfferingConsent.from_dict(response.json())
27
+
28
+ return response_200
29
+ raise errors.UnexpectedStatus(response.status_code, response.content)
30
+
31
+
32
+ def _build_response(
33
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
34
+ ) -> Response[UserOfferingConsent]:
35
+ return Response(
36
+ status_code=HTTPStatus(response.status_code),
37
+ content=response.content,
38
+ headers=response.headers,
39
+ parsed=_parse_response(client=client, response=response),
40
+ )
41
+
42
+
43
+ def sync_detailed(
44
+ uuid: UUID,
45
+ *,
46
+ client: AuthenticatedClient,
47
+ ) -> Response[UserOfferingConsent]:
48
+ """Revoke consent to Terms of Service for an offering.
49
+
50
+ Args:
51
+ uuid (UUID):
52
+
53
+ Raises:
54
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
55
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
56
+
57
+ Returns:
58
+ Response[UserOfferingConsent]
59
+ """
60
+
61
+ kwargs = _get_kwargs(
62
+ uuid=uuid,
63
+ )
64
+
65
+ response = client.get_httpx_client().request(
66
+ **kwargs,
67
+ )
68
+
69
+ return _build_response(client=client, response=response)
70
+
71
+
72
+ def sync(
73
+ uuid: UUID,
74
+ *,
75
+ client: AuthenticatedClient,
76
+ ) -> UserOfferingConsent:
77
+ """Revoke consent to Terms of Service for an offering.
78
+
79
+ Args:
80
+ uuid (UUID):
81
+
82
+ Raises:
83
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
84
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
85
+
86
+ Returns:
87
+ UserOfferingConsent
88
+ """
89
+
90
+ return sync_detailed(
91
+ uuid=uuid,
92
+ client=client,
93
+ ).parsed
94
+
95
+
96
+ async def asyncio_detailed(
97
+ uuid: UUID,
98
+ *,
99
+ client: AuthenticatedClient,
100
+ ) -> Response[UserOfferingConsent]:
101
+ """Revoke consent to Terms of Service for an offering.
102
+
103
+ Args:
104
+ uuid (UUID):
105
+
106
+ Raises:
107
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
108
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
109
+
110
+ Returns:
111
+ Response[UserOfferingConsent]
112
+ """
113
+
114
+ kwargs = _get_kwargs(
115
+ uuid=uuid,
116
+ )
117
+
118
+ response = await client.get_async_httpx_client().request(**kwargs)
119
+
120
+ return _build_response(client=client, response=response)
121
+
122
+
123
+ async def asyncio(
124
+ uuid: UUID,
125
+ *,
126
+ client: AuthenticatedClient,
127
+ ) -> UserOfferingConsent:
128
+ """Revoke consent to Terms of Service for an offering.
129
+
130
+ Args:
131
+ uuid (UUID):
132
+
133
+ Raises:
134
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
135
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
136
+
137
+ Returns:
138
+ UserOfferingConsent
139
+ """
140
+
141
+ return (
142
+ await asyncio_detailed(
143
+ uuid=uuid,
144
+ client=client,
145
+ )
146
+ ).parsed
@@ -0,0 +1,164 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Union
3
+ from uuid import UUID
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.user_offering_consent import UserOfferingConsent
10
+ from ...models.user_offering_consent_request import UserOfferingConsentRequest
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ uuid: UUID,
16
+ *,
17
+ body: UserOfferingConsentRequest,
18
+ ) -> dict[str, Any]:
19
+ headers: dict[str, Any] = {}
20
+
21
+ _kwargs: dict[str, Any] = {
22
+ "method": "put",
23
+ "url": f"/api/marketplace-user-offering-consents/{uuid}/",
24
+ }
25
+
26
+ _kwargs["json"] = body.to_dict()
27
+
28
+ headers["Content-Type"] = "application/json"
29
+
30
+ _kwargs["headers"] = headers
31
+ return _kwargs
32
+
33
+
34
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> UserOfferingConsent:
35
+ if response.status_code == 200:
36
+ response_200 = UserOfferingConsent.from_dict(response.json())
37
+
38
+ return response_200
39
+ raise errors.UnexpectedStatus(response.status_code, response.content)
40
+
41
+
42
+ def _build_response(
43
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
44
+ ) -> Response[UserOfferingConsent]:
45
+ return Response(
46
+ status_code=HTTPStatus(response.status_code),
47
+ content=response.content,
48
+ headers=response.headers,
49
+ parsed=_parse_response(client=client, response=response),
50
+ )
51
+
52
+
53
+ def sync_detailed(
54
+ uuid: UUID,
55
+ *,
56
+ client: AuthenticatedClient,
57
+ body: UserOfferingConsentRequest,
58
+ ) -> Response[UserOfferingConsent]:
59
+ """
60
+ Args:
61
+ uuid (UUID):
62
+ body (UserOfferingConsentRequest):
63
+
64
+ Raises:
65
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
66
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
67
+
68
+ Returns:
69
+ Response[UserOfferingConsent]
70
+ """
71
+
72
+ kwargs = _get_kwargs(
73
+ uuid=uuid,
74
+ body=body,
75
+ )
76
+
77
+ response = client.get_httpx_client().request(
78
+ **kwargs,
79
+ )
80
+
81
+ return _build_response(client=client, response=response)
82
+
83
+
84
+ def sync(
85
+ uuid: UUID,
86
+ *,
87
+ client: AuthenticatedClient,
88
+ body: UserOfferingConsentRequest,
89
+ ) -> UserOfferingConsent:
90
+ """
91
+ Args:
92
+ uuid (UUID):
93
+ body (UserOfferingConsentRequest):
94
+
95
+ Raises:
96
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
97
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
98
+
99
+ Returns:
100
+ UserOfferingConsent
101
+ """
102
+
103
+ return sync_detailed(
104
+ uuid=uuid,
105
+ client=client,
106
+ body=body,
107
+ ).parsed
108
+
109
+
110
+ async def asyncio_detailed(
111
+ uuid: UUID,
112
+ *,
113
+ client: AuthenticatedClient,
114
+ body: UserOfferingConsentRequest,
115
+ ) -> Response[UserOfferingConsent]:
116
+ """
117
+ Args:
118
+ uuid (UUID):
119
+ body (UserOfferingConsentRequest):
120
+
121
+ Raises:
122
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
123
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
124
+
125
+ Returns:
126
+ Response[UserOfferingConsent]
127
+ """
128
+
129
+ kwargs = _get_kwargs(
130
+ uuid=uuid,
131
+ body=body,
132
+ )
133
+
134
+ response = await client.get_async_httpx_client().request(**kwargs)
135
+
136
+ return _build_response(client=client, response=response)
137
+
138
+
139
+ async def asyncio(
140
+ uuid: UUID,
141
+ *,
142
+ client: AuthenticatedClient,
143
+ body: UserOfferingConsentRequest,
144
+ ) -> UserOfferingConsent:
145
+ """
146
+ Args:
147
+ uuid (UUID):
148
+ body (UserOfferingConsentRequest):
149
+
150
+ Raises:
151
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
152
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
153
+
154
+ Returns:
155
+ UserOfferingConsent
156
+ """
157
+
158
+ return (
159
+ await asyncio_detailed(
160
+ uuid=uuid,
161
+ client=client,
162
+ body=body,
163
+ )
164
+ ).parsed
@@ -0,0 +1 @@
1
+ """Contains endpoint functions for accessing the API"""
@@ -0,0 +1,325 @@
1
+ import datetime
2
+ from http import HTTPStatus
3
+ from typing import Any, Union
4
+ from uuid import UUID
5
+
6
+ import httpx
7
+
8
+ from ... import errors
9
+ from ...client import AuthenticatedClient, Client
10
+ from ...models.public_maintenance_announcements_count_o_item import PublicMaintenanceAnnouncementsCountOItem
11
+ from ...models.public_maintenance_announcements_count_state_item import PublicMaintenanceAnnouncementsCountStateItem
12
+ from ...types import UNSET, Response, Unset
13
+
14
+
15
+ def _get_kwargs(
16
+ *,
17
+ maintenance_type: Union[Unset, int] = UNSET,
18
+ o: Union[Unset, list[PublicMaintenanceAnnouncementsCountOItem]] = UNSET,
19
+ page: Union[Unset, int] = UNSET,
20
+ page_size: Union[Unset, int] = UNSET,
21
+ scheduled_end_after: Union[Unset, datetime.datetime] = UNSET,
22
+ scheduled_end_before: Union[Unset, datetime.datetime] = UNSET,
23
+ scheduled_start_after: Union[Unset, datetime.datetime] = UNSET,
24
+ scheduled_start_before: Union[Unset, datetime.datetime] = UNSET,
25
+ service_provider_uuid: Union[Unset, UUID] = UNSET,
26
+ state: Union[Unset, list[PublicMaintenanceAnnouncementsCountStateItem]] = UNSET,
27
+ ) -> dict[str, Any]:
28
+ params: dict[str, Any] = {}
29
+
30
+ params["maintenance_type"] = maintenance_type
31
+
32
+ json_o: Union[Unset, list[str]] = UNSET
33
+ if not isinstance(o, Unset):
34
+ json_o = []
35
+ for o_item_data in o:
36
+ o_item = o_item_data.value
37
+ json_o.append(o_item)
38
+
39
+ params["o"] = json_o
40
+
41
+ params["page"] = page
42
+
43
+ params["page_size"] = page_size
44
+
45
+ json_scheduled_end_after: Union[Unset, str] = UNSET
46
+ if not isinstance(scheduled_end_after, Unset):
47
+ json_scheduled_end_after = scheduled_end_after.isoformat()
48
+ params["scheduled_end_after"] = json_scheduled_end_after
49
+
50
+ json_scheduled_end_before: Union[Unset, str] = UNSET
51
+ if not isinstance(scheduled_end_before, Unset):
52
+ json_scheduled_end_before = scheduled_end_before.isoformat()
53
+ params["scheduled_end_before"] = json_scheduled_end_before
54
+
55
+ json_scheduled_start_after: Union[Unset, str] = UNSET
56
+ if not isinstance(scheduled_start_after, Unset):
57
+ json_scheduled_start_after = scheduled_start_after.isoformat()
58
+ params["scheduled_start_after"] = json_scheduled_start_after
59
+
60
+ json_scheduled_start_before: Union[Unset, str] = UNSET
61
+ if not isinstance(scheduled_start_before, Unset):
62
+ json_scheduled_start_before = scheduled_start_before.isoformat()
63
+ params["scheduled_start_before"] = json_scheduled_start_before
64
+
65
+ json_service_provider_uuid: Union[Unset, str] = UNSET
66
+ if not isinstance(service_provider_uuid, Unset):
67
+ json_service_provider_uuid = str(service_provider_uuid)
68
+ params["service_provider_uuid"] = json_service_provider_uuid
69
+
70
+ json_state: Union[Unset, list[str]] = UNSET
71
+ if not isinstance(state, Unset):
72
+ json_state = []
73
+ for state_item_data in state:
74
+ state_item = state_item_data.value
75
+ json_state.append(state_item)
76
+
77
+ params["state"] = json_state
78
+
79
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
80
+
81
+ _kwargs: dict[str, Any] = {
82
+ "method": "head",
83
+ "url": "/api/public-maintenance-announcements/",
84
+ "params": params,
85
+ }
86
+
87
+ return _kwargs
88
+
89
+
90
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> int:
91
+ if response.status_code == HTTPStatus.OK:
92
+ try:
93
+ return int(response.headers["x-result-count"])
94
+ except KeyError:
95
+ raise errors.UnexpectedStatus(
96
+ response.status_code, b"Expected 'X-Result-Count' header for HEAD request, but it was not found."
97
+ )
98
+ except ValueError:
99
+ count_val = response.headers.get("x-result-count")
100
+ msg = f"Expected 'X-Result-Count' header to be an integer, but got '{count_val}'."
101
+ raise errors.UnexpectedStatus(response.status_code, msg.encode())
102
+ raise errors.UnexpectedStatus(response.status_code, response.content)
103
+
104
+
105
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[int]:
106
+ return Response(
107
+ status_code=HTTPStatus(response.status_code),
108
+ content=response.content,
109
+ headers=response.headers,
110
+ parsed=_parse_response(client=client, response=response),
111
+ )
112
+
113
+
114
+ def sync_detailed(
115
+ *,
116
+ client: AuthenticatedClient,
117
+ maintenance_type: Union[Unset, int] = UNSET,
118
+ o: Union[Unset, list[PublicMaintenanceAnnouncementsCountOItem]] = UNSET,
119
+ page: Union[Unset, int] = UNSET,
120
+ page_size: Union[Unset, int] = UNSET,
121
+ scheduled_end_after: Union[Unset, datetime.datetime] = UNSET,
122
+ scheduled_end_before: Union[Unset, datetime.datetime] = UNSET,
123
+ scheduled_start_after: Union[Unset, datetime.datetime] = UNSET,
124
+ scheduled_start_before: Union[Unset, datetime.datetime] = UNSET,
125
+ service_provider_uuid: Union[Unset, UUID] = UNSET,
126
+ state: Union[Unset, list[PublicMaintenanceAnnouncementsCountStateItem]] = UNSET,
127
+ ) -> Response[int]:
128
+ """Get number of items in the collection matching the request parameters.
129
+
130
+ Args:
131
+ maintenance_type (Union[Unset, int]):
132
+ o (Union[Unset, list[PublicMaintenanceAnnouncementsCountOItem]]):
133
+ page (Union[Unset, int]):
134
+ page_size (Union[Unset, int]):
135
+ scheduled_end_after (Union[Unset, datetime.datetime]):
136
+ scheduled_end_before (Union[Unset, datetime.datetime]):
137
+ scheduled_start_after (Union[Unset, datetime.datetime]):
138
+ scheduled_start_before (Union[Unset, datetime.datetime]):
139
+ service_provider_uuid (Union[Unset, UUID]):
140
+ state (Union[Unset, list[PublicMaintenanceAnnouncementsCountStateItem]]):
141
+
142
+ Raises:
143
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
144
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
145
+
146
+ Returns:
147
+ Response[int]
148
+ """
149
+
150
+ kwargs = _get_kwargs(
151
+ maintenance_type=maintenance_type,
152
+ o=o,
153
+ page=page,
154
+ page_size=page_size,
155
+ scheduled_end_after=scheduled_end_after,
156
+ scheduled_end_before=scheduled_end_before,
157
+ scheduled_start_after=scheduled_start_after,
158
+ scheduled_start_before=scheduled_start_before,
159
+ service_provider_uuid=service_provider_uuid,
160
+ state=state,
161
+ )
162
+
163
+ response = client.get_httpx_client().request(
164
+ **kwargs,
165
+ )
166
+
167
+ return _build_response(client=client, response=response)
168
+
169
+
170
+ def sync(
171
+ *,
172
+ client: AuthenticatedClient,
173
+ maintenance_type: Union[Unset, int] = UNSET,
174
+ o: Union[Unset, list[PublicMaintenanceAnnouncementsCountOItem]] = UNSET,
175
+ page: Union[Unset, int] = UNSET,
176
+ page_size: Union[Unset, int] = UNSET,
177
+ scheduled_end_after: Union[Unset, datetime.datetime] = UNSET,
178
+ scheduled_end_before: Union[Unset, datetime.datetime] = UNSET,
179
+ scheduled_start_after: Union[Unset, datetime.datetime] = UNSET,
180
+ scheduled_start_before: Union[Unset, datetime.datetime] = UNSET,
181
+ service_provider_uuid: Union[Unset, UUID] = UNSET,
182
+ state: Union[Unset, list[PublicMaintenanceAnnouncementsCountStateItem]] = UNSET,
183
+ ) -> int:
184
+ """Get number of items in the collection matching the request parameters.
185
+
186
+ Args:
187
+ maintenance_type (Union[Unset, int]):
188
+ o (Union[Unset, list[PublicMaintenanceAnnouncementsCountOItem]]):
189
+ page (Union[Unset, int]):
190
+ page_size (Union[Unset, int]):
191
+ scheduled_end_after (Union[Unset, datetime.datetime]):
192
+ scheduled_end_before (Union[Unset, datetime.datetime]):
193
+ scheduled_start_after (Union[Unset, datetime.datetime]):
194
+ scheduled_start_before (Union[Unset, datetime.datetime]):
195
+ service_provider_uuid (Union[Unset, UUID]):
196
+ state (Union[Unset, list[PublicMaintenanceAnnouncementsCountStateItem]]):
197
+
198
+ Raises:
199
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
200
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
201
+
202
+ Returns:
203
+ int
204
+ """
205
+
206
+ return sync_detailed(
207
+ client=client,
208
+ maintenance_type=maintenance_type,
209
+ o=o,
210
+ page=page,
211
+ page_size=page_size,
212
+ scheduled_end_after=scheduled_end_after,
213
+ scheduled_end_before=scheduled_end_before,
214
+ scheduled_start_after=scheduled_start_after,
215
+ scheduled_start_before=scheduled_start_before,
216
+ service_provider_uuid=service_provider_uuid,
217
+ state=state,
218
+ ).parsed
219
+
220
+
221
+ async def asyncio_detailed(
222
+ *,
223
+ client: AuthenticatedClient,
224
+ maintenance_type: Union[Unset, int] = UNSET,
225
+ o: Union[Unset, list[PublicMaintenanceAnnouncementsCountOItem]] = UNSET,
226
+ page: Union[Unset, int] = UNSET,
227
+ page_size: Union[Unset, int] = UNSET,
228
+ scheduled_end_after: Union[Unset, datetime.datetime] = UNSET,
229
+ scheduled_end_before: Union[Unset, datetime.datetime] = UNSET,
230
+ scheduled_start_after: Union[Unset, datetime.datetime] = UNSET,
231
+ scheduled_start_before: Union[Unset, datetime.datetime] = UNSET,
232
+ service_provider_uuid: Union[Unset, UUID] = UNSET,
233
+ state: Union[Unset, list[PublicMaintenanceAnnouncementsCountStateItem]] = UNSET,
234
+ ) -> Response[int]:
235
+ """Get number of items in the collection matching the request parameters.
236
+
237
+ Args:
238
+ maintenance_type (Union[Unset, int]):
239
+ o (Union[Unset, list[PublicMaintenanceAnnouncementsCountOItem]]):
240
+ page (Union[Unset, int]):
241
+ page_size (Union[Unset, int]):
242
+ scheduled_end_after (Union[Unset, datetime.datetime]):
243
+ scheduled_end_before (Union[Unset, datetime.datetime]):
244
+ scheduled_start_after (Union[Unset, datetime.datetime]):
245
+ scheduled_start_before (Union[Unset, datetime.datetime]):
246
+ service_provider_uuid (Union[Unset, UUID]):
247
+ state (Union[Unset, list[PublicMaintenanceAnnouncementsCountStateItem]]):
248
+
249
+ Raises:
250
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
251
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
252
+
253
+ Returns:
254
+ Response[int]
255
+ """
256
+
257
+ kwargs = _get_kwargs(
258
+ maintenance_type=maintenance_type,
259
+ o=o,
260
+ page=page,
261
+ page_size=page_size,
262
+ scheduled_end_after=scheduled_end_after,
263
+ scheduled_end_before=scheduled_end_before,
264
+ scheduled_start_after=scheduled_start_after,
265
+ scheduled_start_before=scheduled_start_before,
266
+ service_provider_uuid=service_provider_uuid,
267
+ state=state,
268
+ )
269
+
270
+ response = await client.get_async_httpx_client().request(**kwargs)
271
+
272
+ return _build_response(client=client, response=response)
273
+
274
+
275
+ async def asyncio(
276
+ *,
277
+ client: AuthenticatedClient,
278
+ maintenance_type: Union[Unset, int] = UNSET,
279
+ o: Union[Unset, list[PublicMaintenanceAnnouncementsCountOItem]] = UNSET,
280
+ page: Union[Unset, int] = UNSET,
281
+ page_size: Union[Unset, int] = UNSET,
282
+ scheduled_end_after: Union[Unset, datetime.datetime] = UNSET,
283
+ scheduled_end_before: Union[Unset, datetime.datetime] = UNSET,
284
+ scheduled_start_after: Union[Unset, datetime.datetime] = UNSET,
285
+ scheduled_start_before: Union[Unset, datetime.datetime] = UNSET,
286
+ service_provider_uuid: Union[Unset, UUID] = UNSET,
287
+ state: Union[Unset, list[PublicMaintenanceAnnouncementsCountStateItem]] = UNSET,
288
+ ) -> int:
289
+ """Get number of items in the collection matching the request parameters.
290
+
291
+ Args:
292
+ maintenance_type (Union[Unset, int]):
293
+ o (Union[Unset, list[PublicMaintenanceAnnouncementsCountOItem]]):
294
+ page (Union[Unset, int]):
295
+ page_size (Union[Unset, int]):
296
+ scheduled_end_after (Union[Unset, datetime.datetime]):
297
+ scheduled_end_before (Union[Unset, datetime.datetime]):
298
+ scheduled_start_after (Union[Unset, datetime.datetime]):
299
+ scheduled_start_before (Union[Unset, datetime.datetime]):
300
+ service_provider_uuid (Union[Unset, UUID]):
301
+ state (Union[Unset, list[PublicMaintenanceAnnouncementsCountStateItem]]):
302
+
303
+ Raises:
304
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
305
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
306
+
307
+ Returns:
308
+ int
309
+ """
310
+
311
+ return (
312
+ await asyncio_detailed(
313
+ client=client,
314
+ maintenance_type=maintenance_type,
315
+ o=o,
316
+ page=page,
317
+ page_size=page_size,
318
+ scheduled_end_after=scheduled_end_after,
319
+ scheduled_end_before=scheduled_end_before,
320
+ scheduled_start_after=scheduled_start_after,
321
+ scheduled_start_before=scheduled_start_before,
322
+ service_provider_uuid=service_provider_uuid,
323
+ state=state,
324
+ )
325
+ ).parsed