waldur-api-client 0.2.0__py3-none-any.whl → 7.6.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 (231) hide show
  1. waldur_api_client/api/access_subnets/access_subnets_list.py +8 -4
  2. waldur_api_client/api/admin_announcements/admin_announcements_list.py +8 -4
  3. waldur_api_client/api/auth_tokens/auth_tokens_list.py +8 -4
  4. waldur_api_client/api/autoprovisioning_rule_plans/__init__.py +1 -0
  5. waldur_api_client/api/autoprovisioning_rule_plans/autoprovisioning_rule_plans_create.py +148 -0
  6. waldur_api_client/api/autoprovisioning_rule_plans/autoprovisioning_rule_plans_destroy.py +89 -0
  7. waldur_api_client/api/autoprovisioning_rule_plans/autoprovisioning_rule_plans_list.py +173 -0
  8. waldur_api_client/api/autoprovisioning_rule_plans/autoprovisioning_rule_plans_partial_update.py +162 -0
  9. waldur_api_client/api/autoprovisioning_rule_plans/autoprovisioning_rule_plans_retrieve.py +140 -0
  10. waldur_api_client/api/autoprovisioning_rule_plans/autoprovisioning_rule_plans_update.py +162 -0
  11. waldur_api_client/api/autoprovisioning_rules/__init__.py +1 -0
  12. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_create.py +148 -0
  13. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_destroy.py +89 -0
  14. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_list.py +171 -0
  15. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_partial_update.py +162 -0
  16. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_retrieve.py +140 -0
  17. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_update.py +162 -0
  18. waldur_api_client/api/aws_images/aws_images_list.py +8 -4
  19. waldur_api_client/api/aws_instances/aws_instances_list.py +8 -4
  20. waldur_api_client/api/aws_regions/aws_regions_list.py +8 -4
  21. waldur_api_client/api/aws_sizes/aws_sizes_list.py +8 -4
  22. waldur_api_client/api/aws_volumes/aws_volumes_list.py +8 -4
  23. waldur_api_client/api/azure_images/azure_images_list.py +8 -4
  24. waldur_api_client/api/azure_locations/azure_locations_list.py +8 -4
  25. waldur_api_client/api/azure_public_ips/azure_public_ips_list.py +8 -4
  26. waldur_api_client/api/azure_resource_groups/azure_resource_groups_list.py +8 -4
  27. waldur_api_client/api/azure_sizes/azure_sizes_list.py +8 -4
  28. waldur_api_client/api/azure_sql_databases/azure_sql_databases_list.py +8 -4
  29. waldur_api_client/api/azure_sql_servers/azure_sql_servers_list.py +8 -4
  30. waldur_api_client/api/azure_virtualmachines/azure_virtualmachines_list.py +8 -4
  31. waldur_api_client/api/booking_offerings/booking_offerings_list.py +8 -4
  32. waldur_api_client/api/booking_resources/booking_resources_list.py +8 -4
  33. waldur_api_client/api/broadcast_message_templates/broadcast_message_templates_list.py +8 -4
  34. waldur_api_client/api/broadcast_messages/broadcast_messages_list.py +8 -4
  35. waldur_api_client/api/call_managing_organisations/call_managing_organisations_list.py +8 -4
  36. waldur_api_client/api/call_rounds/call_rounds_list.py +8 -4
  37. waldur_api_client/api/component_user_usage_limits/component_user_usage_limits_list.py +8 -4
  38. waldur_api_client/api/customer_credits/customer_credits_list.py +8 -4
  39. waldur_api_client/api/customer_permissions_reviews/customer_permissions_reviews_list.py +8 -4
  40. waldur_api_client/api/digitalocean_droplets/digitalocean_droplets_list.py +8 -4
  41. waldur_api_client/api/digitalocean_images/digitalocean_images_list.py +8 -4
  42. waldur_api_client/api/digitalocean_regions/digitalocean_regions_list.py +8 -4
  43. waldur_api_client/api/digitalocean_sizes/digitalocean_sizes_list.py +8 -4
  44. waldur_api_client/api/email_logs/email_logs_list.py +8 -4
  45. waldur_api_client/api/event_subscriptions/event_subscriptions_list.py +8 -4
  46. waldur_api_client/api/events/events_list.py +8 -4
  47. waldur_api_client/api/events_stats/events_stats_list.py +8 -4
  48. waldur_api_client/api/financial_reports/financial_reports_list.py +8 -4
  49. waldur_api_client/api/freeipa_profiles/freeipa_profiles_list.py +8 -4
  50. waldur_api_client/api/google_auth/google_auth_list.py +8 -4
  51. waldur_api_client/api/hooks/hooks_list.py +4 -2
  52. waldur_api_client/api/hooks_email/hooks_email_list.py +8 -4
  53. waldur_api_client/api/hooks_web/hooks_web_list.py +8 -4
  54. waldur_api_client/api/identity_providers/identity_providers_list.py +8 -4
  55. waldur_api_client/api/invoice_items/invoice_items_list.py +8 -4
  56. waldur_api_client/api/invoices/invoices_list.py +8 -4
  57. waldur_api_client/api/keycloak_groups/keycloak_groups_list.py +8 -4
  58. waldur_api_client/api/keycloak_user_group_memberships/keycloak_user_group_memberships_list.py +8 -4
  59. waldur_api_client/api/keys/keys_list.py +8 -4
  60. waldur_api_client/api/lexis_links/lexis_links_list.py +8 -4
  61. waldur_api_client/api/marketplace_categories/marketplace_categories_list.py +8 -4
  62. waldur_api_client/api/marketplace_category_columns/marketplace_category_columns_list.py +8 -4
  63. waldur_api_client/api/marketplace_category_component_usages/marketplace_category_component_usages_list.py +8 -4
  64. waldur_api_client/api/marketplace_category_components/marketplace_category_components_list.py +8 -4
  65. waldur_api_client/api/marketplace_category_groups/marketplace_category_groups_list.py +8 -4
  66. waldur_api_client/api/marketplace_category_help_articles/marketplace_category_help_articles_list.py +8 -4
  67. waldur_api_client/api/marketplace_checklists/marketplace_checklists_answers_list.py +8 -4
  68. waldur_api_client/api/marketplace_checklists/marketplace_checklists_list.py +8 -4
  69. waldur_api_client/api/marketplace_checklists/marketplace_checklists_questions_list.py +8 -4
  70. waldur_api_client/api/marketplace_checklists/marketplace_checklists_user_answers_list.py +8 -4
  71. waldur_api_client/api/marketplace_checklists_categories/marketplace_checklists_categories_checklists_list.py +8 -4
  72. waldur_api_client/api/marketplace_checklists_categories/marketplace_checklists_categories_list.py +8 -4
  73. waldur_api_client/api/marketplace_component_usages/marketplace_component_usages_list.py +8 -4
  74. waldur_api_client/api/marketplace_component_user_usages/marketplace_component_user_usages_list.py +8 -4
  75. waldur_api_client/api/marketplace_customer_estimated_cost_policies/marketplace_customer_estimated_cost_policies_list.py +8 -4
  76. waldur_api_client/api/marketplace_customer_service_accounts/marketplace_customer_service_accounts_list.py +8 -4
  77. waldur_api_client/api/marketplace_integration_statuses/marketplace_integration_statuses_list.py +8 -4
  78. waldur_api_client/api/marketplace_offering_estimated_cost_policies/marketplace_offering_estimated_cost_policies_list.py +8 -4
  79. waldur_api_client/api/marketplace_offering_files/marketplace_offering_files_list.py +8 -4
  80. waldur_api_client/api/marketplace_offering_permissions/marketplace_offering_permissions_list.py +18 -17
  81. waldur_api_client/api/marketplace_offering_permissions_log/marketplace_offering_permissions_log_list.py +18 -17
  82. waldur_api_client/api/marketplace_offering_referrals/marketplace_offering_referrals_list.py +8 -4
  83. waldur_api_client/api/marketplace_offering_usage_policies/marketplace_offering_usage_policies_list.py +8 -4
  84. waldur_api_client/api/marketplace_offering_user_roles/marketplace_offering_user_roles_list.py +8 -4
  85. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_list.py +8 -4
  86. waldur_api_client/api/marketplace_orders/marketplace_orders_list.py +8 -4
  87. waldur_api_client/api/marketplace_plan_components/marketplace_plan_components_list.py +8 -4
  88. waldur_api_client/api/marketplace_plans/marketplace_plans_list.py +8 -4
  89. waldur_api_client/api/marketplace_project_estimated_cost_policies/marketplace_project_estimated_cost_policies_list.py +8 -4
  90. waldur_api_client/api/marketplace_project_service_accounts/marketplace_project_service_accounts_list.py +8 -4
  91. waldur_api_client/api/marketplace_project_update_requests/marketplace_project_update_requests_list.py +8 -4
  92. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_component_stats_list.py +25 -13
  93. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_costs_list.py +25 -13
  94. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_customers_list.py +25 -13
  95. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_groups_list.py +25 -13
  96. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_list.py +33 -17
  97. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_refresh_offering_usernames.py +20 -16
  98. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_list.py +8 -4
  99. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_set_as_erred.py +11 -68
  100. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_set_backend_id.py +20 -16
  101. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_set_backend_metadata.py +12 -12
  102. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_set_limits.py +12 -12
  103. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_submit_report.py +20 -16
  104. waldur_api_client/api/marketplace_public_offerings/marketplace_public_offerings_list.py +33 -17
  105. waldur_api_client/api/marketplace_remote_synchronisations/marketplace_remote_synchronisations_list.py +8 -4
  106. waldur_api_client/api/marketplace_resource_users/marketplace_resource_users_list.py +8 -4
  107. waldur_api_client/api/marketplace_resources/marketplace_resources_list.py +8 -4
  108. waldur_api_client/api/marketplace_resources/marketplace_resources_update_options.py +20 -16
  109. waldur_api_client/api/marketplace_robot_accounts/marketplace_robot_accounts_list.py +8 -4
  110. waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_list.py +8 -4
  111. waldur_api_client/api/marketplace_script_async_dry_run/marketplace_script_async_dry_run_list.py +8 -4
  112. waldur_api_client/api/marketplace_sections/marketplace_sections_list.py +8 -4
  113. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_list.py +8 -4
  114. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_offerings_list.py +25 -13
  115. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_project_permissions_list.py +10 -13
  116. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_users_list.py +15 -0
  117. waldur_api_client/api/notification_messages/notification_messages_list.py +8 -4
  118. waldur_api_client/api/notification_messages_templates/notification_messages_templates_list.py +8 -4
  119. waldur_api_client/api/openstack_backups/openstack_backups_list.py +8 -4
  120. waldur_api_client/api/openstack_flavors/openstack_flavors_list.py +26 -4
  121. waldur_api_client/api/openstack_images/openstack_images_list.py +26 -4
  122. waldur_api_client/api/openstack_instance_availability_zones/openstack_instance_availability_zones_list.py +8 -4
  123. waldur_api_client/api/openstack_instances/openstack_instances_list.py +8 -4
  124. waldur_api_client/api/openstack_marketplace_tenants/openstack_marketplace_tenants_list.py +8 -4
  125. waldur_api_client/api/openstack_migrations/openstack_migrations_list.py +8 -4
  126. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_list.py +8 -4
  127. waldur_api_client/api/openstack_networks/openstack_networks_list.py +8 -4
  128. waldur_api_client/api/openstack_ports/openstack_ports_list.py +8 -4
  129. waldur_api_client/api/openstack_routers/openstack_routers_list.py +8 -4
  130. waldur_api_client/api/openstack_security_groups/openstack_security_groups_list.py +8 -4
  131. waldur_api_client/api/openstack_server_groups/openstack_server_groups_list.py +8 -4
  132. waldur_api_client/api/openstack_snapshots/openstack_snapshots_list.py +8 -4
  133. waldur_api_client/api/openstack_subnets/openstack_subnets_list.py +8 -4
  134. waldur_api_client/api/openstack_tenants/openstack_tenants_list.py +8 -4
  135. waldur_api_client/api/openstack_volume_availability_zones/openstack_volume_availability_zones_list.py +8 -4
  136. waldur_api_client/api/openstack_volume_types/openstack_volume_types_list.py +26 -4
  137. waldur_api_client/api/openstack_volumes/openstack_volumes_list.py +8 -4
  138. waldur_api_client/api/organization_groups/organization_groups_list.py +8 -4
  139. waldur_api_client/api/payment_profiles/payment_profiles_list.py +8 -4
  140. waldur_api_client/api/payments/payments_list.py +8 -4
  141. waldur_api_client/api/project_credits/project_credits_list.py +8 -4
  142. waldur_api_client/api/project_types/project_types_list.py +8 -4
  143. waldur_api_client/api/projects/projects_list.py +8 -4
  144. waldur_api_client/api/promotions_campaigns/promotions_campaigns_list.py +8 -4
  145. waldur_api_client/api/proposal_proposals/proposal_proposals_list.py +8 -4
  146. waldur_api_client/api/proposal_protected_calls/proposal_protected_calls_list.py +8 -4
  147. waldur_api_client/api/proposal_public_calls/proposal_public_calls_list.py +8 -4
  148. waldur_api_client/api/proposal_requested_offerings/proposal_requested_offerings_list.py +8 -4
  149. waldur_api_client/api/proposal_requested_resources/proposal_requested_resources_list.py +8 -4
  150. waldur_api_client/api/proposal_reviews/proposal_reviews_list.py +8 -4
  151. waldur_api_client/api/provider_invoice_items/provider_invoice_items_list.py +8 -4
  152. waldur_api_client/api/rancher_apps/rancher_apps_list.py +8 -4
  153. waldur_api_client/api/rancher_catalogs/rancher_catalogs_list.py +8 -4
  154. waldur_api_client/api/rancher_cluster_security_groups/rancher_cluster_security_groups_list.py +8 -4
  155. waldur_api_client/api/rancher_cluster_templates/rancher_cluster_templates_list.py +8 -4
  156. waldur_api_client/api/rancher_clusters/rancher_clusters_list.py +8 -4
  157. waldur_api_client/api/rancher_hpas/rancher_hpas_list.py +8 -4
  158. waldur_api_client/api/rancher_ingresses/rancher_ingresses_list.py +8 -4
  159. waldur_api_client/api/rancher_namespaces/rancher_namespaces_list.py +8 -4
  160. waldur_api_client/api/rancher_nodes/rancher_nodes_list.py +8 -4
  161. waldur_api_client/api/rancher_projects/rancher_projects_list.py +8 -4
  162. waldur_api_client/api/rancher_role_templates/rancher_role_templates_list.py +8 -4
  163. waldur_api_client/api/rancher_services/rancher_services_list.py +8 -4
  164. waldur_api_client/api/rancher_templates/rancher_templates_list.py +8 -4
  165. waldur_api_client/api/rancher_users/rancher_users_list.py +8 -4
  166. waldur_api_client/api/rancher_workloads/rancher_workloads_list.py +8 -4
  167. waldur_api_client/api/roles/roles_list.py +8 -4
  168. waldur_api_client/api/service_settings/service_settings_list.py +18 -17
  169. waldur_api_client/api/slurm_allocation_user_usage/slurm_allocation_user_usage_list.py +8 -4
  170. waldur_api_client/api/slurm_allocations/slurm_allocations_list.py +8 -4
  171. waldur_api_client/api/slurm_associations/slurm_associations_list.py +8 -4
  172. waldur_api_client/api/slurm_jobs/slurm_jobs_list.py +8 -4
  173. waldur_api_client/api/support_attachments/support_attachments_list.py +8 -4
  174. waldur_api_client/api/support_comments/support_comments_list.py +8 -4
  175. waldur_api_client/api/support_feedbacks/support_feedbacks_list.py +8 -4
  176. waldur_api_client/api/support_issues/support_issues_list.py +8 -4
  177. waldur_api_client/api/support_priorities/support_priorities_list.py +8 -4
  178. waldur_api_client/api/support_templates/support_templates_list.py +8 -4
  179. waldur_api_client/api/support_users/support_users_list.py +8 -4
  180. waldur_api_client/api/user_agreements/user_agreements_list.py +8 -4
  181. waldur_api_client/api/user_group_invitations/user_group_invitations_list.py +8 -4
  182. waldur_api_client/api/user_invitations/user_invitations_list.py +8 -4
  183. waldur_api_client/api/user_permission_requests/user_permission_requests_list.py +8 -4
  184. waldur_api_client/api/user_permissions/user_permissions_list.py +18 -17
  185. waldur_api_client/api/users/users_list.py +23 -4
  186. waldur_api_client/api/vmware_clusters/vmware_clusters_list.py +8 -4
  187. waldur_api_client/api/vmware_datastores/vmware_datastores_list.py +8 -4
  188. waldur_api_client/api/vmware_disks/vmware_disks_list.py +8 -4
  189. waldur_api_client/api/vmware_folders/vmware_folders_list.py +8 -4
  190. waldur_api_client/api/vmware_networks/vmware_networks_list.py +8 -4
  191. waldur_api_client/api/vmware_ports/vmware_ports_list.py +8 -4
  192. waldur_api_client/api/vmware_templates/vmware_templates_list.py +8 -4
  193. waldur_api_client/api/vmware_virtual_machine/vmware_virtual_machine_list.py +8 -4
  194. waldur_api_client/models/__init__.py +26 -14
  195. waldur_api_client/models/constance_settings.py +18 -0
  196. waldur_api_client/models/constance_settings_request.py +18 -0
  197. waldur_api_client/models/customer.py +0 -21
  198. waldur_api_client/models/customers_list_field_item.py +0 -1
  199. waldur_api_client/models/customers_retrieve_field_item.py +0 -1
  200. waldur_api_client/models/event_types_enum.py +1 -0
  201. waldur_api_client/models/identity_provider.py +11 -11
  202. waldur_api_client/models/identity_provider_request.py +11 -11
  203. waldur_api_client/models/merged_plugin_options.py +27 -0
  204. waldur_api_client/models/merged_plugin_options_request.py +27 -0
  205. waldur_api_client/models/nested_requested_offering.py +18 -0
  206. waldur_api_client/models/patched_identity_provider_request.py +11 -11
  207. waldur_api_client/models/patched_rule_plans_request.py +108 -0
  208. waldur_api_client/models/{resource_backend_metadata.py → patched_rule_plans_request_attributes.py} +6 -21
  209. waldur_api_client/models/{resource_options.py → patched_rule_plans_request_limits.py} +7 -22
  210. waldur_api_client/models/patched_rule_request.py +101 -0
  211. waldur_api_client/models/provider_requested_offering.py +10 -0
  212. waldur_api_client/models/rancher_cluster.py +11 -0
  213. waldur_api_client/models/rancher_clusters_list_field_item.py +1 -0
  214. waldur_api_client/models/rancher_clusters_retrieve_field_item.py +1 -0
  215. waldur_api_client/models/requested_offering.py +10 -0
  216. waldur_api_client/models/{resource_set_limits.py → resource_response_status.py} +11 -11
  217. waldur_api_client/models/rule.py +128 -0
  218. waldur_api_client/models/rule_plans.py +126 -0
  219. waldur_api_client/models/{resource_backend_id.py → rule_plans_attributes.py} +7 -22
  220. waldur_api_client/models/rule_plans_limits.py +44 -0
  221. waldur_api_client/models/rule_plans_request.py +109 -0
  222. waldur_api_client/models/rule_plans_request_attributes.py +44 -0
  223. waldur_api_client/models/rule_plans_request_limits.py +44 -0
  224. waldur_api_client/models/rule_request.py +103 -0
  225. {waldur_api_client-0.2.0.dist-info → waldur_api_client-7.6.7.dist-info}/METADATA +1 -1
  226. {waldur_api_client-0.2.0.dist-info → waldur_api_client-7.6.7.dist-info}/RECORD +228 -208
  227. waldur_api_client/models/permission_project.py +0 -147
  228. waldur_api_client/models/resource_report.py +0 -73
  229. waldur_api_client/models/resource_set_state_erred.py +0 -68
  230. {waldur_api_client-0.2.0.dist-info → waldur_api_client-7.6.7.dist-info}/LICENSE +0 -0
  231. {waldur_api_client-0.2.0.dist-info → waldur_api_client-7.6.7.dist-info}/WHEEL +0 -0
@@ -0,0 +1,162 @@
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.patched_rule_request import PatchedRuleRequest
10
+ from ...models.rule import Rule
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ uuid: UUID,
16
+ *,
17
+ body: PatchedRuleRequest,
18
+ ) -> dict[str, Any]:
19
+ headers: dict[str, Any] = {}
20
+
21
+ _kwargs: dict[str, Any] = {
22
+ "method": "patch",
23
+ "url": f"/api/autoprovisioning-rules/{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) -> Rule:
35
+ if response.status_code == 200:
36
+ response_200 = Rule.from_dict(response.json())
37
+
38
+ return response_200
39
+ raise errors.UnexpectedStatus(response.status_code, response.content)
40
+
41
+
42
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Rule]:
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
+ uuid: UUID,
53
+ *,
54
+ client: AuthenticatedClient,
55
+ body: PatchedRuleRequest,
56
+ ) -> Response[Rule]:
57
+ """
58
+ Args:
59
+ uuid (UUID):
60
+ body (PatchedRuleRequest):
61
+
62
+ Raises:
63
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
64
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
65
+
66
+ Returns:
67
+ Response[Rule]
68
+ """
69
+
70
+ kwargs = _get_kwargs(
71
+ uuid=uuid,
72
+ body=body,
73
+ )
74
+
75
+ response = client.get_httpx_client().request(
76
+ **kwargs,
77
+ )
78
+
79
+ return _build_response(client=client, response=response)
80
+
81
+
82
+ def sync(
83
+ uuid: UUID,
84
+ *,
85
+ client: AuthenticatedClient,
86
+ body: PatchedRuleRequest,
87
+ ) -> Rule:
88
+ """
89
+ Args:
90
+ uuid (UUID):
91
+ body (PatchedRuleRequest):
92
+
93
+ Raises:
94
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
95
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
96
+
97
+ Returns:
98
+ Rule
99
+ """
100
+
101
+ return sync_detailed(
102
+ uuid=uuid,
103
+ client=client,
104
+ body=body,
105
+ ).parsed
106
+
107
+
108
+ async def asyncio_detailed(
109
+ uuid: UUID,
110
+ *,
111
+ client: AuthenticatedClient,
112
+ body: PatchedRuleRequest,
113
+ ) -> Response[Rule]:
114
+ """
115
+ Args:
116
+ uuid (UUID):
117
+ body (PatchedRuleRequest):
118
+
119
+ Raises:
120
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
121
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
122
+
123
+ Returns:
124
+ Response[Rule]
125
+ """
126
+
127
+ kwargs = _get_kwargs(
128
+ uuid=uuid,
129
+ body=body,
130
+ )
131
+
132
+ response = await client.get_async_httpx_client().request(**kwargs)
133
+
134
+ return _build_response(client=client, response=response)
135
+
136
+
137
+ async def asyncio(
138
+ uuid: UUID,
139
+ *,
140
+ client: AuthenticatedClient,
141
+ body: PatchedRuleRequest,
142
+ ) -> Rule:
143
+ """
144
+ Args:
145
+ uuid (UUID):
146
+ body (PatchedRuleRequest):
147
+
148
+ Raises:
149
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
150
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
151
+
152
+ Returns:
153
+ Rule
154
+ """
155
+
156
+ return (
157
+ await asyncio_detailed(
158
+ uuid=uuid,
159
+ client=client,
160
+ body=body,
161
+ )
162
+ ).parsed
@@ -0,0 +1,140 @@
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.rule import Rule
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/autoprovisioning-rules/{uuid}/",
19
+ }
20
+
21
+ return _kwargs
22
+
23
+
24
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Rule:
25
+ if response.status_code == 200:
26
+ response_200 = Rule.from_dict(response.json())
27
+
28
+ return response_200
29
+ raise errors.UnexpectedStatus(response.status_code, response.content)
30
+
31
+
32
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Rule]:
33
+ return Response(
34
+ status_code=HTTPStatus(response.status_code),
35
+ content=response.content,
36
+ headers=response.headers,
37
+ parsed=_parse_response(client=client, response=response),
38
+ )
39
+
40
+
41
+ def sync_detailed(
42
+ uuid: UUID,
43
+ *,
44
+ client: AuthenticatedClient,
45
+ ) -> Response[Rule]:
46
+ """
47
+ Args:
48
+ uuid (UUID):
49
+
50
+ Raises:
51
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
52
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
53
+
54
+ Returns:
55
+ Response[Rule]
56
+ """
57
+
58
+ kwargs = _get_kwargs(
59
+ uuid=uuid,
60
+ )
61
+
62
+ response = client.get_httpx_client().request(
63
+ **kwargs,
64
+ )
65
+
66
+ return _build_response(client=client, response=response)
67
+
68
+
69
+ def sync(
70
+ uuid: UUID,
71
+ *,
72
+ client: AuthenticatedClient,
73
+ ) -> Rule:
74
+ """
75
+ Args:
76
+ uuid (UUID):
77
+
78
+ Raises:
79
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
80
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
81
+
82
+ Returns:
83
+ Rule
84
+ """
85
+
86
+ return sync_detailed(
87
+ uuid=uuid,
88
+ client=client,
89
+ ).parsed
90
+
91
+
92
+ async def asyncio_detailed(
93
+ uuid: UUID,
94
+ *,
95
+ client: AuthenticatedClient,
96
+ ) -> Response[Rule]:
97
+ """
98
+ Args:
99
+ uuid (UUID):
100
+
101
+ Raises:
102
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
103
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
104
+
105
+ Returns:
106
+ Response[Rule]
107
+ """
108
+
109
+ kwargs = _get_kwargs(
110
+ uuid=uuid,
111
+ )
112
+
113
+ response = await client.get_async_httpx_client().request(**kwargs)
114
+
115
+ return _build_response(client=client, response=response)
116
+
117
+
118
+ async def asyncio(
119
+ uuid: UUID,
120
+ *,
121
+ client: AuthenticatedClient,
122
+ ) -> Rule:
123
+ """
124
+ Args:
125
+ uuid (UUID):
126
+
127
+ Raises:
128
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
129
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
130
+
131
+ Returns:
132
+ Rule
133
+ """
134
+
135
+ return (
136
+ await asyncio_detailed(
137
+ uuid=uuid,
138
+ client=client,
139
+ )
140
+ ).parsed
@@ -0,0 +1,162 @@
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.rule import Rule
10
+ from ...models.rule_request import RuleRequest
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ uuid: UUID,
16
+ *,
17
+ body: RuleRequest,
18
+ ) -> dict[str, Any]:
19
+ headers: dict[str, Any] = {}
20
+
21
+ _kwargs: dict[str, Any] = {
22
+ "method": "put",
23
+ "url": f"/api/autoprovisioning-rules/{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) -> Rule:
35
+ if response.status_code == 200:
36
+ response_200 = Rule.from_dict(response.json())
37
+
38
+ return response_200
39
+ raise errors.UnexpectedStatus(response.status_code, response.content)
40
+
41
+
42
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Rule]:
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
+ uuid: UUID,
53
+ *,
54
+ client: AuthenticatedClient,
55
+ body: RuleRequest,
56
+ ) -> Response[Rule]:
57
+ """
58
+ Args:
59
+ uuid (UUID):
60
+ body (RuleRequest):
61
+
62
+ Raises:
63
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
64
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
65
+
66
+ Returns:
67
+ Response[Rule]
68
+ """
69
+
70
+ kwargs = _get_kwargs(
71
+ uuid=uuid,
72
+ body=body,
73
+ )
74
+
75
+ response = client.get_httpx_client().request(
76
+ **kwargs,
77
+ )
78
+
79
+ return _build_response(client=client, response=response)
80
+
81
+
82
+ def sync(
83
+ uuid: UUID,
84
+ *,
85
+ client: AuthenticatedClient,
86
+ body: RuleRequest,
87
+ ) -> Rule:
88
+ """
89
+ Args:
90
+ uuid (UUID):
91
+ body (RuleRequest):
92
+
93
+ Raises:
94
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
95
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
96
+
97
+ Returns:
98
+ Rule
99
+ """
100
+
101
+ return sync_detailed(
102
+ uuid=uuid,
103
+ client=client,
104
+ body=body,
105
+ ).parsed
106
+
107
+
108
+ async def asyncio_detailed(
109
+ uuid: UUID,
110
+ *,
111
+ client: AuthenticatedClient,
112
+ body: RuleRequest,
113
+ ) -> Response[Rule]:
114
+ """
115
+ Args:
116
+ uuid (UUID):
117
+ body (RuleRequest):
118
+
119
+ Raises:
120
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
121
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
122
+
123
+ Returns:
124
+ Response[Rule]
125
+ """
126
+
127
+ kwargs = _get_kwargs(
128
+ uuid=uuid,
129
+ body=body,
130
+ )
131
+
132
+ response = await client.get_async_httpx_client().request(**kwargs)
133
+
134
+ return _build_response(client=client, response=response)
135
+
136
+
137
+ async def asyncio(
138
+ uuid: UUID,
139
+ *,
140
+ client: AuthenticatedClient,
141
+ body: RuleRequest,
142
+ ) -> Rule:
143
+ """
144
+ Args:
145
+ uuid (UUID):
146
+ body (RuleRequest):
147
+
148
+ Raises:
149
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
150
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
151
+
152
+ Returns:
153
+ Rule
154
+ """
155
+
156
+ return (
157
+ await asyncio_detailed(
158
+ uuid=uuid,
159
+ client=client,
160
+ body=body,
161
+ )
162
+ ).parsed
@@ -77,7 +77,8 @@ def sync_detailed(
77
77
  page_size: Union[Unset, int] = UNSET,
78
78
  region: Union[Unset, UUID] = UNSET,
79
79
  ) -> Response[list["AwsImage"]]:
80
- """
80
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
81
+
81
82
  Args:
82
83
  name (Union[Unset, str]):
83
84
  name_exact (Union[Unset, str]):
@@ -117,7 +118,8 @@ def sync(
117
118
  page_size: Union[Unset, int] = UNSET,
118
119
  region: Union[Unset, UUID] = UNSET,
119
120
  ) -> list["AwsImage"]:
120
- """
121
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
122
+
121
123
  Args:
122
124
  name (Union[Unset, str]):
123
125
  name_exact (Union[Unset, str]):
@@ -152,7 +154,8 @@ async def asyncio_detailed(
152
154
  page_size: Union[Unset, int] = UNSET,
153
155
  region: Union[Unset, UUID] = UNSET,
154
156
  ) -> Response[list["AwsImage"]]:
155
- """
157
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
158
+
156
159
  Args:
157
160
  name (Union[Unset, str]):
158
161
  name_exact (Union[Unset, str]):
@@ -190,7 +193,8 @@ async def asyncio(
190
193
  page_size: Union[Unset, int] = UNSET,
191
194
  region: Union[Unset, UUID] = UNSET,
192
195
  ) -> list["AwsImage"]:
193
- """
196
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
197
+
194
198
  Args:
195
199
  name (Union[Unset, str]):
196
200
  name_exact (Union[Unset, str]):
@@ -172,7 +172,8 @@ def sync_detailed(
172
172
  state: Union[Unset, list[AwsInstancesListStateItem]] = UNSET,
173
173
  uuid: Union[Unset, UUID] = UNSET,
174
174
  ) -> Response[list["AwsInstance"]]:
175
- """
175
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
176
+
176
177
  Args:
177
178
  backend_id (Union[Unset, str]):
178
179
  can_manage (Union[Unset, bool]):
@@ -260,7 +261,8 @@ def sync(
260
261
  state: Union[Unset, list[AwsInstancesListStateItem]] = UNSET,
261
262
  uuid: Union[Unset, UUID] = UNSET,
262
263
  ) -> list["AwsInstance"]:
263
- """
264
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
265
+
264
266
  Args:
265
267
  backend_id (Union[Unset, str]):
266
268
  can_manage (Union[Unset, bool]):
@@ -343,7 +345,8 @@ async def asyncio_detailed(
343
345
  state: Union[Unset, list[AwsInstancesListStateItem]] = UNSET,
344
346
  uuid: Union[Unset, UUID] = UNSET,
345
347
  ) -> Response[list["AwsInstance"]]:
346
- """
348
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
349
+
347
350
  Args:
348
351
  backend_id (Union[Unset, str]):
349
352
  can_manage (Union[Unset, bool]):
@@ -429,7 +432,8 @@ async def asyncio(
429
432
  state: Union[Unset, list[AwsInstancesListStateItem]] = UNSET,
430
433
  uuid: Union[Unset, UUID] = UNSET,
431
434
  ) -> list["AwsInstance"]:
432
- """
435
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
436
+
433
437
  Args:
434
438
  backend_id (Union[Unset, str]):
435
439
  can_manage (Union[Unset, bool]):
@@ -69,7 +69,8 @@ def sync_detailed(
69
69
  page: Union[Unset, int] = UNSET,
70
70
  page_size: Union[Unset, int] = UNSET,
71
71
  ) -> Response[list["AwsRegion"]]:
72
- """
72
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
73
+
73
74
  Args:
74
75
  name (Union[Unset, str]):
75
76
  name_exact (Union[Unset, str]):
@@ -106,7 +107,8 @@ def sync(
106
107
  page: Union[Unset, int] = UNSET,
107
108
  page_size: Union[Unset, int] = UNSET,
108
109
  ) -> list["AwsRegion"]:
109
- """
110
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
111
+
110
112
  Args:
111
113
  name (Union[Unset, str]):
112
114
  name_exact (Union[Unset, str]):
@@ -138,7 +140,8 @@ async def asyncio_detailed(
138
140
  page: Union[Unset, int] = UNSET,
139
141
  page_size: Union[Unset, int] = UNSET,
140
142
  ) -> Response[list["AwsRegion"]]:
141
- """
143
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
144
+
142
145
  Args:
143
146
  name (Union[Unset, str]):
144
147
  name_exact (Union[Unset, str]):
@@ -173,7 +176,8 @@ async def asyncio(
173
176
  page: Union[Unset, int] = UNSET,
174
177
  page_size: Union[Unset, int] = UNSET,
175
178
  ) -> list["AwsRegion"]:
176
- """
179
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
180
+
177
181
  Args:
178
182
  name (Union[Unset, str]):
179
183
  name_exact (Union[Unset, str]):
@@ -77,7 +77,8 @@ def sync_detailed(
77
77
  page_size: Union[Unset, int] = UNSET,
78
78
  region: Union[Unset, UUID] = UNSET,
79
79
  ) -> Response[list["AwsSize"]]:
80
- """
80
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
81
+
81
82
  Args:
82
83
  name (Union[Unset, str]):
83
84
  name_exact (Union[Unset, str]):
@@ -117,7 +118,8 @@ def sync(
117
118
  page_size: Union[Unset, int] = UNSET,
118
119
  region: Union[Unset, UUID] = UNSET,
119
120
  ) -> list["AwsSize"]:
120
- """
121
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
122
+
121
123
  Args:
122
124
  name (Union[Unset, str]):
123
125
  name_exact (Union[Unset, str]):
@@ -152,7 +154,8 @@ async def asyncio_detailed(
152
154
  page_size: Union[Unset, int] = UNSET,
153
155
  region: Union[Unset, UUID] = UNSET,
154
156
  ) -> Response[list["AwsSize"]]:
155
- """
157
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
158
+
156
159
  Args:
157
160
  name (Union[Unset, str]):
158
161
  name_exact (Union[Unset, str]):
@@ -190,7 +193,8 @@ async def asyncio(
190
193
  page_size: Union[Unset, int] = UNSET,
191
194
  region: Union[Unset, UUID] = UNSET,
192
195
  ) -> list["AwsSize"]:
193
- """
196
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
197
+
194
198
  Args:
195
199
  name (Union[Unset, str]):
196
200
  name_exact (Union[Unset, str]):
@@ -73,7 +73,8 @@ def sync_detailed(
73
73
  page: Union[Unset, int] = UNSET,
74
74
  page_size: Union[Unset, int] = UNSET,
75
75
  ) -> Response[list["AwsVolume"]]:
76
- """
76
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
77
+
77
78
  Args:
78
79
  field (Union[Unset, list[AwsVolumesListFieldItem]]):
79
80
  page (Union[Unset, int]):
@@ -107,7 +108,8 @@ def sync(
107
108
  page: Union[Unset, int] = UNSET,
108
109
  page_size: Union[Unset, int] = UNSET,
109
110
  ) -> list["AwsVolume"]:
110
- """
111
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
112
+
111
113
  Args:
112
114
  field (Union[Unset, list[AwsVolumesListFieldItem]]):
113
115
  page (Union[Unset, int]):
@@ -136,7 +138,8 @@ async def asyncio_detailed(
136
138
  page: Union[Unset, int] = UNSET,
137
139
  page_size: Union[Unset, int] = UNSET,
138
140
  ) -> Response[list["AwsVolume"]]:
139
- """
141
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
142
+
140
143
  Args:
141
144
  field (Union[Unset, list[AwsVolumesListFieldItem]]):
142
145
  page (Union[Unset, int]):
@@ -168,7 +171,8 @@ async def asyncio(
168
171
  page: Union[Unset, int] = UNSET,
169
172
  page_size: Union[Unset, int] = UNSET,
170
173
  ) -> list["AwsVolume"]:
171
- """
174
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
175
+
172
176
  Args:
173
177
  field (Union[Unset, list[AwsVolumesListFieldItem]]):
174
178
  page (Union[Unset, int]):
@@ -92,7 +92,8 @@ def sync_detailed(
92
92
  settings: Union[Unset, str] = UNSET,
93
93
  settings_uuid: Union[Unset, UUID] = UNSET,
94
94
  ) -> Response[list["AzureImage"]]:
95
- """
95
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
96
+
96
97
  Args:
97
98
  location (Union[Unset, str]):
98
99
  location_uuid (Union[Unset, UUID]):
@@ -141,7 +142,8 @@ def sync(
141
142
  settings: Union[Unset, str] = UNSET,
142
143
  settings_uuid: Union[Unset, UUID] = UNSET,
143
144
  ) -> list["AzureImage"]:
144
- """
145
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
146
+
145
147
  Args:
146
148
  location (Union[Unset, str]):
147
149
  location_uuid (Union[Unset, UUID]):
@@ -185,7 +187,8 @@ async def asyncio_detailed(
185
187
  settings: Union[Unset, str] = UNSET,
186
188
  settings_uuid: Union[Unset, UUID] = UNSET,
187
189
  ) -> Response[list["AzureImage"]]:
188
- """
190
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
191
+
189
192
  Args:
190
193
  location (Union[Unset, str]):
191
194
  location_uuid (Union[Unset, UUID]):
@@ -232,7 +235,8 @@ async def asyncio(
232
235
  settings: Union[Unset, str] = UNSET,
233
236
  settings_uuid: Union[Unset, UUID] = UNSET,
234
237
  ) -> list["AzureImage"]:
235
- """
238
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
239
+
236
240
  Args:
237
241
  location (Union[Unset, str]):
238
242
  location_uuid (Union[Unset, UUID]):