waldur-api-client 7.8.2__py3-none-any.whl → 7.8.4__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 (174) hide show
  1. waldur_api_client/api/booking_resources/booking_resources_count.py +18 -0
  2. waldur_api_client/api/booking_resources/booking_resources_list.py +18 -0
  3. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_checklist_template_count.py +125 -0
  4. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_checklist_template_retrieve.py +126 -0
  5. waldur_api_client/api/marketplace_project_update_requests/marketplace_project_update_requests_count.py +18 -18
  6. waldur_api_client/api/marketplace_project_update_requests/marketplace_project_update_requests_list.py +18 -18
  7. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_tos_stats_retrieve.py +146 -0
  8. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_count.py +18 -0
  9. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_list.py +18 -0
  10. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_move_resource.py +22 -0
  11. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_update_options.py +168 -0
  12. waldur_api_client/api/marketplace_resources/marketplace_resources_count.py +18 -0
  13. waldur_api_client/api/marketplace_resources/marketplace_resources_list.py +18 -0
  14. waldur_api_client/api/marketplace_resources/marketplace_resources_move_resource.py +22 -0
  15. waldur_api_client/api/marketplace_resources/marketplace_resources_renew.py +166 -0
  16. waldur_api_client/api/marketplace_service_providers/service_provider_checklists_summary.py +189 -0
  17. waldur_api_client/api/onboarding/__init__.py +1 -0
  18. waldur_api_client/api/onboarding/onboarding_supported_countries_retrieve.py +74 -0
  19. waldur_api_client/api/onboarding_justifications/__init__.py +1 -0
  20. waldur_api_client/api/onboarding_justifications/onboarding_justifications_attach_document.py +211 -0
  21. waldur_api_client/api/onboarding_justifications/onboarding_justifications_count.py +172 -0
  22. waldur_api_client/api/onboarding_justifications/onboarding_justifications_create.py +150 -0
  23. waldur_api_client/api/onboarding_justifications/onboarding_justifications_create_justification.py +154 -0
  24. waldur_api_client/api/onboarding_justifications/onboarding_justifications_destroy.py +89 -0
  25. waldur_api_client/api/onboarding_justifications/onboarding_justifications_list.py +175 -0
  26. waldur_api_client/api/onboarding_justifications/onboarding_justifications_partial_update.py +164 -0
  27. waldur_api_client/api/onboarding_justifications/onboarding_justifications_retrieve.py +142 -0
  28. waldur_api_client/api/onboarding_justifications/onboarding_justifications_update.py +164 -0
  29. waldur_api_client/api/onboarding_verifications/__init__.py +1 -0
  30. waldur_api_client/api/onboarding_verifications/onboarding_verifications_count.py +172 -0
  31. waldur_api_client/api/onboarding_verifications/onboarding_verifications_create.py +150 -0
  32. waldur_api_client/api/onboarding_verifications/onboarding_verifications_create_customer.py +144 -0
  33. waldur_api_client/api/onboarding_verifications/onboarding_verifications_destroy.py +89 -0
  34. waldur_api_client/api/onboarding_verifications/onboarding_verifications_list.py +175 -0
  35. waldur_api_client/api/onboarding_verifications/onboarding_verifications_partial_update.py +164 -0
  36. waldur_api_client/api/onboarding_verifications/onboarding_verifications_retrieve.py +142 -0
  37. waldur_api_client/api/onboarding_verifications/onboarding_verifications_update.py +164 -0
  38. waldur_api_client/api/onboarding_verifications/onboarding_verifications_validate_company.py +154 -0
  39. waldur_api_client/api/openstack_backups/openstack_backups_restore.py +10 -10
  40. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_count.py +33 -0
  41. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_create.py +154 -0
  42. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_destroy.py +91 -0
  43. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_list.py +33 -0
  44. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_partial_update.py +164 -0
  45. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_update.py +164 -0
  46. waldur_api_client/api/openstack_networks/openstack_networks_rbac_policy_create.py +24 -22
  47. waldur_api_client/api/projects/projects_checklist_template_count.py +125 -0
  48. waldur_api_client/api/projects/projects_checklist_template_retrieve.py +126 -0
  49. waldur_api_client/api/proposal_proposals/proposal_proposals_checklist_template_count.py +125 -0
  50. waldur_api_client/api/proposal_proposals/proposal_proposals_checklist_template_retrieve.py +126 -0
  51. waldur_api_client/api/proposal_protected_calls/proposal_protected_calls_offerings_list.py +15 -0
  52. waldur_api_client/api/rancher_services/rancher_services_create.py +22 -22
  53. waldur_api_client/models/__init__.py +88 -10
  54. waldur_api_client/models/azure_sql_server_create_order_attributes.py +5 -10
  55. waldur_api_client/models/azure_virtual_machine_create_order_attributes.py +7 -12
  56. waldur_api_client/models/booking_resource.py +9 -34
  57. waldur_api_client/models/booking_resources_list_field_item.py +1 -3
  58. waldur_api_client/models/booking_resources_retrieve_field_item.py +1 -3
  59. waldur_api_client/models/call_round.py +4 -4
  60. waldur_api_client/models/checklist_template.py +99 -0
  61. waldur_api_client/models/checklist_template_checklist.py +44 -0
  62. waldur_api_client/models/constance_settings.py +54 -0
  63. waldur_api_client/models/constance_settings_request.py +54 -0
  64. waldur_api_client/models/constance_settings_request_form.py +54 -0
  65. waldur_api_client/models/constance_settings_request_multipart.py +99 -0
  66. waldur_api_client/models/customer.py +9 -0
  67. waldur_api_client/models/customers_list_field_item.py +1 -0
  68. waldur_api_client/models/customers_retrieve_field_item.py +1 -0
  69. waldur_api_client/models/deprecated_network_rbac_policy.py +137 -0
  70. waldur_api_client/models/deprecated_network_rbac_policy_request.py +78 -0
  71. waldur_api_client/models/event_groups_enum.py +1 -0
  72. waldur_api_client/models/event_types_enum.py +3 -0
  73. waldur_api_client/models/generic_order_attributes.py +1 -2
  74. waldur_api_client/models/managed_rancher_cluster_resources_list_field_item.py +1 -3
  75. waldur_api_client/models/managed_rancher_cluster_resources_retrieve_field_item.py +1 -3
  76. waldur_api_client/models/marketplace_orders_list_field_item.py +1 -3
  77. waldur_api_client/models/marketplace_orders_retrieve_field_item.py +1 -3
  78. waldur_api_client/models/marketplace_provider_resources_details_retrieve_field_item.py +1 -3
  79. waldur_api_client/models/marketplace_provider_resources_list_field_item.py +1 -3
  80. waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +1 -3
  81. waldur_api_client/models/marketplace_resources_details_retrieve_field_item.py +1 -3
  82. waldur_api_client/models/marketplace_resources_list_field_item.py +1 -3
  83. waldur_api_client/models/marketplace_resources_retrieve_field_item.py +1 -3
  84. waldur_api_client/models/marketplace_robot_accounts_list_field_item.py +2 -1
  85. waldur_api_client/models/marketplace_robot_accounts_retrieve_field_item.py +2 -1
  86. waldur_api_client/models/marketplace_service_providers_projects_list_field_item.py +1 -0
  87. waldur_api_client/models/merged_plugin_options.py +27 -0
  88. waldur_api_client/models/merged_plugin_options_request.py +27 -0
  89. waldur_api_client/models/move_resource_request.py +65 -0
  90. waldur_api_client/models/nested_round.py +5 -5
  91. waldur_api_client/models/network_rbac_policy_request.py +8 -0
  92. waldur_api_client/models/notification.py +9 -9
  93. waldur_api_client/models/{notification_context_fields.py → notification_context_schema.py} +6 -6
  94. waldur_api_client/models/notification_template_detail_serializers.py +9 -3
  95. waldur_api_client/models/offering_component.py +79 -0
  96. waldur_api_client/models/offering_component_request.py +80 -0
  97. waldur_api_client/models/onboarding_company_validation_request_request.py +88 -0
  98. waldur_api_client/models/onboarding_justification.py +183 -0
  99. waldur_api_client/models/onboarding_justification_create_request.py +68 -0
  100. waldur_api_client/models/onboarding_justification_documentation.py +108 -0
  101. waldur_api_client/models/onboarding_justification_documentation_request.py +84 -0
  102. waldur_api_client/models/onboarding_justification_documentation_request_form.py +84 -0
  103. waldur_api_client/models/onboarding_justification_documentation_request_multipart.py +98 -0
  104. waldur_api_client/models/onboarding_justification_request.py +75 -0
  105. waldur_api_client/models/onboarding_verification.py +250 -0
  106. waldur_api_client/models/onboarding_verification_request.py +128 -0
  107. waldur_api_client/models/onboarding_verification_status_enum.py +12 -0
  108. waldur_api_client/models/open_stack_backup_restoration.py +3 -5
  109. waldur_api_client/models/open_stack_backup_restoration_create_request.py +141 -0
  110. waldur_api_client/models/open_stack_backup_restoration_request.py +22 -30
  111. waldur_api_client/models/open_stack_create_floating_ip_request.py +89 -0
  112. waldur_api_client/models/open_stack_create_port_request.py +104 -0
  113. waldur_api_client/models/open_stack_instance.py +13 -29
  114. waldur_api_client/models/open_stack_instance_create_order_attributes.py +67 -54
  115. waldur_api_client/models/open_stack_instance_floating_i_ps_update_request.py +5 -5
  116. waldur_api_client/models/open_stack_instance_ports_update_request.py +5 -5
  117. waldur_api_client/models/open_stack_instance_request.py +1 -67
  118. waldur_api_client/models/open_stack_nested_port_request.py +0 -9
  119. waldur_api_client/models/{open_stack_nested_security_group_request.py → open_stack_security_group_hyperlink_request.py} +14 -14
  120. waldur_api_client/models/open_stack_server_group_hyperlink_request.py +59 -0
  121. waldur_api_client/models/open_stack_tenant_create_order_attributes.py +9 -14
  122. waldur_api_client/models/open_stack_volume_create_order_attributes.py +8 -13
  123. waldur_api_client/models/openstack_instances_list_field_item.py +0 -7
  124. waldur_api_client/models/openstack_instances_retrieve_field_item.py +0 -7
  125. waldur_api_client/models/order_create.py +8 -0
  126. waldur_api_client/models/order_details.py +9 -34
  127. waldur_api_client/models/patched_network_rbac_policy_request.py +85 -0
  128. waldur_api_client/models/patched_onboarding_justification_request.py +77 -0
  129. waldur_api_client/models/patched_onboarding_verification_request.py +128 -0
  130. waldur_api_client/models/patched_open_stack_instance_request.py +1 -67
  131. waldur_api_client/models/patched_project_credit_request.py +13 -0
  132. waldur_api_client/models/patched_project_request.py +1 -2
  133. waldur_api_client/models/patched_project_request_form.py +1 -2
  134. waldur_api_client/models/patched_project_request_multipart.py +1 -2
  135. waldur_api_client/models/project.py +10 -2
  136. waldur_api_client/models/project_credit.py +13 -0
  137. waldur_api_client/models/project_credit_request.py +13 -0
  138. waldur_api_client/models/{rancher_nested_security_group.py → project_hyperlink_request.py} +5 -5
  139. waldur_api_client/models/project_request.py +1 -2
  140. waldur_api_client/models/project_request_form.py +1 -2
  141. waldur_api_client/models/project_request_multipart.py +1 -2
  142. waldur_api_client/models/projects_list_field_item.py +1 -0
  143. waldur_api_client/models/projects_retrieve_field_item.py +1 -0
  144. waldur_api_client/models/protected_round.py +4 -4
  145. waldur_api_client/models/question.py +102 -0
  146. waldur_api_client/models/{open_stack_data_volume.py → question_options.py} +27 -29
  147. waldur_api_client/models/rancher_clusters_list_field_item.py +0 -1
  148. waldur_api_client/models/rancher_clusters_retrieve_field_item.py +0 -1
  149. waldur_api_client/models/rancher_service_create.py +508 -0
  150. waldur_api_client/models/rancher_service_create_marketplace_offering_plugin_options_type_0.py +44 -0
  151. waldur_api_client/models/rancher_service_create_request.py +185 -0
  152. waldur_api_client/models/rancher_service_request.py +16 -19
  153. waldur_api_client/models/rancher_workload_create.py +59 -0
  154. waldur_api_client/models/rancher_workload_create_request.py +59 -0
  155. waldur_api_client/models/resource.py +9 -34
  156. waldur_api_client/models/resource_renew_request.py +83 -0
  157. waldur_api_client/models/resource_renew_request_limits.py +44 -0
  158. waldur_api_client/models/robot_account_details.py +22 -13
  159. waldur_api_client/models/{status_enum.py → round_status.py} +1 -1
  160. waldur_api_client/models/service_provider_checklist_summary.py +98 -0
  161. waldur_api_client/models/slurm_invoices_slurm_package_create_order_attributes.py +4 -9
  162. waldur_api_client/models/time_series_to_s_data.py +69 -0
  163. waldur_api_client/models/to_s_consent_dashboard.py +155 -0
  164. waldur_api_client/models/update_offering_component_request.py +79 -0
  165. waldur_api_client/models/v_mware_virtual_machine_create_order_attributes.py +11 -16
  166. waldur_api_client/models/validation_decision_enum.py +10 -0
  167. waldur_api_client/models/validation_method_enum.py +8 -0
  168. waldur_api_client/models/version_adoption.py +67 -0
  169. waldur_api_client/models/vmware_nested_network.py +0 -25
  170. waldur_api_client/models/vmware_nested_network_request.py +6 -14
  171. {waldur_api_client-7.8.2.dist-info → waldur_api_client-7.8.4.dist-info}/METADATA +1 -1
  172. {waldur_api_client-7.8.2.dist-info → waldur_api_client-7.8.4.dist-info}/RECORD +174 -101
  173. {waldur_api_client-7.8.2.dist-info → waldur_api_client-7.8.4.dist-info}/WHEEL +0 -0
  174. {waldur_api_client-7.8.2.dist-info → waldur_api_client-7.8.4.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,142 @@
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.onboarding_verification import OnboardingVerification
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": "get",
18
+ "url": f"/api/onboarding-verifications/{uuid}/",
19
+ }
20
+
21
+ return _kwargs
22
+
23
+
24
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> OnboardingVerification:
25
+ if response.status_code == 200:
26
+ response_200 = OnboardingVerification.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[OnboardingVerification]:
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[OnboardingVerification]:
48
+ """
49
+ Args:
50
+ uuid (UUID):
51
+
52
+ Raises:
53
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
54
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
55
+
56
+ Returns:
57
+ Response[OnboardingVerification]
58
+ """
59
+
60
+ kwargs = _get_kwargs(
61
+ uuid=uuid,
62
+ )
63
+
64
+ response = client.get_httpx_client().request(
65
+ **kwargs,
66
+ )
67
+
68
+ return _build_response(client=client, response=response)
69
+
70
+
71
+ def sync(
72
+ uuid: UUID,
73
+ *,
74
+ client: AuthenticatedClient,
75
+ ) -> OnboardingVerification:
76
+ """
77
+ Args:
78
+ uuid (UUID):
79
+
80
+ Raises:
81
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
82
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
83
+
84
+ Returns:
85
+ OnboardingVerification
86
+ """
87
+
88
+ return sync_detailed(
89
+ uuid=uuid,
90
+ client=client,
91
+ ).parsed
92
+
93
+
94
+ async def asyncio_detailed(
95
+ uuid: UUID,
96
+ *,
97
+ client: AuthenticatedClient,
98
+ ) -> Response[OnboardingVerification]:
99
+ """
100
+ Args:
101
+ uuid (UUID):
102
+
103
+ Raises:
104
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
105
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
106
+
107
+ Returns:
108
+ Response[OnboardingVerification]
109
+ """
110
+
111
+ kwargs = _get_kwargs(
112
+ uuid=uuid,
113
+ )
114
+
115
+ response = await client.get_async_httpx_client().request(**kwargs)
116
+
117
+ return _build_response(client=client, response=response)
118
+
119
+
120
+ async def asyncio(
121
+ uuid: UUID,
122
+ *,
123
+ client: AuthenticatedClient,
124
+ ) -> OnboardingVerification:
125
+ """
126
+ Args:
127
+ uuid (UUID):
128
+
129
+ Raises:
130
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
131
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
132
+
133
+ Returns:
134
+ OnboardingVerification
135
+ """
136
+
137
+ return (
138
+ await asyncio_detailed(
139
+ uuid=uuid,
140
+ client=client,
141
+ )
142
+ ).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.onboarding_verification import OnboardingVerification
10
+ from ...models.onboarding_verification_request import OnboardingVerificationRequest
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ uuid: UUID,
16
+ *,
17
+ body: OnboardingVerificationRequest,
18
+ ) -> dict[str, Any]:
19
+ headers: dict[str, Any] = {}
20
+
21
+ _kwargs: dict[str, Any] = {
22
+ "method": "put",
23
+ "url": f"/api/onboarding-verifications/{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) -> OnboardingVerification:
35
+ if response.status_code == 200:
36
+ response_200 = OnboardingVerification.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[OnboardingVerification]:
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: OnboardingVerificationRequest,
58
+ ) -> Response[OnboardingVerification]:
59
+ """
60
+ Args:
61
+ uuid (UUID):
62
+ body (OnboardingVerificationRequest):
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[OnboardingVerification]
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: OnboardingVerificationRequest,
89
+ ) -> OnboardingVerification:
90
+ """
91
+ Args:
92
+ uuid (UUID):
93
+ body (OnboardingVerificationRequest):
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
+ OnboardingVerification
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: OnboardingVerificationRequest,
115
+ ) -> Response[OnboardingVerification]:
116
+ """
117
+ Args:
118
+ uuid (UUID):
119
+ body (OnboardingVerificationRequest):
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[OnboardingVerification]
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: OnboardingVerificationRequest,
144
+ ) -> OnboardingVerification:
145
+ """
146
+ Args:
147
+ uuid (UUID):
148
+ body (OnboardingVerificationRequest):
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
+ OnboardingVerification
156
+ """
157
+
158
+ return (
159
+ await asyncio_detailed(
160
+ uuid=uuid,
161
+ client=client,
162
+ body=body,
163
+ )
164
+ ).parsed
@@ -0,0 +1,154 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.onboarding_company_validation_request_request import OnboardingCompanyValidationRequestRequest
9
+ from ...models.onboarding_verification import OnboardingVerification
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ *,
15
+ body: OnboardingCompanyValidationRequestRequest,
16
+ ) -> dict[str, Any]:
17
+ headers: dict[str, Any] = {}
18
+
19
+ _kwargs: dict[str, Any] = {
20
+ "method": "post",
21
+ "url": "/api/onboarding-verifications/validate_company/",
22
+ }
23
+
24
+ _kwargs["json"] = body.to_dict()
25
+
26
+ headers["Content-Type"] = "application/json"
27
+
28
+ _kwargs["headers"] = headers
29
+ return _kwargs
30
+
31
+
32
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> OnboardingVerification:
33
+ if response.status_code == 200:
34
+ response_200 = OnboardingVerification.from_dict(response.json())
35
+
36
+ return response_200
37
+ raise errors.UnexpectedStatus(response.status_code, response.content)
38
+
39
+
40
+ def _build_response(
41
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
42
+ ) -> Response[OnboardingVerification]:
43
+ return Response(
44
+ status_code=HTTPStatus(response.status_code),
45
+ content=response.content,
46
+ headers=response.headers,
47
+ parsed=_parse_response(client=client, response=response),
48
+ )
49
+
50
+
51
+ def sync_detailed(
52
+ *,
53
+ client: AuthenticatedClient,
54
+ body: OnboardingCompanyValidationRequestRequest,
55
+ ) -> Response[OnboardingVerification]:
56
+ """Start company validation process.
57
+
58
+ Args:
59
+ body (OnboardingCompanyValidationRequestRequest):
60
+
61
+ Raises:
62
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
63
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
64
+
65
+ Returns:
66
+ Response[OnboardingVerification]
67
+ """
68
+
69
+ kwargs = _get_kwargs(
70
+ body=body,
71
+ )
72
+
73
+ response = client.get_httpx_client().request(
74
+ **kwargs,
75
+ )
76
+
77
+ return _build_response(client=client, response=response)
78
+
79
+
80
+ def sync(
81
+ *,
82
+ client: AuthenticatedClient,
83
+ body: OnboardingCompanyValidationRequestRequest,
84
+ ) -> OnboardingVerification:
85
+ """Start company validation process.
86
+
87
+ Args:
88
+ body (OnboardingCompanyValidationRequestRequest):
89
+
90
+ Raises:
91
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
92
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
93
+
94
+ Returns:
95
+ OnboardingVerification
96
+ """
97
+
98
+ return sync_detailed(
99
+ client=client,
100
+ body=body,
101
+ ).parsed
102
+
103
+
104
+ async def asyncio_detailed(
105
+ *,
106
+ client: AuthenticatedClient,
107
+ body: OnboardingCompanyValidationRequestRequest,
108
+ ) -> Response[OnboardingVerification]:
109
+ """Start company validation process.
110
+
111
+ Args:
112
+ body (OnboardingCompanyValidationRequestRequest):
113
+
114
+ Raises:
115
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
116
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
117
+
118
+ Returns:
119
+ Response[OnboardingVerification]
120
+ """
121
+
122
+ kwargs = _get_kwargs(
123
+ body=body,
124
+ )
125
+
126
+ response = await client.get_async_httpx_client().request(**kwargs)
127
+
128
+ return _build_response(client=client, response=response)
129
+
130
+
131
+ async def asyncio(
132
+ *,
133
+ client: AuthenticatedClient,
134
+ body: OnboardingCompanyValidationRequestRequest,
135
+ ) -> OnboardingVerification:
136
+ """Start company validation process.
137
+
138
+ Args:
139
+ body (OnboardingCompanyValidationRequestRequest):
140
+
141
+ Raises:
142
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
143
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
144
+
145
+ Returns:
146
+ OnboardingVerification
147
+ """
148
+
149
+ return (
150
+ await asyncio_detailed(
151
+ client=client,
152
+ body=body,
153
+ )
154
+ ).parsed
@@ -6,7 +6,7 @@ import httpx
6
6
 
7
7
  from ... import errors
8
8
  from ...client import AuthenticatedClient, Client
9
- from ...models.open_stack_backup_restoration_request import OpenStackBackupRestorationRequest
9
+ from ...models.open_stack_backup_restoration_create_request import OpenStackBackupRestorationCreateRequest
10
10
  from ...models.open_stack_instance import OpenStackInstance
11
11
  from ...types import Response
12
12
 
@@ -14,7 +14,7 @@ from ...types import Response
14
14
  def _get_kwargs(
15
15
  uuid: UUID,
16
16
  *,
17
- body: OpenStackBackupRestorationRequest,
17
+ body: OpenStackBackupRestorationCreateRequest,
18
18
  ) -> dict[str, Any]:
19
19
  headers: dict[str, Any] = {}
20
20
 
@@ -54,13 +54,13 @@ def sync_detailed(
54
54
  uuid: UUID,
55
55
  *,
56
56
  client: AuthenticatedClient,
57
- body: OpenStackBackupRestorationRequest,
57
+ body: OpenStackBackupRestorationCreateRequest,
58
58
  ) -> Response[OpenStackInstance]:
59
59
  """Restore instance from backup
60
60
 
61
61
  Args:
62
62
  uuid (UUID):
63
- body (OpenStackBackupRestorationRequest):
63
+ body (OpenStackBackupRestorationCreateRequest):
64
64
 
65
65
  Raises:
66
66
  errors.UnexpectedStatus: If the server returns an undocumented status code.
@@ -86,13 +86,13 @@ def sync(
86
86
  uuid: UUID,
87
87
  *,
88
88
  client: AuthenticatedClient,
89
- body: OpenStackBackupRestorationRequest,
89
+ body: OpenStackBackupRestorationCreateRequest,
90
90
  ) -> OpenStackInstance:
91
91
  """Restore instance from backup
92
92
 
93
93
  Args:
94
94
  uuid (UUID):
95
- body (OpenStackBackupRestorationRequest):
95
+ body (OpenStackBackupRestorationCreateRequest):
96
96
 
97
97
  Raises:
98
98
  errors.UnexpectedStatus: If the server returns an undocumented status code.
@@ -113,13 +113,13 @@ async def asyncio_detailed(
113
113
  uuid: UUID,
114
114
  *,
115
115
  client: AuthenticatedClient,
116
- body: OpenStackBackupRestorationRequest,
116
+ body: OpenStackBackupRestorationCreateRequest,
117
117
  ) -> Response[OpenStackInstance]:
118
118
  """Restore instance from backup
119
119
 
120
120
  Args:
121
121
  uuid (UUID):
122
- body (OpenStackBackupRestorationRequest):
122
+ body (OpenStackBackupRestorationCreateRequest):
123
123
 
124
124
  Raises:
125
125
  errors.UnexpectedStatus: If the server returns an undocumented status code.
@@ -143,13 +143,13 @@ async def asyncio(
143
143
  uuid: UUID,
144
144
  *,
145
145
  client: AuthenticatedClient,
146
- body: OpenStackBackupRestorationRequest,
146
+ body: OpenStackBackupRestorationCreateRequest,
147
147
  ) -> OpenStackInstance:
148
148
  """Restore instance from backup
149
149
 
150
150
  Args:
151
151
  uuid (UUID):
152
- body (OpenStackBackupRestorationRequest):
152
+ body (OpenStackBackupRestorationCreateRequest):
153
153
 
154
154
  Raises:
155
155
  errors.UnexpectedStatus: If the server returns an undocumented status code.
@@ -19,6 +19,8 @@ def _get_kwargs(
19
19
  policy_type: Union[Unset, OpenstackNetworkRbacPoliciesCountPolicyType] = UNSET,
20
20
  target_tenant: Union[Unset, str] = UNSET,
21
21
  target_tenant_uuid: Union[Unset, UUID] = UNSET,
22
+ tenant: Union[Unset, str] = UNSET,
23
+ tenant_uuid: Union[Unset, UUID] = UNSET,
22
24
  ) -> dict[str, Any]:
23
25
  params: dict[str, Any] = {}
24
26
 
@@ -46,6 +48,13 @@ def _get_kwargs(
46
48
  json_target_tenant_uuid = str(target_tenant_uuid)
47
49
  params["target_tenant_uuid"] = json_target_tenant_uuid
48
50
 
51
+ params["tenant"] = tenant
52
+
53
+ json_tenant_uuid: Union[Unset, str] = UNSET
54
+ if not isinstance(tenant_uuid, Unset):
55
+ json_tenant_uuid = str(tenant_uuid)
56
+ params["tenant_uuid"] = json_tenant_uuid
57
+
49
58
  params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
50
59
 
51
60
  _kwargs: dict[str, Any] = {
@@ -91,6 +100,8 @@ def sync_detailed(
91
100
  policy_type: Union[Unset, OpenstackNetworkRbacPoliciesCountPolicyType] = UNSET,
92
101
  target_tenant: Union[Unset, str] = UNSET,
93
102
  target_tenant_uuid: Union[Unset, UUID] = UNSET,
103
+ tenant: Union[Unset, str] = UNSET,
104
+ tenant_uuid: Union[Unset, UUID] = UNSET,
94
105
  ) -> Response[int]:
95
106
  """Get number of items in the collection matching the request parameters.
96
107
 
@@ -102,6 +113,8 @@ def sync_detailed(
102
113
  policy_type (Union[Unset, OpenstackNetworkRbacPoliciesCountPolicyType]):
103
114
  target_tenant (Union[Unset, str]):
104
115
  target_tenant_uuid (Union[Unset, UUID]):
116
+ tenant (Union[Unset, str]):
117
+ tenant_uuid (Union[Unset, UUID]):
105
118
 
106
119
  Raises:
107
120
  errors.UnexpectedStatus: If the server returns an undocumented status code.
@@ -119,6 +132,8 @@ def sync_detailed(
119
132
  policy_type=policy_type,
120
133
  target_tenant=target_tenant,
121
134
  target_tenant_uuid=target_tenant_uuid,
135
+ tenant=tenant,
136
+ tenant_uuid=tenant_uuid,
122
137
  )
123
138
 
124
139
  response = client.get_httpx_client().request(
@@ -138,6 +153,8 @@ def sync(
138
153
  policy_type: Union[Unset, OpenstackNetworkRbacPoliciesCountPolicyType] = UNSET,
139
154
  target_tenant: Union[Unset, str] = UNSET,
140
155
  target_tenant_uuid: Union[Unset, UUID] = UNSET,
156
+ tenant: Union[Unset, str] = UNSET,
157
+ tenant_uuid: Union[Unset, UUID] = UNSET,
141
158
  ) -> int:
142
159
  """Get number of items in the collection matching the request parameters.
143
160
 
@@ -149,6 +166,8 @@ def sync(
149
166
  policy_type (Union[Unset, OpenstackNetworkRbacPoliciesCountPolicyType]):
150
167
  target_tenant (Union[Unset, str]):
151
168
  target_tenant_uuid (Union[Unset, UUID]):
169
+ tenant (Union[Unset, str]):
170
+ tenant_uuid (Union[Unset, UUID]):
152
171
 
153
172
  Raises:
154
173
  errors.UnexpectedStatus: If the server returns an undocumented status code.
@@ -167,6 +186,8 @@ def sync(
167
186
  policy_type=policy_type,
168
187
  target_tenant=target_tenant,
169
188
  target_tenant_uuid=target_tenant_uuid,
189
+ tenant=tenant,
190
+ tenant_uuid=tenant_uuid,
170
191
  ).parsed
171
192
 
172
193
 
@@ -180,6 +201,8 @@ async def asyncio_detailed(
180
201
  policy_type: Union[Unset, OpenstackNetworkRbacPoliciesCountPolicyType] = UNSET,
181
202
  target_tenant: Union[Unset, str] = UNSET,
182
203
  target_tenant_uuid: Union[Unset, UUID] = UNSET,
204
+ tenant: Union[Unset, str] = UNSET,
205
+ tenant_uuid: Union[Unset, UUID] = UNSET,
183
206
  ) -> Response[int]:
184
207
  """Get number of items in the collection matching the request parameters.
185
208
 
@@ -191,6 +214,8 @@ async def asyncio_detailed(
191
214
  policy_type (Union[Unset, OpenstackNetworkRbacPoliciesCountPolicyType]):
192
215
  target_tenant (Union[Unset, str]):
193
216
  target_tenant_uuid (Union[Unset, UUID]):
217
+ tenant (Union[Unset, str]):
218
+ tenant_uuid (Union[Unset, UUID]):
194
219
 
195
220
  Raises:
196
221
  errors.UnexpectedStatus: If the server returns an undocumented status code.
@@ -208,6 +233,8 @@ async def asyncio_detailed(
208
233
  policy_type=policy_type,
209
234
  target_tenant=target_tenant,
210
235
  target_tenant_uuid=target_tenant_uuid,
236
+ tenant=tenant,
237
+ tenant_uuid=tenant_uuid,
211
238
  )
212
239
 
213
240
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -225,6 +252,8 @@ async def asyncio(
225
252
  policy_type: Union[Unset, OpenstackNetworkRbacPoliciesCountPolicyType] = UNSET,
226
253
  target_tenant: Union[Unset, str] = UNSET,
227
254
  target_tenant_uuid: Union[Unset, UUID] = UNSET,
255
+ tenant: Union[Unset, str] = UNSET,
256
+ tenant_uuid: Union[Unset, UUID] = UNSET,
228
257
  ) -> int:
229
258
  """Get number of items in the collection matching the request parameters.
230
259
 
@@ -236,6 +265,8 @@ async def asyncio(
236
265
  policy_type (Union[Unset, OpenstackNetworkRbacPoliciesCountPolicyType]):
237
266
  target_tenant (Union[Unset, str]):
238
267
  target_tenant_uuid (Union[Unset, UUID]):
268
+ tenant (Union[Unset, str]):
269
+ tenant_uuid (Union[Unset, UUID]):
239
270
 
240
271
  Raises:
241
272
  errors.UnexpectedStatus: If the server returns an undocumented status code.
@@ -255,5 +286,7 @@ async def asyncio(
255
286
  policy_type=policy_type,
256
287
  target_tenant=target_tenant,
257
288
  target_tenant_uuid=target_tenant_uuid,
289
+ tenant=tenant,
290
+ tenant_uuid=tenant_uuid,
258
291
  )
259
292
  ).parsed