waldur-api-client 7.8.4__py3-none-any.whl → 7.8.5__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.
- waldur_api_client/api/backend_resources/backend_resources_import_resource.py +3 -3
- waldur_api_client/api/booking_resources/booking_resources_count.py +90 -0
- waldur_api_client/api/booking_resources/booking_resources_list.py +90 -0
- waldur_api_client/api/call_managing_organisations/call_managing_organisations_add_user.py +17 -10
- waldur_api_client/api/customers/customers_add_user.py +17 -10
- waldur_api_client/api/marketplace_component_usages/marketplace_component_usages_count.py +30 -0
- waldur_api_client/api/marketplace_component_usages/marketplace_component_usages_list.py +30 -0
- waldur_api_client/api/marketplace_customer_component_usage_policies/__init__.py +1 -0
- waldur_api_client/api/marketplace_customer_component_usage_policies/marketplace_customer_component_usage_policies_actions_count.py +125 -0
- waldur_api_client/api/marketplace_customer_component_usage_policies/marketplace_customer_component_usage_policies_actions_retrieve.py +119 -0
- waldur_api_client/api/marketplace_customer_component_usage_policies/marketplace_customer_component_usage_policies_count.py +239 -0
- waldur_api_client/api/marketplace_customer_component_usage_policies/marketplace_customer_component_usage_policies_create.py +152 -0
- waldur_api_client/api/marketplace_customer_component_usage_policies/marketplace_customer_component_usage_policies_destroy.py +89 -0
- waldur_api_client/api/marketplace_customer_component_usage_policies/marketplace_customer_component_usage_policies_list.py +242 -0
- waldur_api_client/api/marketplace_customer_component_usage_policies/marketplace_customer_component_usage_policies_partial_update.py +166 -0
- waldur_api_client/api/marketplace_customer_component_usage_policies/marketplace_customer_component_usage_policies_retrieve.py +144 -0
- waldur_api_client/api/marketplace_customer_component_usage_policies/marketplace_customer_component_usage_policies_update.py +166 -0
- waldur_api_client/api/marketplace_orders/marketplace_orders_set_backend_id.py +105 -0
- waldur_api_client/api/marketplace_plans/marketplace_plans_update_discounts.py +123 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_add_partition.py +168 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_add_software_catalog.py +168 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_add_user.py +19 -10
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_component_stats_list.py +15 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_costs_list.py +15 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_count.py +15 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_create_offering_component.py +1 -1
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_customers_list.py +15 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_groups_count.py +15 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_groups_list.py +15 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_list.py +15 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_remove_partition.py +107 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_remove_software_catalog.py +107 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_partition_partial_update.py +168 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_software_catalog_partial_update.py +168 -0
- waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_count.py +90 -0
- waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_list.py +90 -0
- waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_set_downscaled.py +107 -0
- waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_set_paused.py +107 -0
- waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_set_restrict_member_access.py +107 -0
- waldur_api_client/api/marketplace_public_offerings/marketplace_public_offerings_count.py +15 -0
- waldur_api_client/api/marketplace_public_offerings/marketplace_public_offerings_list.py +15 -0
- waldur_api_client/api/marketplace_resources/marketplace_resources_count.py +90 -0
- waldur_api_client/api/marketplace_resources/marketplace_resources_list.py +90 -0
- waldur_api_client/api/marketplace_resources/marketplace_resources_set_downscaled.py +107 -0
- waldur_api_client/api/marketplace_resources/marketplace_resources_set_paused.py +107 -0
- waldur_api_client/api/marketplace_resources/marketplace_resources_set_restrict_member_access.py +107 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_add_user.py +17 -10
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_customer_projects_list.py +15 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_offerings_list.py +15 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_projects_list.py +14 -24
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_set_offerings_username.py +8 -67
- waldur_api_client/api/marketplace_site_agent_identities/__init__.py +1 -0
- waldur_api_client/api/marketplace_site_agent_identities/marketplace_site_agent_identities_count.py +240 -0
- waldur_api_client/api/marketplace_site_agent_identities/marketplace_site_agent_identities_create.py +148 -0
- waldur_api_client/api/marketplace_site_agent_identities/marketplace_site_agent_identities_destroy.py +89 -0
- waldur_api_client/api/marketplace_site_agent_identities/marketplace_site_agent_identities_list.py +241 -0
- waldur_api_client/api/marketplace_site_agent_identities/marketplace_site_agent_identities_register_event_subscription.py +176 -0
- waldur_api_client/api/marketplace_site_agent_identities/marketplace_site_agent_identities_register_service.py +170 -0
- waldur_api_client/api/marketplace_site_agent_identities/marketplace_site_agent_identities_retrieve.py +140 -0
- waldur_api_client/api/marketplace_site_agent_identities/marketplace_site_agent_identities_update.py +162 -0
- waldur_api_client/api/marketplace_site_agent_processors/__init__.py +1 -0
- waldur_api_client/api/marketplace_site_agent_processors/marketplace_site_agent_processors_count.py +240 -0
- waldur_api_client/api/marketplace_site_agent_processors/marketplace_site_agent_processors_list.py +241 -0
- waldur_api_client/api/marketplace_site_agent_processors/marketplace_site_agent_processors_retrieve.py +142 -0
- waldur_api_client/api/marketplace_site_agent_services/__init__.py +1 -0
- waldur_api_client/api/marketplace_site_agent_services/marketplace_site_agent_services_count.py +229 -0
- waldur_api_client/api/marketplace_site_agent_services/marketplace_site_agent_services_list.py +230 -0
- waldur_api_client/api/marketplace_site_agent_services/marketplace_site_agent_services_register_processor.py +172 -0
- waldur_api_client/api/marketplace_site_agent_services/marketplace_site_agent_services_retrieve.py +140 -0
- waldur_api_client/api/marketplace_site_agent_services/marketplace_site_agent_services_set_statistics.py +166 -0
- waldur_api_client/api/marketplace_software_catalogs/__init__.py +1 -0
- waldur_api_client/api/marketplace_software_catalogs/marketplace_software_catalogs_count.py +225 -0
- waldur_api_client/api/marketplace_software_catalogs/marketplace_software_catalogs_create.py +150 -0
- waldur_api_client/api/marketplace_software_catalogs/marketplace_software_catalogs_destroy.py +89 -0
- waldur_api_client/api/marketplace_software_catalogs/marketplace_software_catalogs_list.py +226 -0
- waldur_api_client/api/marketplace_software_catalogs/marketplace_software_catalogs_partial_update.py +164 -0
- waldur_api_client/api/marketplace_software_catalogs/marketplace_software_catalogs_retrieve.py +142 -0
- waldur_api_client/api/marketplace_software_catalogs/marketplace_software_catalogs_update.py +164 -0
- waldur_api_client/api/marketplace_software_packages/__init__.py +1 -0
- waldur_api_client/api/marketplace_software_packages/marketplace_software_packages_count.py +352 -0
- waldur_api_client/api/marketplace_software_packages/marketplace_software_packages_create.py +150 -0
- waldur_api_client/api/marketplace_software_packages/marketplace_software_packages_destroy.py +89 -0
- waldur_api_client/api/marketplace_software_packages/marketplace_software_packages_list.py +353 -0
- waldur_api_client/api/marketplace_software_packages/marketplace_software_packages_partial_update.py +164 -0
- waldur_api_client/api/marketplace_software_packages/marketplace_software_packages_retrieve.py +142 -0
- waldur_api_client/api/marketplace_software_packages/marketplace_software_packages_update.py +164 -0
- waldur_api_client/api/marketplace_software_targets/__init__.py +1 -0
- waldur_api_client/api/marketplace_software_targets/marketplace_software_targets_count.py +313 -0
- waldur_api_client/api/marketplace_software_targets/marketplace_software_targets_create.py +117 -0
- waldur_api_client/api/marketplace_software_targets/marketplace_software_targets_destroy.py +89 -0
- waldur_api_client/api/marketplace_software_targets/marketplace_software_targets_list.py +314 -0
- waldur_api_client/api/marketplace_software_targets/marketplace_software_targets_partial_update.py +142 -0
- waldur_api_client/api/marketplace_software_targets/marketplace_software_targets_retrieve.py +142 -0
- waldur_api_client/api/marketplace_software_targets/marketplace_software_targets_update.py +142 -0
- waldur_api_client/api/marketplace_software_versions/__init__.py +1 -0
- waldur_api_client/api/marketplace_software_versions/marketplace_software_versions_count.py +310 -0
- waldur_api_client/api/marketplace_software_versions/marketplace_software_versions_create.py +117 -0
- waldur_api_client/api/marketplace_software_versions/marketplace_software_versions_destroy.py +89 -0
- waldur_api_client/api/marketplace_software_versions/marketplace_software_versions_list.py +311 -0
- waldur_api_client/api/marketplace_software_versions/marketplace_software_versions_partial_update.py +142 -0
- waldur_api_client/api/marketplace_software_versions/marketplace_software_versions_retrieve.py +142 -0
- waldur_api_client/api/marketplace_software_versions/marketplace_software_versions_update.py +142 -0
- waldur_api_client/api/onboarding_justifications/onboarding_justifications_approve.py +168 -0
- waldur_api_client/api/onboarding_justifications/onboarding_justifications_reject.py +168 -0
- waldur_api_client/api/projects/projects_add_user.py +17 -10
- waldur_api_client/api/projects/projects_count.py +30 -0
- waldur_api_client/api/projects/projects_list.py +30 -0
- waldur_api_client/api/projects/projects_move_project.py +19 -10
- waldur_api_client/api/projects/projects_recover.py +166 -0
- waldur_api_client/api/proposal_proposals/proposal_proposals_add_user.py +17 -10
- waldur_api_client/api/proposal_protected_calls/proposal_protected_calls_add_user.py +17 -10
- waldur_api_client/api/remote_waldur_api/remote_waldur_api_pull_resource_robot_accounts.py +88 -0
- waldur_api_client/models/__init__.py +152 -4
- waldur_api_client/models/agent_event_subscription_create_request.py +71 -0
- waldur_api_client/models/agent_identity.py +211 -0
- waldur_api_client/models/agent_identity_request.py +157 -0
- waldur_api_client/models/agent_processor.py +170 -0
- waldur_api_client/models/agent_processor_create_request.py +89 -0
- waldur_api_client/models/agent_service.py +172 -0
- waldur_api_client/models/agent_service_create_request.py +81 -0
- waldur_api_client/models/agent_service_state.py +10 -0
- waldur_api_client/models/agent_service_statistics_request.py +59 -0
- waldur_api_client/models/base_provider_plan.py +21 -0
- waldur_api_client/models/base_public_plan.py +21 -0
- waldur_api_client/models/booking_offerings_list_field_item.py +2 -0
- waldur_api_client/models/booking_offerings_retrieve_field_item.py +2 -0
- waldur_api_client/models/booking_resource.py +33 -0
- waldur_api_client/models/booking_resource_renewal_date_type_0.py +53 -0
- waldur_api_client/models/booking_resources_list_field_item.py +1 -0
- waldur_api_client/models/booking_resources_retrieve_field_item.py +1 -0
- waldur_api_client/models/call_managing_organisations_add_user_response_400.py +65 -0
- waldur_api_client/models/constance_settings.py +81 -45
- waldur_api_client/models/constance_settings_request.py +81 -45
- waldur_api_client/models/constance_settings_request_form.py +81 -45
- waldur_api_client/models/constance_settings_request_multipart.py +134 -71
- waldur_api_client/models/customer_component_usage_policy.py +175 -0
- waldur_api_client/models/customer_component_usage_policy_request.py +102 -0
- waldur_api_client/models/customers_add_user_response_400.py +65 -0
- waldur_api_client/models/discount_config_request.py +91 -0
- waldur_api_client/models/discounts_update_request.py +65 -0
- waldur_api_client/models/discounts_update_request_discounts.py +57 -0
- waldur_api_client/models/issue.py +0 -25
- waldur_api_client/models/managed_rancher_cluster_resources_list_field_item.py +1 -0
- waldur_api_client/models/managed_rancher_cluster_resources_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_orders_count_state_item.py +1 -0
- waldur_api_client/models/marketplace_orders_list_field_item.py +2 -0
- waldur_api_client/models/marketplace_orders_list_state_item.py +1 -0
- waldur_api_client/models/marketplace_orders_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_provider_offerings_add_user_response_400.py +65 -0
- waldur_api_client/models/marketplace_provider_offerings_list_course_accounts_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_provider_offerings_list_customer_service_accounts_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_provider_offerings_list_field_item.py +2 -0
- waldur_api_client/models/marketplace_provider_offerings_list_project_service_accounts_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_provider_offerings_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_provider_offerings_stats_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_provider_offerings_user_has_resource_access_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_provider_resources_details_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_resources_list_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_public_offerings_list_field_item.py +2 -0
- waldur_api_client/models/marketplace_public_offerings_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_resources_details_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_resources_list_field_item.py +1 -0
- waldur_api_client/models/marketplace_resources_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_service_providers_add_user_response_400.py +65 -0
- waldur_api_client/models/marketplace_site_agent_services_count_state_item.py +10 -0
- waldur_api_client/models/marketplace_site_agent_services_list_state_item.py +10 -0
- waldur_api_client/models/marketplace_software_catalogs_count_o_item.py +15 -0
- waldur_api_client/models/marketplace_software_catalogs_list_o_item.py +15 -0
- waldur_api_client/models/marketplace_software_packages_count_o_item.py +17 -0
- waldur_api_client/models/marketplace_software_packages_list_o_item.py +17 -0
- waldur_api_client/models/marketplace_software_targets_count_o_item.py +15 -0
- waldur_api_client/models/marketplace_software_targets_list_o_item.py +15 -0
- waldur_api_client/models/marketplace_software_versions_count_o_item.py +15 -0
- waldur_api_client/models/marketplace_software_versions_list_o_item.py +15 -0
- waldur_api_client/models/merged_plugin_options.py +47 -8
- waldur_api_client/models/merged_plugin_options_request.py +47 -8
- waldur_api_client/models/nested_agent_processor.py +154 -0
- waldur_api_client/models/nested_agent_service.py +134 -0
- waldur_api_client/models/nested_agent_service_request.py +90 -0
- waldur_api_client/models/nested_customer_usage_policy_component.py +103 -0
- waldur_api_client/models/nested_customer_usage_policy_component_request.py +87 -0
- waldur_api_client/models/nested_partition.py +412 -0
- waldur_api_client/models/nested_partition_request.py +397 -0
- waldur_api_client/models/nested_plan_component.py +155 -0
- waldur_api_client/models/nested_plan_component_request.py +128 -0
- waldur_api_client/models/nested_software_catalog.py +134 -0
- waldur_api_client/models/nested_software_catalog_catalog.py +86 -0
- waldur_api_client/models/nested_software_catalog_partition.py +86 -0
- waldur_api_client/models/nested_software_catalog_request.py +68 -0
- waldur_api_client/models/nested_software_target.py +84 -0
- waldur_api_client/models/nested_software_target_request.py +75 -0
- waldur_api_client/models/nested_software_version.py +124 -0
- waldur_api_client/models/nested_software_version_request.py +93 -0
- waldur_api_client/models/observable_object_type_enum.py +14 -0
- waldur_api_client/models/offering.py +42 -0
- waldur_api_client/models/offering_create.py +36 -0
- waldur_api_client/models/offering_partition.py +440 -0
- waldur_api_client/models/offering_partition_request.py +406 -0
- waldur_api_client/models/offering_software_catalog.py +176 -0
- waldur_api_client/models/offering_software_catalog_request.py +118 -0
- waldur_api_client/models/onboarding_justification.py +35 -6
- waldur_api_client/models/onboarding_justification_create_request.py +8 -5
- waldur_api_client/models/onboarding_justification_request.py +20 -6
- waldur_api_client/models/onboarding_justification_review_request.py +59 -0
- waldur_api_client/models/order_backend_id_request.py +59 -0
- waldur_api_client/models/order_details.py +39 -0
- waldur_api_client/models/order_state.py +1 -0
- waldur_api_client/models/patched_customer_component_usage_policy_request.py +104 -0
- waldur_api_client/models/patched_offering_partition_request.py +412 -0
- waldur_api_client/models/patched_offering_software_catalog_update_request.py +131 -0
- waldur_api_client/models/patched_onboarding_justification_request.py +16 -5
- waldur_api_client/models/patched_project_request.py +9 -0
- waldur_api_client/models/patched_project_request_form.py +9 -0
- waldur_api_client/models/patched_project_request_multipart.py +12 -0
- waldur_api_client/models/patched_software_catalog_request.py +86 -0
- waldur_api_client/models/patched_software_package_request.py +86 -0
- waldur_api_client/models/plan_component.py +40 -0
- waldur_api_client/models/project.py +27 -0
- waldur_api_client/models/project_recovery_request.py +70 -0
- waldur_api_client/models/project_request.py +9 -0
- waldur_api_client/models/project_request_form.py +9 -0
- waldur_api_client/models/project_request_multipart.py +12 -0
- waldur_api_client/models/project_user.py +21 -4
- waldur_api_client/models/projects_add_user_response_400.py +65 -0
- waldur_api_client/models/projects_list_field_item.py +3 -0
- waldur_api_client/models/projects_move_project_response_400.py +65 -0
- waldur_api_client/models/projects_retrieve_field_item.py +3 -0
- waldur_api_client/models/proposal_proposals_add_user_response_400.py +65 -0
- waldur_api_client/models/proposal_protected_calls_add_user_response_400.py +65 -0
- waldur_api_client/models/provider_offering_details.py +42 -0
- waldur_api_client/models/provider_plan_details.py +18 -0
- waldur_api_client/models/public_offering_details.py +42 -0
- waldur_api_client/models/remote_resource_order_remote_state_enum.py +1 -0
- waldur_api_client/models/{set_offerings_username.py → remove_partition_request.py} +11 -19
- waldur_api_client/models/remove_software_catalog_request.py +60 -0
- waldur_api_client/models/resource.py +33 -0
- waldur_api_client/models/resource_downscaled_request.py +59 -0
- waldur_api_client/models/resource_paused_request.py +59 -0
- waldur_api_client/models/resource_renewal_date_type_0.py +53 -0
- waldur_api_client/models/resource_restrict_member_access_request.py +59 -0
- waldur_api_client/models/software_catalog.py +130 -0
- waldur_api_client/models/software_catalog_request.py +87 -0
- waldur_api_client/models/software_catalog_uuid.py +60 -0
- waldur_api_client/models/software_package.py +168 -0
- waldur_api_client/models/software_package_request.py +87 -0
- waldur_api_client/models/software_target.py +110 -0
- waldur_api_client/models/software_version.py +135 -0
- waldur_api_client/models/user.py +20 -0
- waldur_api_client/models/users_list_field_item.py +1 -0
- waldur_api_client/models/users_me_retrieve_field_item.py +1 -0
- waldur_api_client/models/users_retrieve_field_item.py +1 -0
- {waldur_api_client-7.8.4.dist-info → waldur_api_client-7.8.5.dist-info}/METADATA +1 -1
- {waldur_api_client-7.8.4.dist-info → waldur_api_client-7.8.5.dist-info}/RECORD +256 -103
- waldur_api_client/models/marketplace_service_providers_projects_list_field_item.py +0 -37
- {waldur_api_client-7.8.4.dist-info → waldur_api_client-7.8.5.dist-info}/WHEEL +0 -0
- {waldur_api_client-7.8.4.dist-info → waldur_api_client-7.8.5.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
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.order_backend_id_request import OrderBackendIDRequest
|
|
10
|
+
from ...types import Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
uuid: UUID,
|
|
15
|
+
*,
|
|
16
|
+
body: OrderBackendIDRequest,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
headers: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
_kwargs: dict[str, Any] = {
|
|
21
|
+
"method": "post",
|
|
22
|
+
"url": f"/api/marketplace-orders/{uuid}/set_backend_id/",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_kwargs["json"] = body.to_dict()
|
|
26
|
+
|
|
27
|
+
headers["Content-Type"] = "application/json"
|
|
28
|
+
|
|
29
|
+
_kwargs["headers"] = headers
|
|
30
|
+
return _kwargs
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Any:
|
|
34
|
+
if response.status_code == 200:
|
|
35
|
+
return None
|
|
36
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
40
|
+
return Response(
|
|
41
|
+
status_code=HTTPStatus(response.status_code),
|
|
42
|
+
content=response.content,
|
|
43
|
+
headers=response.headers,
|
|
44
|
+
parsed=_parse_response(client=client, response=response),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def sync_detailed(
|
|
49
|
+
uuid: UUID,
|
|
50
|
+
*,
|
|
51
|
+
client: AuthenticatedClient,
|
|
52
|
+
body: OrderBackendIDRequest,
|
|
53
|
+
) -> Response[Any]:
|
|
54
|
+
"""
|
|
55
|
+
Args:
|
|
56
|
+
uuid (UUID):
|
|
57
|
+
body (OrderBackendIDRequest):
|
|
58
|
+
|
|
59
|
+
Raises:
|
|
60
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
61
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
62
|
+
|
|
63
|
+
Returns:
|
|
64
|
+
Response[Any]
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
kwargs = _get_kwargs(
|
|
68
|
+
uuid=uuid,
|
|
69
|
+
body=body,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
response = client.get_httpx_client().request(
|
|
73
|
+
**kwargs,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
return _build_response(client=client, response=response)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
async def asyncio_detailed(
|
|
80
|
+
uuid: UUID,
|
|
81
|
+
*,
|
|
82
|
+
client: AuthenticatedClient,
|
|
83
|
+
body: OrderBackendIDRequest,
|
|
84
|
+
) -> Response[Any]:
|
|
85
|
+
"""
|
|
86
|
+
Args:
|
|
87
|
+
uuid (UUID):
|
|
88
|
+
body (OrderBackendIDRequest):
|
|
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
|
+
Response[Any]
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
kwargs = _get_kwargs(
|
|
99
|
+
uuid=uuid,
|
|
100
|
+
body=body,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
104
|
+
|
|
105
|
+
return _build_response(client=client, response=response)
|
|
@@ -0,0 +1,123 @@
|
|
|
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.discounts_update_request import DiscountsUpdateRequest
|
|
10
|
+
from ...types import Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
uuid: UUID,
|
|
15
|
+
*,
|
|
16
|
+
body: DiscountsUpdateRequest,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
headers: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
_kwargs: dict[str, Any] = {
|
|
21
|
+
"method": "post",
|
|
22
|
+
"url": f"/api/marketplace-plans/{uuid}/update_discounts/",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_kwargs["json"] = body.to_dict()
|
|
26
|
+
|
|
27
|
+
headers["Content-Type"] = "application/json"
|
|
28
|
+
|
|
29
|
+
_kwargs["headers"] = headers
|
|
30
|
+
return _kwargs
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Any:
|
|
34
|
+
if response.status_code == 200:
|
|
35
|
+
return None
|
|
36
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
40
|
+
return Response(
|
|
41
|
+
status_code=HTTPStatus(response.status_code),
|
|
42
|
+
content=response.content,
|
|
43
|
+
headers=response.headers,
|
|
44
|
+
parsed=_parse_response(client=client, response=response),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def sync_detailed(
|
|
49
|
+
uuid: UUID,
|
|
50
|
+
*,
|
|
51
|
+
client: AuthenticatedClient,
|
|
52
|
+
body: DiscountsUpdateRequest,
|
|
53
|
+
) -> Response[Any]:
|
|
54
|
+
"""Update volume discount configuration for plan components.
|
|
55
|
+
|
|
56
|
+
This endpoint allows updating discount thresholds and rates for multiple
|
|
57
|
+
plan components in a single request. Discounts are applied automatically
|
|
58
|
+
when limit quantities meet or exceed the threshold.
|
|
59
|
+
|
|
60
|
+
The discount configuration affects future billing:
|
|
61
|
+
- Creates separate invoice items showing the discount
|
|
62
|
+
- Can be enabled or disabled per component
|
|
63
|
+
|
|
64
|
+
Args:
|
|
65
|
+
uuid (UUID):
|
|
66
|
+
body (DiscountsUpdateRequest):
|
|
67
|
+
|
|
68
|
+
Raises:
|
|
69
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
70
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
71
|
+
|
|
72
|
+
Returns:
|
|
73
|
+
Response[Any]
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
kwargs = _get_kwargs(
|
|
77
|
+
uuid=uuid,
|
|
78
|
+
body=body,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
response = client.get_httpx_client().request(
|
|
82
|
+
**kwargs,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
return _build_response(client=client, response=response)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
async def asyncio_detailed(
|
|
89
|
+
uuid: UUID,
|
|
90
|
+
*,
|
|
91
|
+
client: AuthenticatedClient,
|
|
92
|
+
body: DiscountsUpdateRequest,
|
|
93
|
+
) -> Response[Any]:
|
|
94
|
+
"""Update volume discount configuration for plan components.
|
|
95
|
+
|
|
96
|
+
This endpoint allows updating discount thresholds and rates for multiple
|
|
97
|
+
plan components in a single request. Discounts are applied automatically
|
|
98
|
+
when limit quantities meet or exceed the threshold.
|
|
99
|
+
|
|
100
|
+
The discount configuration affects future billing:
|
|
101
|
+
- Creates separate invoice items showing the discount
|
|
102
|
+
- Can be enabled or disabled per component
|
|
103
|
+
|
|
104
|
+
Args:
|
|
105
|
+
uuid (UUID):
|
|
106
|
+
body (DiscountsUpdateRequest):
|
|
107
|
+
|
|
108
|
+
Raises:
|
|
109
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
110
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
111
|
+
|
|
112
|
+
Returns:
|
|
113
|
+
Response[Any]
|
|
114
|
+
"""
|
|
115
|
+
|
|
116
|
+
kwargs = _get_kwargs(
|
|
117
|
+
uuid=uuid,
|
|
118
|
+
body=body,
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
122
|
+
|
|
123
|
+
return _build_response(client=client, response=response)
|
waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_add_partition.py
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
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.offering_partition import OfferingPartition
|
|
10
|
+
from ...models.offering_partition_request import OfferingPartitionRequest
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
uuid: UUID,
|
|
16
|
+
*,
|
|
17
|
+
body: OfferingPartitionRequest,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
headers: dict[str, Any] = {}
|
|
20
|
+
|
|
21
|
+
_kwargs: dict[str, Any] = {
|
|
22
|
+
"method": "post",
|
|
23
|
+
"url": f"/api/marketplace-provider-offerings/{uuid}/add_partition/",
|
|
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) -> OfferingPartition:
|
|
35
|
+
if response.status_code == 201:
|
|
36
|
+
response_201 = OfferingPartition.from_dict(response.json())
|
|
37
|
+
|
|
38
|
+
return response_201
|
|
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[OfferingPartition]:
|
|
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: OfferingPartitionRequest,
|
|
58
|
+
) -> Response[OfferingPartition]:
|
|
59
|
+
"""Add SLURM partition configuration to offering.
|
|
60
|
+
|
|
61
|
+
Args:
|
|
62
|
+
uuid (UUID):
|
|
63
|
+
body (OfferingPartitionRequest):
|
|
64
|
+
|
|
65
|
+
Raises:
|
|
66
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
67
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
68
|
+
|
|
69
|
+
Returns:
|
|
70
|
+
Response[OfferingPartition]
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
kwargs = _get_kwargs(
|
|
74
|
+
uuid=uuid,
|
|
75
|
+
body=body,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
response = client.get_httpx_client().request(
|
|
79
|
+
**kwargs,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
return _build_response(client=client, response=response)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def sync(
|
|
86
|
+
uuid: UUID,
|
|
87
|
+
*,
|
|
88
|
+
client: AuthenticatedClient,
|
|
89
|
+
body: OfferingPartitionRequest,
|
|
90
|
+
) -> OfferingPartition:
|
|
91
|
+
"""Add SLURM partition configuration to offering.
|
|
92
|
+
|
|
93
|
+
Args:
|
|
94
|
+
uuid (UUID):
|
|
95
|
+
body (OfferingPartitionRequest):
|
|
96
|
+
|
|
97
|
+
Raises:
|
|
98
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
99
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
OfferingPartition
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
return sync_detailed(
|
|
106
|
+
uuid=uuid,
|
|
107
|
+
client=client,
|
|
108
|
+
body=body,
|
|
109
|
+
).parsed
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
async def asyncio_detailed(
|
|
113
|
+
uuid: UUID,
|
|
114
|
+
*,
|
|
115
|
+
client: AuthenticatedClient,
|
|
116
|
+
body: OfferingPartitionRequest,
|
|
117
|
+
) -> Response[OfferingPartition]:
|
|
118
|
+
"""Add SLURM partition configuration to offering.
|
|
119
|
+
|
|
120
|
+
Args:
|
|
121
|
+
uuid (UUID):
|
|
122
|
+
body (OfferingPartitionRequest):
|
|
123
|
+
|
|
124
|
+
Raises:
|
|
125
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
126
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
127
|
+
|
|
128
|
+
Returns:
|
|
129
|
+
Response[OfferingPartition]
|
|
130
|
+
"""
|
|
131
|
+
|
|
132
|
+
kwargs = _get_kwargs(
|
|
133
|
+
uuid=uuid,
|
|
134
|
+
body=body,
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
138
|
+
|
|
139
|
+
return _build_response(client=client, response=response)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
async def asyncio(
|
|
143
|
+
uuid: UUID,
|
|
144
|
+
*,
|
|
145
|
+
client: AuthenticatedClient,
|
|
146
|
+
body: OfferingPartitionRequest,
|
|
147
|
+
) -> OfferingPartition:
|
|
148
|
+
"""Add SLURM partition configuration to offering.
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
uuid (UUID):
|
|
152
|
+
body (OfferingPartitionRequest):
|
|
153
|
+
|
|
154
|
+
Raises:
|
|
155
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
156
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
157
|
+
|
|
158
|
+
Returns:
|
|
159
|
+
OfferingPartition
|
|
160
|
+
"""
|
|
161
|
+
|
|
162
|
+
return (
|
|
163
|
+
await asyncio_detailed(
|
|
164
|
+
uuid=uuid,
|
|
165
|
+
client=client,
|
|
166
|
+
body=body,
|
|
167
|
+
)
|
|
168
|
+
).parsed
|
|
@@ -0,0 +1,168 @@
|
|
|
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.offering_software_catalog_request import OfferingSoftwareCatalogRequest
|
|
10
|
+
from ...models.software_catalog_uuid import SoftwareCatalogUUID
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
uuid: UUID,
|
|
16
|
+
*,
|
|
17
|
+
body: OfferingSoftwareCatalogRequest,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
headers: dict[str, Any] = {}
|
|
20
|
+
|
|
21
|
+
_kwargs: dict[str, Any] = {
|
|
22
|
+
"method": "post",
|
|
23
|
+
"url": f"/api/marketplace-provider-offerings/{uuid}/add_software_catalog/",
|
|
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) -> SoftwareCatalogUUID:
|
|
35
|
+
if response.status_code == 201:
|
|
36
|
+
response_201 = SoftwareCatalogUUID.from_dict(response.json())
|
|
37
|
+
|
|
38
|
+
return response_201
|
|
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[SoftwareCatalogUUID]:
|
|
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: OfferingSoftwareCatalogRequest,
|
|
58
|
+
) -> Response[SoftwareCatalogUUID]:
|
|
59
|
+
"""Add software catalog to offering.
|
|
60
|
+
|
|
61
|
+
Args:
|
|
62
|
+
uuid (UUID):
|
|
63
|
+
body (OfferingSoftwareCatalogRequest):
|
|
64
|
+
|
|
65
|
+
Raises:
|
|
66
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
67
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
68
|
+
|
|
69
|
+
Returns:
|
|
70
|
+
Response[SoftwareCatalogUUID]
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
kwargs = _get_kwargs(
|
|
74
|
+
uuid=uuid,
|
|
75
|
+
body=body,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
response = client.get_httpx_client().request(
|
|
79
|
+
**kwargs,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
return _build_response(client=client, response=response)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def sync(
|
|
86
|
+
uuid: UUID,
|
|
87
|
+
*,
|
|
88
|
+
client: AuthenticatedClient,
|
|
89
|
+
body: OfferingSoftwareCatalogRequest,
|
|
90
|
+
) -> SoftwareCatalogUUID:
|
|
91
|
+
"""Add software catalog to offering.
|
|
92
|
+
|
|
93
|
+
Args:
|
|
94
|
+
uuid (UUID):
|
|
95
|
+
body (OfferingSoftwareCatalogRequest):
|
|
96
|
+
|
|
97
|
+
Raises:
|
|
98
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
99
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
SoftwareCatalogUUID
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
return sync_detailed(
|
|
106
|
+
uuid=uuid,
|
|
107
|
+
client=client,
|
|
108
|
+
body=body,
|
|
109
|
+
).parsed
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
async def asyncio_detailed(
|
|
113
|
+
uuid: UUID,
|
|
114
|
+
*,
|
|
115
|
+
client: AuthenticatedClient,
|
|
116
|
+
body: OfferingSoftwareCatalogRequest,
|
|
117
|
+
) -> Response[SoftwareCatalogUUID]:
|
|
118
|
+
"""Add software catalog to offering.
|
|
119
|
+
|
|
120
|
+
Args:
|
|
121
|
+
uuid (UUID):
|
|
122
|
+
body (OfferingSoftwareCatalogRequest):
|
|
123
|
+
|
|
124
|
+
Raises:
|
|
125
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
126
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
127
|
+
|
|
128
|
+
Returns:
|
|
129
|
+
Response[SoftwareCatalogUUID]
|
|
130
|
+
"""
|
|
131
|
+
|
|
132
|
+
kwargs = _get_kwargs(
|
|
133
|
+
uuid=uuid,
|
|
134
|
+
body=body,
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
138
|
+
|
|
139
|
+
return _build_response(client=client, response=response)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
async def asyncio(
|
|
143
|
+
uuid: UUID,
|
|
144
|
+
*,
|
|
145
|
+
client: AuthenticatedClient,
|
|
146
|
+
body: OfferingSoftwareCatalogRequest,
|
|
147
|
+
) -> SoftwareCatalogUUID:
|
|
148
|
+
"""Add software catalog to offering.
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
uuid (UUID):
|
|
152
|
+
body (OfferingSoftwareCatalogRequest):
|
|
153
|
+
|
|
154
|
+
Raises:
|
|
155
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
156
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
157
|
+
|
|
158
|
+
Returns:
|
|
159
|
+
SoftwareCatalogUUID
|
|
160
|
+
"""
|
|
161
|
+
|
|
162
|
+
return (
|
|
163
|
+
await asyncio_detailed(
|
|
164
|
+
uuid=uuid,
|
|
165
|
+
client=client,
|
|
166
|
+
body=body,
|
|
167
|
+
)
|
|
168
|
+
).parsed
|
waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_add_user.py
CHANGED
|
@@ -6,6 +6,9 @@ import httpx
|
|
|
6
6
|
|
|
7
7
|
from ... import errors
|
|
8
8
|
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.marketplace_provider_offerings_add_user_response_400 import (
|
|
10
|
+
MarketplaceProviderOfferingsAddUserResponse400,
|
|
11
|
+
)
|
|
9
12
|
from ...models.user_role_create_request import UserRoleCreateRequest
|
|
10
13
|
from ...models.user_role_expiration_time import UserRoleExpirationTime
|
|
11
14
|
from ...types import Response
|
|
@@ -31,17 +34,23 @@ def _get_kwargs(
|
|
|
31
34
|
return _kwargs
|
|
32
35
|
|
|
33
36
|
|
|
34
|
-
def _parse_response(
|
|
37
|
+
def _parse_response(
|
|
38
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
39
|
+
) -> Union[MarketplaceProviderOfferingsAddUserResponse400, UserRoleExpirationTime]:
|
|
35
40
|
if response.status_code == 201:
|
|
36
41
|
response_201 = UserRoleExpirationTime.from_dict(response.json())
|
|
37
42
|
|
|
38
43
|
return response_201
|
|
44
|
+
if response.status_code == 400:
|
|
45
|
+
response_400 = MarketplaceProviderOfferingsAddUserResponse400.from_dict(response.json())
|
|
46
|
+
|
|
47
|
+
return response_400
|
|
39
48
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
40
49
|
|
|
41
50
|
|
|
42
51
|
def _build_response(
|
|
43
52
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
44
|
-
) -> Response[UserRoleExpirationTime]:
|
|
53
|
+
) -> Response[Union[MarketplaceProviderOfferingsAddUserResponse400, UserRoleExpirationTime]]:
|
|
45
54
|
return Response(
|
|
46
55
|
status_code=HTTPStatus(response.status_code),
|
|
47
56
|
content=response.content,
|
|
@@ -55,7 +64,7 @@ def sync_detailed(
|
|
|
55
64
|
*,
|
|
56
65
|
client: AuthenticatedClient,
|
|
57
66
|
body: UserRoleCreateRequest,
|
|
58
|
-
) -> Response[UserRoleExpirationTime]:
|
|
67
|
+
) -> Response[Union[MarketplaceProviderOfferingsAddUserResponse400, UserRoleExpirationTime]]:
|
|
59
68
|
"""
|
|
60
69
|
Args:
|
|
61
70
|
uuid (UUID):
|
|
@@ -66,7 +75,7 @@ def sync_detailed(
|
|
|
66
75
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
67
76
|
|
|
68
77
|
Returns:
|
|
69
|
-
Response[UserRoleExpirationTime]
|
|
78
|
+
Response[Union[MarketplaceProviderOfferingsAddUserResponse400, UserRoleExpirationTime]]
|
|
70
79
|
"""
|
|
71
80
|
|
|
72
81
|
kwargs = _get_kwargs(
|
|
@@ -86,7 +95,7 @@ def sync(
|
|
|
86
95
|
*,
|
|
87
96
|
client: AuthenticatedClient,
|
|
88
97
|
body: UserRoleCreateRequest,
|
|
89
|
-
) -> UserRoleExpirationTime:
|
|
98
|
+
) -> Union[MarketplaceProviderOfferingsAddUserResponse400, UserRoleExpirationTime]:
|
|
90
99
|
"""
|
|
91
100
|
Args:
|
|
92
101
|
uuid (UUID):
|
|
@@ -97,7 +106,7 @@ def sync(
|
|
|
97
106
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
98
107
|
|
|
99
108
|
Returns:
|
|
100
|
-
UserRoleExpirationTime
|
|
109
|
+
Union[MarketplaceProviderOfferingsAddUserResponse400, UserRoleExpirationTime]
|
|
101
110
|
"""
|
|
102
111
|
|
|
103
112
|
return sync_detailed(
|
|
@@ -112,7 +121,7 @@ async def asyncio_detailed(
|
|
|
112
121
|
*,
|
|
113
122
|
client: AuthenticatedClient,
|
|
114
123
|
body: UserRoleCreateRequest,
|
|
115
|
-
) -> Response[UserRoleExpirationTime]:
|
|
124
|
+
) -> Response[Union[MarketplaceProviderOfferingsAddUserResponse400, UserRoleExpirationTime]]:
|
|
116
125
|
"""
|
|
117
126
|
Args:
|
|
118
127
|
uuid (UUID):
|
|
@@ -123,7 +132,7 @@ async def asyncio_detailed(
|
|
|
123
132
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
124
133
|
|
|
125
134
|
Returns:
|
|
126
|
-
Response[UserRoleExpirationTime]
|
|
135
|
+
Response[Union[MarketplaceProviderOfferingsAddUserResponse400, UserRoleExpirationTime]]
|
|
127
136
|
"""
|
|
128
137
|
|
|
129
138
|
kwargs = _get_kwargs(
|
|
@@ -141,7 +150,7 @@ async def asyncio(
|
|
|
141
150
|
*,
|
|
142
151
|
client: AuthenticatedClient,
|
|
143
152
|
body: UserRoleCreateRequest,
|
|
144
|
-
) -> UserRoleExpirationTime:
|
|
153
|
+
) -> Union[MarketplaceProviderOfferingsAddUserResponse400, UserRoleExpirationTime]:
|
|
145
154
|
"""
|
|
146
155
|
Args:
|
|
147
156
|
uuid (UUID):
|
|
@@ -152,7 +161,7 @@ async def asyncio(
|
|
|
152
161
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
153
162
|
|
|
154
163
|
Returns:
|
|
155
|
-
UserRoleExpirationTime
|
|
164
|
+
Union[MarketplaceProviderOfferingsAddUserResponse400, UserRoleExpirationTime]
|
|
156
165
|
"""
|
|
157
166
|
|
|
158
167
|
return (
|