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,211 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
4
|
+
from uuid import UUID
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
from dateutil.parser import isoparse
|
|
9
|
+
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from ..models.nested_agent_service import NestedAgentService
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="AgentIdentity")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class AgentIdentity:
|
|
21
|
+
"""
|
|
22
|
+
Attributes:
|
|
23
|
+
uuid (UUID):
|
|
24
|
+
url (str):
|
|
25
|
+
offering (UUID):
|
|
26
|
+
name (str):
|
|
27
|
+
created (datetime.datetime):
|
|
28
|
+
modified (datetime.datetime):
|
|
29
|
+
services (list['NestedAgentService']):
|
|
30
|
+
version (Union[None, Unset, str]):
|
|
31
|
+
dependencies (Union[Unset, Any]):
|
|
32
|
+
config_file_path (Union[None, Unset, str]): Example: '/etc/waldur/agent.yaml'
|
|
33
|
+
config_file_content (Union[None, Unset, str]):
|
|
34
|
+
last_restarted (Union[Unset, datetime.datetime]):
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
uuid: UUID
|
|
38
|
+
url: str
|
|
39
|
+
offering: UUID
|
|
40
|
+
name: str
|
|
41
|
+
created: datetime.datetime
|
|
42
|
+
modified: datetime.datetime
|
|
43
|
+
services: list["NestedAgentService"]
|
|
44
|
+
version: Union[None, Unset, str] = UNSET
|
|
45
|
+
dependencies: Union[Unset, Any] = UNSET
|
|
46
|
+
config_file_path: Union[None, Unset, str] = UNSET
|
|
47
|
+
config_file_content: Union[None, Unset, str] = UNSET
|
|
48
|
+
last_restarted: Union[Unset, datetime.datetime] = UNSET
|
|
49
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
50
|
+
|
|
51
|
+
def to_dict(self) -> dict[str, Any]:
|
|
52
|
+
uuid = str(self.uuid)
|
|
53
|
+
|
|
54
|
+
url = self.url
|
|
55
|
+
|
|
56
|
+
offering = str(self.offering)
|
|
57
|
+
|
|
58
|
+
name = self.name
|
|
59
|
+
|
|
60
|
+
created = self.created.isoformat()
|
|
61
|
+
|
|
62
|
+
modified = self.modified.isoformat()
|
|
63
|
+
|
|
64
|
+
services = []
|
|
65
|
+
for services_item_data in self.services:
|
|
66
|
+
services_item = services_item_data.to_dict()
|
|
67
|
+
services.append(services_item)
|
|
68
|
+
|
|
69
|
+
version: Union[None, Unset, str]
|
|
70
|
+
if isinstance(self.version, Unset):
|
|
71
|
+
version = UNSET
|
|
72
|
+
else:
|
|
73
|
+
version = self.version
|
|
74
|
+
|
|
75
|
+
dependencies = self.dependencies
|
|
76
|
+
|
|
77
|
+
config_file_path: Union[None, Unset, str]
|
|
78
|
+
if isinstance(self.config_file_path, Unset):
|
|
79
|
+
config_file_path = UNSET
|
|
80
|
+
else:
|
|
81
|
+
config_file_path = self.config_file_path
|
|
82
|
+
|
|
83
|
+
config_file_content: Union[None, Unset, str]
|
|
84
|
+
if isinstance(self.config_file_content, Unset):
|
|
85
|
+
config_file_content = UNSET
|
|
86
|
+
else:
|
|
87
|
+
config_file_content = self.config_file_content
|
|
88
|
+
|
|
89
|
+
last_restarted: Union[Unset, str] = UNSET
|
|
90
|
+
if not isinstance(self.last_restarted, Unset):
|
|
91
|
+
last_restarted = self.last_restarted.isoformat()
|
|
92
|
+
|
|
93
|
+
field_dict: dict[str, Any] = {}
|
|
94
|
+
field_dict.update(self.additional_properties)
|
|
95
|
+
field_dict.update(
|
|
96
|
+
{
|
|
97
|
+
"uuid": uuid,
|
|
98
|
+
"url": url,
|
|
99
|
+
"offering": offering,
|
|
100
|
+
"name": name,
|
|
101
|
+
"created": created,
|
|
102
|
+
"modified": modified,
|
|
103
|
+
"services": services,
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
if version is not UNSET:
|
|
107
|
+
field_dict["version"] = version
|
|
108
|
+
if dependencies is not UNSET:
|
|
109
|
+
field_dict["dependencies"] = dependencies
|
|
110
|
+
if config_file_path is not UNSET:
|
|
111
|
+
field_dict["config_file_path"] = config_file_path
|
|
112
|
+
if config_file_content is not UNSET:
|
|
113
|
+
field_dict["config_file_content"] = config_file_content
|
|
114
|
+
if last_restarted is not UNSET:
|
|
115
|
+
field_dict["last_restarted"] = last_restarted
|
|
116
|
+
|
|
117
|
+
return field_dict
|
|
118
|
+
|
|
119
|
+
@classmethod
|
|
120
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
121
|
+
from ..models.nested_agent_service import NestedAgentService
|
|
122
|
+
|
|
123
|
+
d = dict(src_dict)
|
|
124
|
+
uuid = UUID(d.pop("uuid"))
|
|
125
|
+
|
|
126
|
+
url = d.pop("url")
|
|
127
|
+
|
|
128
|
+
offering = UUID(d.pop("offering"))
|
|
129
|
+
|
|
130
|
+
name = d.pop("name")
|
|
131
|
+
|
|
132
|
+
created = isoparse(d.pop("created"))
|
|
133
|
+
|
|
134
|
+
modified = isoparse(d.pop("modified"))
|
|
135
|
+
|
|
136
|
+
services = []
|
|
137
|
+
_services = d.pop("services")
|
|
138
|
+
for services_item_data in _services:
|
|
139
|
+
services_item = NestedAgentService.from_dict(services_item_data)
|
|
140
|
+
|
|
141
|
+
services.append(services_item)
|
|
142
|
+
|
|
143
|
+
def _parse_version(data: object) -> Union[None, Unset, str]:
|
|
144
|
+
if data is None:
|
|
145
|
+
return data
|
|
146
|
+
if isinstance(data, Unset):
|
|
147
|
+
return data
|
|
148
|
+
return cast(Union[None, Unset, str], data)
|
|
149
|
+
|
|
150
|
+
version = _parse_version(d.pop("version", UNSET))
|
|
151
|
+
|
|
152
|
+
dependencies = d.pop("dependencies", UNSET)
|
|
153
|
+
|
|
154
|
+
def _parse_config_file_path(data: object) -> Union[None, Unset, str]:
|
|
155
|
+
if data is None:
|
|
156
|
+
return data
|
|
157
|
+
if isinstance(data, Unset):
|
|
158
|
+
return data
|
|
159
|
+
return cast(Union[None, Unset, str], data)
|
|
160
|
+
|
|
161
|
+
config_file_path = _parse_config_file_path(d.pop("config_file_path", UNSET))
|
|
162
|
+
|
|
163
|
+
def _parse_config_file_content(data: object) -> Union[None, Unset, str]:
|
|
164
|
+
if data is None:
|
|
165
|
+
return data
|
|
166
|
+
if isinstance(data, Unset):
|
|
167
|
+
return data
|
|
168
|
+
return cast(Union[None, Unset, str], data)
|
|
169
|
+
|
|
170
|
+
config_file_content = _parse_config_file_content(d.pop("config_file_content", UNSET))
|
|
171
|
+
|
|
172
|
+
_last_restarted = d.pop("last_restarted", UNSET)
|
|
173
|
+
last_restarted: Union[Unset, datetime.datetime]
|
|
174
|
+
if isinstance(_last_restarted, Unset):
|
|
175
|
+
last_restarted = UNSET
|
|
176
|
+
else:
|
|
177
|
+
last_restarted = isoparse(_last_restarted)
|
|
178
|
+
|
|
179
|
+
agent_identity = cls(
|
|
180
|
+
uuid=uuid,
|
|
181
|
+
url=url,
|
|
182
|
+
offering=offering,
|
|
183
|
+
name=name,
|
|
184
|
+
created=created,
|
|
185
|
+
modified=modified,
|
|
186
|
+
services=services,
|
|
187
|
+
version=version,
|
|
188
|
+
dependencies=dependencies,
|
|
189
|
+
config_file_path=config_file_path,
|
|
190
|
+
config_file_content=config_file_content,
|
|
191
|
+
last_restarted=last_restarted,
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
agent_identity.additional_properties = d
|
|
195
|
+
return agent_identity
|
|
196
|
+
|
|
197
|
+
@property
|
|
198
|
+
def additional_keys(self) -> list[str]:
|
|
199
|
+
return list(self.additional_properties.keys())
|
|
200
|
+
|
|
201
|
+
def __getitem__(self, key: str) -> Any:
|
|
202
|
+
return self.additional_properties[key]
|
|
203
|
+
|
|
204
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
205
|
+
self.additional_properties[key] = value
|
|
206
|
+
|
|
207
|
+
def __delitem__(self, key: str) -> None:
|
|
208
|
+
del self.additional_properties[key]
|
|
209
|
+
|
|
210
|
+
def __contains__(self, key: str) -> bool:
|
|
211
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import Any, TypeVar, Union, cast
|
|
4
|
+
from uuid import UUID
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
from dateutil.parser import isoparse
|
|
9
|
+
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="AgentIdentityRequest")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class AgentIdentityRequest:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
offering (UUID):
|
|
20
|
+
name (str):
|
|
21
|
+
version (Union[None, Unset, str]):
|
|
22
|
+
dependencies (Union[Unset, Any]):
|
|
23
|
+
config_file_path (Union[None, Unset, str]): Example: '/etc/waldur/agent.yaml'
|
|
24
|
+
config_file_content (Union[None, Unset, str]):
|
|
25
|
+
last_restarted (Union[Unset, datetime.datetime]):
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
offering: UUID
|
|
29
|
+
name: str
|
|
30
|
+
version: Union[None, Unset, str] = UNSET
|
|
31
|
+
dependencies: Union[Unset, Any] = UNSET
|
|
32
|
+
config_file_path: Union[None, Unset, str] = UNSET
|
|
33
|
+
config_file_content: Union[None, Unset, str] = UNSET
|
|
34
|
+
last_restarted: Union[Unset, datetime.datetime] = UNSET
|
|
35
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
36
|
+
|
|
37
|
+
def to_dict(self) -> dict[str, Any]:
|
|
38
|
+
offering = str(self.offering)
|
|
39
|
+
|
|
40
|
+
name = self.name
|
|
41
|
+
|
|
42
|
+
version: Union[None, Unset, str]
|
|
43
|
+
if isinstance(self.version, Unset):
|
|
44
|
+
version = UNSET
|
|
45
|
+
else:
|
|
46
|
+
version = self.version
|
|
47
|
+
|
|
48
|
+
dependencies = self.dependencies
|
|
49
|
+
|
|
50
|
+
config_file_path: Union[None, Unset, str]
|
|
51
|
+
if isinstance(self.config_file_path, Unset):
|
|
52
|
+
config_file_path = UNSET
|
|
53
|
+
else:
|
|
54
|
+
config_file_path = self.config_file_path
|
|
55
|
+
|
|
56
|
+
config_file_content: Union[None, Unset, str]
|
|
57
|
+
if isinstance(self.config_file_content, Unset):
|
|
58
|
+
config_file_content = UNSET
|
|
59
|
+
else:
|
|
60
|
+
config_file_content = self.config_file_content
|
|
61
|
+
|
|
62
|
+
last_restarted: Union[Unset, str] = UNSET
|
|
63
|
+
if not isinstance(self.last_restarted, Unset):
|
|
64
|
+
last_restarted = self.last_restarted.isoformat()
|
|
65
|
+
|
|
66
|
+
field_dict: dict[str, Any] = {}
|
|
67
|
+
field_dict.update(self.additional_properties)
|
|
68
|
+
field_dict.update(
|
|
69
|
+
{
|
|
70
|
+
"offering": offering,
|
|
71
|
+
"name": name,
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
if version is not UNSET:
|
|
75
|
+
field_dict["version"] = version
|
|
76
|
+
if dependencies is not UNSET:
|
|
77
|
+
field_dict["dependencies"] = dependencies
|
|
78
|
+
if config_file_path is not UNSET:
|
|
79
|
+
field_dict["config_file_path"] = config_file_path
|
|
80
|
+
if config_file_content is not UNSET:
|
|
81
|
+
field_dict["config_file_content"] = config_file_content
|
|
82
|
+
if last_restarted is not UNSET:
|
|
83
|
+
field_dict["last_restarted"] = last_restarted
|
|
84
|
+
|
|
85
|
+
return field_dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
89
|
+
d = dict(src_dict)
|
|
90
|
+
offering = UUID(d.pop("offering"))
|
|
91
|
+
|
|
92
|
+
name = d.pop("name")
|
|
93
|
+
|
|
94
|
+
def _parse_version(data: object) -> Union[None, Unset, str]:
|
|
95
|
+
if data is None:
|
|
96
|
+
return data
|
|
97
|
+
if isinstance(data, Unset):
|
|
98
|
+
return data
|
|
99
|
+
return cast(Union[None, Unset, str], data)
|
|
100
|
+
|
|
101
|
+
version = _parse_version(d.pop("version", UNSET))
|
|
102
|
+
|
|
103
|
+
dependencies = d.pop("dependencies", UNSET)
|
|
104
|
+
|
|
105
|
+
def _parse_config_file_path(data: object) -> Union[None, Unset, str]:
|
|
106
|
+
if data is None:
|
|
107
|
+
return data
|
|
108
|
+
if isinstance(data, Unset):
|
|
109
|
+
return data
|
|
110
|
+
return cast(Union[None, Unset, str], data)
|
|
111
|
+
|
|
112
|
+
config_file_path = _parse_config_file_path(d.pop("config_file_path", UNSET))
|
|
113
|
+
|
|
114
|
+
def _parse_config_file_content(data: object) -> Union[None, Unset, str]:
|
|
115
|
+
if data is None:
|
|
116
|
+
return data
|
|
117
|
+
if isinstance(data, Unset):
|
|
118
|
+
return data
|
|
119
|
+
return cast(Union[None, Unset, str], data)
|
|
120
|
+
|
|
121
|
+
config_file_content = _parse_config_file_content(d.pop("config_file_content", UNSET))
|
|
122
|
+
|
|
123
|
+
_last_restarted = d.pop("last_restarted", UNSET)
|
|
124
|
+
last_restarted: Union[Unset, datetime.datetime]
|
|
125
|
+
if isinstance(_last_restarted, Unset):
|
|
126
|
+
last_restarted = UNSET
|
|
127
|
+
else:
|
|
128
|
+
last_restarted = isoparse(_last_restarted)
|
|
129
|
+
|
|
130
|
+
agent_identity_request = cls(
|
|
131
|
+
offering=offering,
|
|
132
|
+
name=name,
|
|
133
|
+
version=version,
|
|
134
|
+
dependencies=dependencies,
|
|
135
|
+
config_file_path=config_file_path,
|
|
136
|
+
config_file_content=config_file_content,
|
|
137
|
+
last_restarted=last_restarted,
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
agent_identity_request.additional_properties = d
|
|
141
|
+
return agent_identity_request
|
|
142
|
+
|
|
143
|
+
@property
|
|
144
|
+
def additional_keys(self) -> list[str]:
|
|
145
|
+
return list(self.additional_properties.keys())
|
|
146
|
+
|
|
147
|
+
def __getitem__(self, key: str) -> Any:
|
|
148
|
+
return self.additional_properties[key]
|
|
149
|
+
|
|
150
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
151
|
+
self.additional_properties[key] = value
|
|
152
|
+
|
|
153
|
+
def __delitem__(self, key: str) -> None:
|
|
154
|
+
del self.additional_properties[key]
|
|
155
|
+
|
|
156
|
+
def __contains__(self, key: str) -> bool:
|
|
157
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import Any, TypeVar, Union, cast
|
|
4
|
+
from uuid import UUID
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
from dateutil.parser import isoparse
|
|
9
|
+
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="AgentProcessor")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class AgentProcessor:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
uuid (UUID):
|
|
20
|
+
url (str):
|
|
21
|
+
service (UUID):
|
|
22
|
+
service_name (str):
|
|
23
|
+
name (str):
|
|
24
|
+
backend_type (str): Type of the backend, for example SLURM.
|
|
25
|
+
created (datetime.datetime):
|
|
26
|
+
modified (datetime.datetime):
|
|
27
|
+
last_run (Union[None, Unset, datetime.datetime]):
|
|
28
|
+
backend_version (Union[None, Unset, str]):
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
uuid: UUID
|
|
32
|
+
url: str
|
|
33
|
+
service: UUID
|
|
34
|
+
service_name: str
|
|
35
|
+
name: str
|
|
36
|
+
backend_type: str
|
|
37
|
+
created: datetime.datetime
|
|
38
|
+
modified: datetime.datetime
|
|
39
|
+
last_run: Union[None, Unset, datetime.datetime] = UNSET
|
|
40
|
+
backend_version: Union[None, Unset, str] = UNSET
|
|
41
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
42
|
+
|
|
43
|
+
def to_dict(self) -> dict[str, Any]:
|
|
44
|
+
uuid = str(self.uuid)
|
|
45
|
+
|
|
46
|
+
url = self.url
|
|
47
|
+
|
|
48
|
+
service = str(self.service)
|
|
49
|
+
|
|
50
|
+
service_name = self.service_name
|
|
51
|
+
|
|
52
|
+
name = self.name
|
|
53
|
+
|
|
54
|
+
backend_type = self.backend_type
|
|
55
|
+
|
|
56
|
+
created = self.created.isoformat()
|
|
57
|
+
|
|
58
|
+
modified = self.modified.isoformat()
|
|
59
|
+
|
|
60
|
+
last_run: Union[None, Unset, str]
|
|
61
|
+
if isinstance(self.last_run, Unset):
|
|
62
|
+
last_run = UNSET
|
|
63
|
+
elif isinstance(self.last_run, datetime.datetime):
|
|
64
|
+
last_run = self.last_run.isoformat()
|
|
65
|
+
else:
|
|
66
|
+
last_run = self.last_run
|
|
67
|
+
|
|
68
|
+
backend_version: Union[None, Unset, str]
|
|
69
|
+
if isinstance(self.backend_version, Unset):
|
|
70
|
+
backend_version = UNSET
|
|
71
|
+
else:
|
|
72
|
+
backend_version = self.backend_version
|
|
73
|
+
|
|
74
|
+
field_dict: dict[str, Any] = {}
|
|
75
|
+
field_dict.update(self.additional_properties)
|
|
76
|
+
field_dict.update(
|
|
77
|
+
{
|
|
78
|
+
"uuid": uuid,
|
|
79
|
+
"url": url,
|
|
80
|
+
"service": service,
|
|
81
|
+
"service_name": service_name,
|
|
82
|
+
"name": name,
|
|
83
|
+
"backend_type": backend_type,
|
|
84
|
+
"created": created,
|
|
85
|
+
"modified": modified,
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
if last_run is not UNSET:
|
|
89
|
+
field_dict["last_run"] = last_run
|
|
90
|
+
if backend_version is not UNSET:
|
|
91
|
+
field_dict["backend_version"] = backend_version
|
|
92
|
+
|
|
93
|
+
return field_dict
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
97
|
+
d = dict(src_dict)
|
|
98
|
+
uuid = UUID(d.pop("uuid"))
|
|
99
|
+
|
|
100
|
+
url = d.pop("url")
|
|
101
|
+
|
|
102
|
+
service = UUID(d.pop("service"))
|
|
103
|
+
|
|
104
|
+
service_name = d.pop("service_name")
|
|
105
|
+
|
|
106
|
+
name = d.pop("name")
|
|
107
|
+
|
|
108
|
+
backend_type = d.pop("backend_type")
|
|
109
|
+
|
|
110
|
+
created = isoparse(d.pop("created"))
|
|
111
|
+
|
|
112
|
+
modified = isoparse(d.pop("modified"))
|
|
113
|
+
|
|
114
|
+
def _parse_last_run(data: object) -> Union[None, Unset, datetime.datetime]:
|
|
115
|
+
if data is None:
|
|
116
|
+
return data
|
|
117
|
+
if isinstance(data, Unset):
|
|
118
|
+
return data
|
|
119
|
+
try:
|
|
120
|
+
if not isinstance(data, str):
|
|
121
|
+
raise TypeError()
|
|
122
|
+
last_run_type_0 = isoparse(data)
|
|
123
|
+
|
|
124
|
+
return last_run_type_0
|
|
125
|
+
except: # noqa: E722
|
|
126
|
+
pass
|
|
127
|
+
return cast(Union[None, Unset, datetime.datetime], data)
|
|
128
|
+
|
|
129
|
+
last_run = _parse_last_run(d.pop("last_run", UNSET))
|
|
130
|
+
|
|
131
|
+
def _parse_backend_version(data: object) -> Union[None, Unset, str]:
|
|
132
|
+
if data is None:
|
|
133
|
+
return data
|
|
134
|
+
if isinstance(data, Unset):
|
|
135
|
+
return data
|
|
136
|
+
return cast(Union[None, Unset, str], data)
|
|
137
|
+
|
|
138
|
+
backend_version = _parse_backend_version(d.pop("backend_version", UNSET))
|
|
139
|
+
|
|
140
|
+
agent_processor = cls(
|
|
141
|
+
uuid=uuid,
|
|
142
|
+
url=url,
|
|
143
|
+
service=service,
|
|
144
|
+
service_name=service_name,
|
|
145
|
+
name=name,
|
|
146
|
+
backend_type=backend_type,
|
|
147
|
+
created=created,
|
|
148
|
+
modified=modified,
|
|
149
|
+
last_run=last_run,
|
|
150
|
+
backend_version=backend_version,
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
agent_processor.additional_properties = d
|
|
154
|
+
return agent_processor
|
|
155
|
+
|
|
156
|
+
@property
|
|
157
|
+
def additional_keys(self) -> list[str]:
|
|
158
|
+
return list(self.additional_properties.keys())
|
|
159
|
+
|
|
160
|
+
def __getitem__(self, key: str) -> Any:
|
|
161
|
+
return self.additional_properties[key]
|
|
162
|
+
|
|
163
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
164
|
+
self.additional_properties[key] = value
|
|
165
|
+
|
|
166
|
+
def __delitem__(self, key: str) -> None:
|
|
167
|
+
del self.additional_properties[key]
|
|
168
|
+
|
|
169
|
+
def __contains__(self, key: str) -> bool:
|
|
170
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="AgentProcessorCreateRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class AgentProcessorCreateRequest:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
name (str):
|
|
17
|
+
backend_type (str): Type of the backend, for example SLURM.
|
|
18
|
+
backend_version (Union[None, Unset, str]):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
name: str
|
|
22
|
+
backend_type: str
|
|
23
|
+
backend_version: Union[None, Unset, str] = UNSET
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
name = self.name
|
|
28
|
+
|
|
29
|
+
backend_type = self.backend_type
|
|
30
|
+
|
|
31
|
+
backend_version: Union[None, Unset, str]
|
|
32
|
+
if isinstance(self.backend_version, Unset):
|
|
33
|
+
backend_version = UNSET
|
|
34
|
+
else:
|
|
35
|
+
backend_version = self.backend_version
|
|
36
|
+
|
|
37
|
+
field_dict: dict[str, Any] = {}
|
|
38
|
+
field_dict.update(self.additional_properties)
|
|
39
|
+
field_dict.update(
|
|
40
|
+
{
|
|
41
|
+
"name": name,
|
|
42
|
+
"backend_type": backend_type,
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
if backend_version is not UNSET:
|
|
46
|
+
field_dict["backend_version"] = backend_version
|
|
47
|
+
|
|
48
|
+
return field_dict
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
52
|
+
d = dict(src_dict)
|
|
53
|
+
name = d.pop("name")
|
|
54
|
+
|
|
55
|
+
backend_type = d.pop("backend_type")
|
|
56
|
+
|
|
57
|
+
def _parse_backend_version(data: object) -> Union[None, Unset, str]:
|
|
58
|
+
if data is None:
|
|
59
|
+
return data
|
|
60
|
+
if isinstance(data, Unset):
|
|
61
|
+
return data
|
|
62
|
+
return cast(Union[None, Unset, str], data)
|
|
63
|
+
|
|
64
|
+
backend_version = _parse_backend_version(d.pop("backend_version", UNSET))
|
|
65
|
+
|
|
66
|
+
agent_processor_create_request = cls(
|
|
67
|
+
name=name,
|
|
68
|
+
backend_type=backend_type,
|
|
69
|
+
backend_version=backend_version,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
agent_processor_create_request.additional_properties = d
|
|
73
|
+
return agent_processor_create_request
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def additional_keys(self) -> list[str]:
|
|
77
|
+
return list(self.additional_properties.keys())
|
|
78
|
+
|
|
79
|
+
def __getitem__(self, key: str) -> Any:
|
|
80
|
+
return self.additional_properties[key]
|
|
81
|
+
|
|
82
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
83
|
+
self.additional_properties[key] = value
|
|
84
|
+
|
|
85
|
+
def __delitem__(self, key: str) -> None:
|
|
86
|
+
del self.additional_properties[key]
|
|
87
|
+
|
|
88
|
+
def __contains__(self, key: str) -> bool:
|
|
89
|
+
return key in self.additional_properties
|