From 78688495b580a4904478acfa882e6464906562d3 Mon Sep 17 00:00:00 2001 From: Nathan O'Sullivan Date: Wed, 12 Feb 2025 14:20:46 +1000 Subject: [PATCH 1/2] chore: update to API 0.28.0 --- .../domains/delete_v2_domains_domain_name.py | 18 +- ...2_domains_domain_name_records_record_id.py | 22 +- .../api/domains/get_v2_domains_domain_name.py | 18 +- .../get_v2_domains_domain_name_records.py | 22 +- ...2_domains_domain_name_records_record_id.py | 22 +- .../post_v2_domains_domain_name_records.py | 22 +- ...2_domains_domain_name_records_record_id.py | 22 +- lib/binarylane/api/failover_ips/__init__.py | 0 .../get_v2_failover_ips_server_id.py | 206 ---------------- ...get_v2_failover_ips_server_id_available.py | 206 ---------------- .../post_v2_failover_ips_server_id.py | 221 ------------------ .../images/get_v2_images_image_id_download.py | 25 +- ...load_balancers_load_balancer_id_servers.py | 4 - .../load_balancers/post_v2_load_balancers.py | 25 +- ...load_balancers_load_balancer_id_servers.py | 4 - .../post_v2_reverse_names_ipv6.py | 8 +- .../post_v2_servers_server_id_actions.py | 4 - ..._v_2_servers_server_id_actions_add_disk.py | 4 - ...servers_server_id_actions_attach_backup.py | 4 - ...ver_id_actions_change_advanced_features.py | 4 - ..._actions_change_advanced_firewall_rules.py | 4 - ...erver_id_actions_change_backup_schedule.py | 4 - ..._servers_server_id_actions_change_ipv_6.py | 4 - ...ctions_change_ipv_6_reverse_nameservers.py | 4 - ...servers_server_id_actions_change_kernel.py | 4 - ...ons_change_manage_offsite_backup_copies.py | 4 - ...ervers_server_id_actions_change_network.py | 4 - ..._actions_change_offsite_backup_location.py | 4 - ...ervers_server_id_actions_change_partner.py | 4 - ..._server_id_actions_change_port_blocking.py | 4 - ...s_server_id_actions_change_reverse_name.py | 4 - ...ange_separate_private_network_interface.py | 4 - ...ons_change_source_and_destination_check.py | 4 - ...rver_id_actions_change_threshold_alerts.py | 4 - ...vers_server_id_actions_change_vpc_ipv_4.py | 4 - ...rs_server_id_actions_clone_using_backup.py | 4 - ...2_servers_server_id_actions_delete_disk.py | 4 - ...servers_server_id_actions_detach_backup.py | 4 - ...rvers_server_id_actions_disable_backups.py | 4 - ...rvers_server_id_actions_disable_selinux.py | 4 - ...ervers_server_id_actions_enable_backups.py | 4 - ..._servers_server_id_actions_enable_ipv_6.py | 4 - ..._2_servers_server_id_actions_is_running.py | 4 - ...ervers_server_id_actions_password_reset.py | 4 - ...post_v_2_servers_server_id_actions_ping.py | 4 - ...2_servers_server_id_actions_power_cycle.py | 4 - ...v_2_servers_server_id_actions_power_off.py | 4 - ..._v_2_servers_server_id_actions_power_on.py | 4 - ...st_v_2_servers_server_id_actions_reboot.py | 4 - ...t_v_2_servers_server_id_actions_rebuild.py | 4 - ...st_v_2_servers_server_id_actions_rename.py | 4 - ...st_v_2_servers_server_id_actions_resize.py | 4 - ...2_servers_server_id_actions_resize_disk.py | 4 - ...t_v_2_servers_server_id_actions_restore.py | 4 - ..._v_2_servers_server_id_actions_shutdown.py | 4 - ...2_servers_server_id_actions_take_backup.py | 4 - ..._v_2_servers_server_id_actions_uncancel.py | 4 - ...st_v_2_servers_server_id_actions_uptime.py | 4 - .../post_v2_servers_server_id_backups.py | 4 - ...ting_system_operating_system_id_or_slug.py | 20 ++ lib/binarylane/models/account.py | 10 +- lib/binarylane/models/action.py | 2 +- lib/binarylane/models/backup_info.py | 4 +- lib/binarylane/models/domain.py | 7 + lib/binarylane/models/failover_ips_request.py | 60 ----- .../models/failover_ips_response.py | 89 ------- .../models/reverse_nameservers_request.py | 4 +- lib/binarylane/models/vm_machine_type.py | 1 + .../console/commands/api/__init__.py | 17 +- .../api/delete_v2_domains_domain_name.py | 8 +- ...2_domains_domain_name_records_record_id.py | 8 +- ...load_balancers_load_balancer_id_servers.py | 1 - .../console/commands/api/get_v2_actions.py | 2 +- .../console/commands/api/get_v2_domains.py | 2 + .../api/get_v2_domains_domain_name.py | 8 +- .../api/get_v2_domains_domain_name_records.py | 8 +- ...2_domains_domain_name_records_record_id.py | 8 +- .../api/get_v2_failover_ips_server_id.py | 92 -------- ...get_v2_failover_ips_server_id_available.py | 92 -------- .../api/get_v2_images_image_id_download.py | 4 +- .../api/get_v2_servers_server_id_actions.py | 2 +- .../post_v2_domains_domain_name_records.py | 8 +- .../api/post_v2_failover_ips_server_id.py | 87 ------- .../commands/api/post_v2_load_balancers.py | 4 +- ...load_balancers_load_balancer_id_servers.py | 1 - .../api/post_v2_reverse_names_ipv6.py | 2 +- .../api/post_v2_servers_server_id_backups.py | 1 - ..._v_2_servers_server_id_actions_add_disk.py | 1 - ...servers_server_id_actions_attach_backup.py | 1 - ...ver_id_actions_change_advanced_features.py | 1 - ..._actions_change_advanced_firewall_rules.py | 1 - ...erver_id_actions_change_backup_schedule.py | 1 - ..._servers_server_id_actions_change_ipv_6.py | 1 - ...ctions_change_ipv_6_reverse_nameservers.py | 1 - ...servers_server_id_actions_change_kernel.py | 1 - ...ons_change_manage_offsite_backup_copies.py | 1 - ...ervers_server_id_actions_change_network.py | 1 - ..._actions_change_offsite_backup_location.py | 1 - ...ervers_server_id_actions_change_partner.py | 1 - ..._server_id_actions_change_port_blocking.py | 1 - ...s_server_id_actions_change_reverse_name.py | 1 - ...ange_separate_private_network_interface.py | 1 - ...ons_change_source_and_destination_check.py | 1 - ...rver_id_actions_change_threshold_alerts.py | 1 - ...vers_server_id_actions_change_vpc_ipv_4.py | 1 - ...rs_server_id_actions_clone_using_backup.py | 1 - ...2_servers_server_id_actions_delete_disk.py | 1 - ...servers_server_id_actions_detach_backup.py | 1 - ...rvers_server_id_actions_disable_backups.py | 1 - ...rvers_server_id_actions_disable_selinux.py | 1 - ...ervers_server_id_actions_enable_backups.py | 1 - ..._servers_server_id_actions_enable_ipv_6.py | 1 - ..._2_servers_server_id_actions_is_running.py | 1 - ...ervers_server_id_actions_password_reset.py | 1 - ...post_v_2_servers_server_id_actions_ping.py | 1 - ...2_servers_server_id_actions_power_cycle.py | 1 - ...v_2_servers_server_id_actions_power_off.py | 1 - ..._v_2_servers_server_id_actions_power_on.py | 1 - ...st_v_2_servers_server_id_actions_reboot.py | 1 - ...t_v_2_servers_server_id_actions_rebuild.py | 1 - ...st_v_2_servers_server_id_actions_rename.py | 1 - ...st_v_2_servers_server_id_actions_resize.py | 1 - ...2_servers_server_id_actions_resize_disk.py | 1 - ...t_v_2_servers_server_id_actions_restore.py | 1 - ..._v_2_servers_server_id_actions_shutdown.py | 1 - ...2_servers_server_id_actions_take_backup.py | 1 - ..._v_2_servers_server_id_actions_uncancel.py | 1 - ...st_v_2_servers_server_id_actions_uptime.py | 1 - ...2_domains_domain_name_records_record_id.py | 8 +- 129 files changed, 192 insertions(+), 1426 deletions(-) delete mode 100644 lib/binarylane/api/failover_ips/__init__.py delete mode 100644 lib/binarylane/api/failover_ips/get_v2_failover_ips_server_id.py delete mode 100644 lib/binarylane/api/failover_ips/get_v2_failover_ips_server_id_available.py delete mode 100644 lib/binarylane/api/failover_ips/post_v2_failover_ips_server_id.py delete mode 100644 lib/binarylane/models/failover_ips_request.py delete mode 100644 lib/binarylane/models/failover_ips_response.py delete mode 100644 src/binarylane/console/commands/api/get_v2_failover_ips_server_id.py delete mode 100644 src/binarylane/console/commands/api/get_v2_failover_ips_server_id_available.py delete mode 100644 src/binarylane/console/commands/api/post_v2_failover_ips_server_id.py diff --git a/lib/binarylane/api/domains/delete_v2_domains_domain_name.py b/lib/binarylane/api/domains/delete_v2_domains_domain_name.py index 1652e700..ee93e14c 100644 --- a/lib/binarylane/api/domains/delete_v2_domains_domain_name.py +++ b/lib/binarylane/api/domains/delete_v2_domains_domain_name.py @@ -12,7 +12,7 @@ def _get_kwargs( - domain_name: str, + domain_name: Union[int, str], *, client: Client, ) -> Dict[str, Any]: @@ -57,14 +57,14 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Uni def sync_detailed( - domain_name: str, + domain_name: Union[int, str], *, client: Client, ) -> Response[Union[Any, ProblemDetails]]: """Delete an Existing Domain Args: - domain_name (str): The name of the domain to delete. + domain_name (Union[int, str]): The name or domain ID of the domain to delete. Example: 5. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -88,14 +88,14 @@ def sync_detailed( def sync( - domain_name: str, + domain_name: Union[int, str], *, client: Client, ) -> Optional[Union[Any, ProblemDetails]]: """Delete an Existing Domain Args: - domain_name (str): The name of the domain to delete. + domain_name (Union[int, str]): The name or domain ID of the domain to delete. Example: 5. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -112,14 +112,14 @@ def sync( async def asyncio_detailed( - domain_name: str, + domain_name: Union[int, str], *, client: Client, ) -> Response[Union[Any, ProblemDetails]]: """Delete an Existing Domain Args: - domain_name (str): The name of the domain to delete. + domain_name (Union[int, str]): The name or domain ID of the domain to delete. Example: 5. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -141,14 +141,14 @@ async def asyncio_detailed( async def asyncio( - domain_name: str, + domain_name: Union[int, str], *, client: Client, ) -> Optional[Union[Any, ProblemDetails]]: """Delete an Existing Domain Args: - domain_name (str): The name of the domain to delete. + domain_name (Union[int, str]): The name or domain ID of the domain to delete. Example: 5. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/lib/binarylane/api/domains/delete_v2_domains_domain_name_records_record_id.py b/lib/binarylane/api/domains/delete_v2_domains_domain_name_records_record_id.py index e46cf632..ffbd020d 100644 --- a/lib/binarylane/api/domains/delete_v2_domains_domain_name_records_record_id.py +++ b/lib/binarylane/api/domains/delete_v2_domains_domain_name_records_record_id.py @@ -12,7 +12,7 @@ def _get_kwargs( - domain_name: str, + domain_name: Union[int, str], record_id: int, *, client: Client, @@ -60,7 +60,7 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Uni def sync_detailed( - domain_name: str, + domain_name: Union[int, str], record_id: int, *, client: Client, @@ -68,7 +68,8 @@ def sync_detailed( """Delete an Existing Domain Record Args: - domain_name (str): The domain name for which the record should be deleted. + domain_name (Union[int, str]): The domain name or domain ID for which the record should be + deleted. Example: 5. record_id (int): The ID of the record to delete. Raises: @@ -94,7 +95,7 @@ def sync_detailed( def sync( - domain_name: str, + domain_name: Union[int, str], record_id: int, *, client: Client, @@ -102,7 +103,8 @@ def sync( """Delete an Existing Domain Record Args: - domain_name (str): The domain name for which the record should be deleted. + domain_name (Union[int, str]): The domain name or domain ID for which the record should be + deleted. Example: 5. record_id (int): The ID of the record to delete. Raises: @@ -121,7 +123,7 @@ def sync( async def asyncio_detailed( - domain_name: str, + domain_name: Union[int, str], record_id: int, *, client: Client, @@ -129,7 +131,8 @@ async def asyncio_detailed( """Delete an Existing Domain Record Args: - domain_name (str): The domain name for which the record should be deleted. + domain_name (Union[int, str]): The domain name or domain ID for which the record should be + deleted. Example: 5. record_id (int): The ID of the record to delete. Raises: @@ -153,7 +156,7 @@ async def asyncio_detailed( async def asyncio( - domain_name: str, + domain_name: Union[int, str], record_id: int, *, client: Client, @@ -161,7 +164,8 @@ async def asyncio( """Delete an Existing Domain Record Args: - domain_name (str): The domain name for which the record should be deleted. + domain_name (Union[int, str]): The domain name or domain ID for which the record should be + deleted. Example: 5. record_id (int): The ID of the record to delete. Raises: diff --git a/lib/binarylane/api/domains/get_v2_domains_domain_name.py b/lib/binarylane/api/domains/get_v2_domains_domain_name.py index 81e56f99..c2bea40a 100644 --- a/lib/binarylane/api/domains/get_v2_domains_domain_name.py +++ b/lib/binarylane/api/domains/get_v2_domains_domain_name.py @@ -13,7 +13,7 @@ def _get_kwargs( - domain_name: str, + domain_name: Union[int, str], *, client: Client, ) -> Dict[str, Any]: @@ -63,14 +63,14 @@ def _build_response( def sync_detailed( - domain_name: str, + domain_name: Union[int, str], *, client: Client, ) -> Response[Union[Any, DomainResponse, ProblemDetails]]: """Fetch an Existing Domain Args: - domain_name (str): The name of the domain to fetch. + domain_name (Union[int, str]): The name or domain ID of the domain to fetch. Example: 5. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -94,14 +94,14 @@ def sync_detailed( def sync( - domain_name: str, + domain_name: Union[int, str], *, client: Client, ) -> Optional[Union[Any, DomainResponse, ProblemDetails]]: """Fetch an Existing Domain Args: - domain_name (str): The name of the domain to fetch. + domain_name (Union[int, str]): The name or domain ID of the domain to fetch. Example: 5. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -118,14 +118,14 @@ def sync( async def asyncio_detailed( - domain_name: str, + domain_name: Union[int, str], *, client: Client, ) -> Response[Union[Any, DomainResponse, ProblemDetails]]: """Fetch an Existing Domain Args: - domain_name (str): The name of the domain to fetch. + domain_name (Union[int, str]): The name or domain ID of the domain to fetch. Example: 5. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -147,14 +147,14 @@ async def asyncio_detailed( async def asyncio( - domain_name: str, + domain_name: Union[int, str], *, client: Client, ) -> Optional[Union[Any, DomainResponse, ProblemDetails]]: """Fetch an Existing Domain Args: - domain_name (str): The name of the domain to fetch. + domain_name (Union[int, str]): The name or domain ID of the domain to fetch. Example: 5. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/lib/binarylane/api/domains/get_v2_domains_domain_name_records.py b/lib/binarylane/api/domains/get_v2_domains_domain_name_records.py index bc8d0645..1168148b 100644 --- a/lib/binarylane/api/domains/get_v2_domains_domain_name_records.py +++ b/lib/binarylane/api/domains/get_v2_domains_domain_name_records.py @@ -14,7 +14,7 @@ def _get_kwargs( - domain_name: str, + domain_name: Union[int, str], *, client: Client, type: Union[Unset, None, DomainRecordType] = UNSET, @@ -84,7 +84,7 @@ def _build_response( def sync_detailed( - domain_name: str, + domain_name: Union[int, str], *, client: Client, type: Union[Unset, None, DomainRecordType] = UNSET, @@ -95,7 +95,8 @@ def sync_detailed( """List All Domain Records for a Domain Args: - domain_name (str): The domain name for which records should be listed. + domain_name (Union[int, str]): The domain name or domain ID for for which records should + be listed. Example: 5. type (Union[Unset, None, DomainRecordType]): | Value | Description | | ----- | ----------- | @@ -140,7 +141,7 @@ def sync_detailed( def sync( - domain_name: str, + domain_name: Union[int, str], *, client: Client, type: Union[Unset, None, DomainRecordType] = UNSET, @@ -151,7 +152,8 @@ def sync( """List All Domain Records for a Domain Args: - domain_name (str): The domain name for which records should be listed. + domain_name (Union[int, str]): The domain name or domain ID for for which records should + be listed. Example: 5. type (Union[Unset, None, DomainRecordType]): | Value | Description | | ----- | ----------- | @@ -189,7 +191,7 @@ def sync( async def asyncio_detailed( - domain_name: str, + domain_name: Union[int, str], *, client: Client, type: Union[Unset, None, DomainRecordType] = UNSET, @@ -200,7 +202,8 @@ async def asyncio_detailed( """List All Domain Records for a Domain Args: - domain_name (str): The domain name for which records should be listed. + domain_name (Union[int, str]): The domain name or domain ID for for which records should + be listed. Example: 5. type (Union[Unset, None, DomainRecordType]): | Value | Description | | ----- | ----------- | @@ -243,7 +246,7 @@ async def asyncio_detailed( async def asyncio( - domain_name: str, + domain_name: Union[int, str], *, client: Client, type: Union[Unset, None, DomainRecordType] = UNSET, @@ -254,7 +257,8 @@ async def asyncio( """List All Domain Records for a Domain Args: - domain_name (str): The domain name for which records should be listed. + domain_name (Union[int, str]): The domain name or domain ID for for which records should + be listed. Example: 5. type (Union[Unset, None, DomainRecordType]): | Value | Description | | ----- | ----------- | diff --git a/lib/binarylane/api/domains/get_v2_domains_domain_name_records_record_id.py b/lib/binarylane/api/domains/get_v2_domains_domain_name_records_record_id.py index 101b9493..1b122635 100644 --- a/lib/binarylane/api/domains/get_v2_domains_domain_name_records_record_id.py +++ b/lib/binarylane/api/domains/get_v2_domains_domain_name_records_record_id.py @@ -13,7 +13,7 @@ def _get_kwargs( - domain_name: str, + domain_name: Union[int, str], record_id: int, *, client: Client, @@ -66,7 +66,7 @@ def _build_response( def sync_detailed( - domain_name: str, + domain_name: Union[int, str], record_id: int, *, client: Client, @@ -74,7 +74,8 @@ def sync_detailed( """Fetch an Existing Domain Record Args: - domain_name (str): The domain name for which the record should be fetched. + domain_name (Union[int, str]): The domain name or domain ID for for which the record + should be fetched. Example: 5. record_id (int): The ID of the record to fetch. Raises: @@ -100,7 +101,7 @@ def sync_detailed( def sync( - domain_name: str, + domain_name: Union[int, str], record_id: int, *, client: Client, @@ -108,7 +109,8 @@ def sync( """Fetch an Existing Domain Record Args: - domain_name (str): The domain name for which the record should be fetched. + domain_name (Union[int, str]): The domain name or domain ID for for which the record + should be fetched. Example: 5. record_id (int): The ID of the record to fetch. Raises: @@ -127,7 +129,7 @@ def sync( async def asyncio_detailed( - domain_name: str, + domain_name: Union[int, str], record_id: int, *, client: Client, @@ -135,7 +137,8 @@ async def asyncio_detailed( """Fetch an Existing Domain Record Args: - domain_name (str): The domain name for which the record should be fetched. + domain_name (Union[int, str]): The domain name or domain ID for for which the record + should be fetched. Example: 5. record_id (int): The ID of the record to fetch. Raises: @@ -159,7 +162,7 @@ async def asyncio_detailed( async def asyncio( - domain_name: str, + domain_name: Union[int, str], record_id: int, *, client: Client, @@ -167,7 +170,8 @@ async def asyncio( """Fetch an Existing Domain Record Args: - domain_name (str): The domain name for which the record should be fetched. + domain_name (Union[int, str]): The domain name or domain ID for for which the record + should be fetched. Example: 5. record_id (int): The ID of the record to fetch. Raises: diff --git a/lib/binarylane/api/domains/post_v2_domains_domain_name_records.py b/lib/binarylane/api/domains/post_v2_domains_domain_name_records.py index f174ca8e..0293946a 100644 --- a/lib/binarylane/api/domains/post_v2_domains_domain_name_records.py +++ b/lib/binarylane/api/domains/post_v2_domains_domain_name_records.py @@ -15,7 +15,7 @@ def _get_kwargs( - domain_name: str, + domain_name: Union[int, str], *, client: Client, json_body: DomainRecordRequest, @@ -73,7 +73,7 @@ def _build_response( def sync_detailed( - domain_name: str, + domain_name: Union[int, str], *, client: Client, json_body: DomainRecordRequest, @@ -81,7 +81,8 @@ def sync_detailed( """Create a New Domain Record Args: - domain_name (str): The domain name for which the record should be created. + domain_name (Union[int, str]): The domain name or domain ID for for which the record + should be created. Example: 5. json_body (DomainRecordRequest): If this is used to update an existing DomainRecord any values not provided will be retained. Provide empty strings to clear existing string values, nulls to retain the existing values. @@ -109,7 +110,7 @@ def sync_detailed( def sync( - domain_name: str, + domain_name: Union[int, str], *, client: Client, json_body: DomainRecordRequest, @@ -117,7 +118,8 @@ def sync( """Create a New Domain Record Args: - domain_name (str): The domain name for which the record should be created. + domain_name (Union[int, str]): The domain name or domain ID for for which the record + should be created. Example: 5. json_body (DomainRecordRequest): If this is used to update an existing DomainRecord any values not provided will be retained. Provide empty strings to clear existing string values, nulls to retain the existing values. @@ -138,7 +140,7 @@ def sync( async def asyncio_detailed( - domain_name: str, + domain_name: Union[int, str], *, client: Client, json_body: DomainRecordRequest, @@ -146,7 +148,8 @@ async def asyncio_detailed( """Create a New Domain Record Args: - domain_name (str): The domain name for which the record should be created. + domain_name (Union[int, str]): The domain name or domain ID for for which the record + should be created. Example: 5. json_body (DomainRecordRequest): If this is used to update an existing DomainRecord any values not provided will be retained. Provide empty strings to clear existing string values, nulls to retain the existing values. @@ -172,7 +175,7 @@ async def asyncio_detailed( async def asyncio( - domain_name: str, + domain_name: Union[int, str], *, client: Client, json_body: DomainRecordRequest, @@ -180,7 +183,8 @@ async def asyncio( """Create a New Domain Record Args: - domain_name (str): The domain name for which the record should be created. + domain_name (Union[int, str]): The domain name or domain ID for for which the record + should be created. Example: 5. json_body (DomainRecordRequest): If this is used to update an existing DomainRecord any values not provided will be retained. Provide empty strings to clear existing string values, nulls to retain the existing values. diff --git a/lib/binarylane/api/domains/put_v2_domains_domain_name_records_record_id.py b/lib/binarylane/api/domains/put_v2_domains_domain_name_records_record_id.py index cbd9c464..e61fac7f 100644 --- a/lib/binarylane/api/domains/put_v2_domains_domain_name_records_record_id.py +++ b/lib/binarylane/api/domains/put_v2_domains_domain_name_records_record_id.py @@ -15,7 +15,7 @@ def _get_kwargs( - domain_name: str, + domain_name: Union[int, str], record_id: int, *, client: Client, @@ -76,7 +76,7 @@ def _build_response( def sync_detailed( - domain_name: str, + domain_name: Union[int, str], record_id: int, *, client: Client, @@ -85,7 +85,8 @@ def sync_detailed( """Update an Existing Domain Record Args: - domain_name (str): The domain name for which the record should be updated. + domain_name (Union[int, str]): The domain name or domain ID for for which the record + should be updated. Example: 5. record_id (int): The ID of the record to update. json_body (DomainRecordRequest): If this is used to update an existing DomainRecord any values not provided will be retained. Provide empty strings to clear existing string @@ -115,7 +116,7 @@ def sync_detailed( def sync( - domain_name: str, + domain_name: Union[int, str], record_id: int, *, client: Client, @@ -124,7 +125,8 @@ def sync( """Update an Existing Domain Record Args: - domain_name (str): The domain name for which the record should be updated. + domain_name (Union[int, str]): The domain name or domain ID for for which the record + should be updated. Example: 5. record_id (int): The ID of the record to update. json_body (DomainRecordRequest): If this is used to update an existing DomainRecord any values not provided will be retained. Provide empty strings to clear existing string @@ -147,7 +149,7 @@ def sync( async def asyncio_detailed( - domain_name: str, + domain_name: Union[int, str], record_id: int, *, client: Client, @@ -156,7 +158,8 @@ async def asyncio_detailed( """Update an Existing Domain Record Args: - domain_name (str): The domain name for which the record should be updated. + domain_name (Union[int, str]): The domain name or domain ID for for which the record + should be updated. Example: 5. record_id (int): The ID of the record to update. json_body (DomainRecordRequest): If this is used to update an existing DomainRecord any values not provided will be retained. Provide empty strings to clear existing string @@ -184,7 +187,7 @@ async def asyncio_detailed( async def asyncio( - domain_name: str, + domain_name: Union[int, str], record_id: int, *, client: Client, @@ -193,7 +196,8 @@ async def asyncio( """Update an Existing Domain Record Args: - domain_name (str): The domain name for which the record should be updated. + domain_name (Union[int, str]): The domain name or domain ID for for which the record + should be updated. Example: 5. record_id (int): The ID of the record to update. json_body (DomainRecordRequest): If this is used to update an existing DomainRecord any values not provided will be retained. Provide empty strings to clear existing string diff --git a/lib/binarylane/api/failover_ips/__init__.py b/lib/binarylane/api/failover_ips/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/binarylane/api/failover_ips/get_v2_failover_ips_server_id.py b/lib/binarylane/api/failover_ips/get_v2_failover_ips_server_id.py deleted file mode 100644 index 219496ea..00000000 --- a/lib/binarylane/api/failover_ips/get_v2_failover_ips_server_id.py +++ /dev/null @@ -1,206 +0,0 @@ -from __future__ import annotations - -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from binarylane import errors -from binarylane.client import Client -from binarylane.models.failover_ips_response import FailoverIpsResponse -from binarylane.models.problem_details import ProblemDetails -from binarylane.types import UNSET, Response, Unset - - -def _get_kwargs( - server_id: int, - *, - client: Client, - page: Union[Unset, None, int] = 1, - per_page: Union[Unset, None, int] = 20, -) -> Dict[str, Any]: - url = "{}/v2/failover_ips/{server_id}".format(client.base_url, server_id=server_id) - - headers: Dict[str, str] = client.get_headers() - cookies: Dict[str, Any] = client.get_cookies() - - params: Dict[str, Any] = {} - params["page"] = page - - params["per_page"] = per_page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - return { - "method": "get", - "url": url, - "headers": headers, - "cookies": cookies, - "timeout": client.get_timeout(), - "params": params, - } - - -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[Any, FailoverIpsResponse, ProblemDetails]]: - if response.status_code == HTTPStatus.OK: - response_200 = FailoverIpsResponse.from_dict(response.json()) - - return response_200 - if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = ProblemDetails.from_dict(response.json()) - - return response_404 - if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = cast(Any, None) - return response_401 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}") - else: - return None - - -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[Any, FailoverIpsResponse, ProblemDetails]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - server_id: int, - *, - client: Client, - page: Union[Unset, None, int] = 1, - per_page: Union[Unset, None, int] = 20, -) -> Response[Union[Any, FailoverIpsResponse, ProblemDetails]]: - """Fetch the Failover IPs for a Server - - Args: - server_id (int): The target server id. - page (Union[Unset, None, int]): The selected page. Page numbering starts at 1 Default: 1. - per_page (Union[Unset, None, int]): The number of results to show per page. Default: 20. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, FailoverIpsResponse, ProblemDetails]] - """ - - kwargs = _get_kwargs( - server_id=server_id, - client=client, - page=page, - per_page=per_page, - ) - - response = httpx.request( - verify=client.verify_ssl, - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - server_id: int, - *, - client: Client, - page: Union[Unset, None, int] = 1, - per_page: Union[Unset, None, int] = 20, -) -> Optional[Union[Any, FailoverIpsResponse, ProblemDetails]]: - """Fetch the Failover IPs for a Server - - Args: - server_id (int): The target server id. - page (Union[Unset, None, int]): The selected page. Page numbering starts at 1 Default: 1. - per_page (Union[Unset, None, int]): The number of results to show per page. Default: 20. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, FailoverIpsResponse, ProblemDetails]] - """ - - return sync_detailed( - server_id=server_id, - client=client, - page=page, - per_page=per_page, - ).parsed - - -async def asyncio_detailed( - server_id: int, - *, - client: Client, - page: Union[Unset, None, int] = 1, - per_page: Union[Unset, None, int] = 20, -) -> Response[Union[Any, FailoverIpsResponse, ProblemDetails]]: - """Fetch the Failover IPs for a Server - - Args: - server_id (int): The target server id. - page (Union[Unset, None, int]): The selected page. Page numbering starts at 1 Default: 1. - per_page (Union[Unset, None, int]): The number of results to show per page. Default: 20. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, FailoverIpsResponse, ProblemDetails]] - """ - - kwargs = _get_kwargs( - server_id=server_id, - client=client, - page=page, - per_page=per_page, - ) - - async with httpx.AsyncClient(verify=client.verify_ssl) as _client: - response = await _client.request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - server_id: int, - *, - client: Client, - page: Union[Unset, None, int] = 1, - per_page: Union[Unset, None, int] = 20, -) -> Optional[Union[Any, FailoverIpsResponse, ProblemDetails]]: - """Fetch the Failover IPs for a Server - - Args: - server_id (int): The target server id. - page (Union[Unset, None, int]): The selected page. Page numbering starts at 1 Default: 1. - per_page (Union[Unset, None, int]): The number of results to show per page. Default: 20. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, FailoverIpsResponse, ProblemDetails]] - """ - - return ( - await asyncio_detailed( - server_id=server_id, - client=client, - page=page, - per_page=per_page, - ) - ).parsed diff --git a/lib/binarylane/api/failover_ips/get_v2_failover_ips_server_id_available.py b/lib/binarylane/api/failover_ips/get_v2_failover_ips_server_id_available.py deleted file mode 100644 index ccfb4915..00000000 --- a/lib/binarylane/api/failover_ips/get_v2_failover_ips_server_id_available.py +++ /dev/null @@ -1,206 +0,0 @@ -from __future__ import annotations - -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from binarylane import errors -from binarylane.client import Client -from binarylane.models.failover_ips_response import FailoverIpsResponse -from binarylane.models.problem_details import ProblemDetails -from binarylane.types import UNSET, Response, Unset - - -def _get_kwargs( - server_id: int, - *, - client: Client, - page: Union[Unset, None, int] = 1, - per_page: Union[Unset, None, int] = 20, -) -> Dict[str, Any]: - url = "{}/v2/failover_ips/{server_id}/available".format(client.base_url, server_id=server_id) - - headers: Dict[str, str] = client.get_headers() - cookies: Dict[str, Any] = client.get_cookies() - - params: Dict[str, Any] = {} - params["page"] = page - - params["per_page"] = per_page - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - return { - "method": "get", - "url": url, - "headers": headers, - "cookies": cookies, - "timeout": client.get_timeout(), - "params": params, - } - - -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[Any, FailoverIpsResponse, ProblemDetails]]: - if response.status_code == HTTPStatus.OK: - response_200 = FailoverIpsResponse.from_dict(response.json()) - - return response_200 - if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = ProblemDetails.from_dict(response.json()) - - return response_404 - if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = cast(Any, None) - return response_401 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}") - else: - return None - - -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[Any, FailoverIpsResponse, ProblemDetails]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - server_id: int, - *, - client: Client, - page: Union[Unset, None, int] = 1, - per_page: Union[Unset, None, int] = 20, -) -> Response[Union[Any, FailoverIpsResponse, ProblemDetails]]: - """Fetch a List of all Failover IPs that are Available to be Assigned to a Server - - Args: - server_id (int): The target server id. - page (Union[Unset, None, int]): The selected page. Page numbering starts at 1 Default: 1. - per_page (Union[Unset, None, int]): The number of results to show per page. Default: 20. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, FailoverIpsResponse, ProblemDetails]] - """ - - kwargs = _get_kwargs( - server_id=server_id, - client=client, - page=page, - per_page=per_page, - ) - - response = httpx.request( - verify=client.verify_ssl, - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - server_id: int, - *, - client: Client, - page: Union[Unset, None, int] = 1, - per_page: Union[Unset, None, int] = 20, -) -> Optional[Union[Any, FailoverIpsResponse, ProblemDetails]]: - """Fetch a List of all Failover IPs that are Available to be Assigned to a Server - - Args: - server_id (int): The target server id. - page (Union[Unset, None, int]): The selected page. Page numbering starts at 1 Default: 1. - per_page (Union[Unset, None, int]): The number of results to show per page. Default: 20. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, FailoverIpsResponse, ProblemDetails]] - """ - - return sync_detailed( - server_id=server_id, - client=client, - page=page, - per_page=per_page, - ).parsed - - -async def asyncio_detailed( - server_id: int, - *, - client: Client, - page: Union[Unset, None, int] = 1, - per_page: Union[Unset, None, int] = 20, -) -> Response[Union[Any, FailoverIpsResponse, ProblemDetails]]: - """Fetch a List of all Failover IPs that are Available to be Assigned to a Server - - Args: - server_id (int): The target server id. - page (Union[Unset, None, int]): The selected page. Page numbering starts at 1 Default: 1. - per_page (Union[Unset, None, int]): The number of results to show per page. Default: 20. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, FailoverIpsResponse, ProblemDetails]] - """ - - kwargs = _get_kwargs( - server_id=server_id, - client=client, - page=page, - per_page=per_page, - ) - - async with httpx.AsyncClient(verify=client.verify_ssl) as _client: - response = await _client.request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - server_id: int, - *, - client: Client, - page: Union[Unset, None, int] = 1, - per_page: Union[Unset, None, int] = 20, -) -> Optional[Union[Any, FailoverIpsResponse, ProblemDetails]]: - """Fetch a List of all Failover IPs that are Available to be Assigned to a Server - - Args: - server_id (int): The target server id. - page (Union[Unset, None, int]): The selected page. Page numbering starts at 1 Default: 1. - per_page (Union[Unset, None, int]): The number of results to show per page. Default: 20. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, FailoverIpsResponse, ProblemDetails]] - """ - - return ( - await asyncio_detailed( - server_id=server_id, - client=client, - page=page, - per_page=per_page, - ) - ).parsed diff --git a/lib/binarylane/api/failover_ips/post_v2_failover_ips_server_id.py b/lib/binarylane/api/failover_ips/post_v2_failover_ips_server_id.py deleted file mode 100644 index 7d857a90..00000000 --- a/lib/binarylane/api/failover_ips/post_v2_failover_ips_server_id.py +++ /dev/null @@ -1,221 +0,0 @@ -from __future__ import annotations - -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from binarylane import errors -from binarylane.client import Client -from binarylane.models.action_response import ActionResponse -from binarylane.models.failover_ips_request import FailoverIpsRequest -from binarylane.models.problem_details import ProblemDetails -from binarylane.models.validation_problem_details import ValidationProblemDetails -from binarylane.types import Response - - -def _get_kwargs( - server_id: int, - *, - client: Client, - json_body: FailoverIpsRequest, -) -> Dict[str, Any]: - url = "{}/v2/failover_ips/{server_id}".format(client.base_url, server_id=server_id) - - headers: Dict[str, str] = client.get_headers() - cookies: Dict[str, Any] = client.get_cookies() - - json_json_body = json_body.to_dict() - - return { - "method": "post", - "url": url, - "headers": headers, - "cookies": cookies, - "timeout": client.get_timeout(), - "json": json_json_body, - } - - -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: - if response.status_code == HTTPStatus.OK: - response_200 = ActionResponse.from_dict(response.json()) - - return response_200 - if response.status_code == HTTPStatus.NO_CONTENT: - response_204 = cast(Any, None) - return response_204 - if response.status_code == HTTPStatus.BAD_REQUEST: - response_400 = ValidationProblemDetails.from_dict(response.json()) - - return response_400 - if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = ProblemDetails.from_dict(response.json()) - - return response_404 - if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = cast(Any, None) - return response_401 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}") - else: - return None - - -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - server_id: int, - *, - client: Client, - json_body: FailoverIpsRequest, -) -> Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: - """Sets the List of Failover IPs that are Assigned to a Server - - This overwrites the current list, i.e. submit the entire list, not just updates. - If NoContent is returned no changes were made. - If an action is returned the changes have been saved but the effect may not be complete until the - action is complete. If the action does not complete the network changes can be forced by rebooting - the server. - - Args: - server_id (int): The target server id. - json_body (FailoverIpsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]] - """ - - kwargs = _get_kwargs( - server_id=server_id, - client=client, - json_body=json_body, - ) - - response = httpx.request( - verify=client.verify_ssl, - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - server_id: int, - *, - client: Client, - json_body: FailoverIpsRequest, -) -> Optional[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: - """Sets the List of Failover IPs that are Assigned to a Server - - This overwrites the current list, i.e. submit the entire list, not just updates. - If NoContent is returned no changes were made. - If an action is returned the changes have been saved but the effect may not be complete until the - action is complete. If the action does not complete the network changes can be forced by rebooting - the server. - - Args: - server_id (int): The target server id. - json_body (FailoverIpsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]] - """ - - return sync_detailed( - server_id=server_id, - client=client, - json_body=json_body, - ).parsed - - -async def asyncio_detailed( - server_id: int, - *, - client: Client, - json_body: FailoverIpsRequest, -) -> Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: - """Sets the List of Failover IPs that are Assigned to a Server - - This overwrites the current list, i.e. submit the entire list, not just updates. - If NoContent is returned no changes were made. - If an action is returned the changes have been saved but the effect may not be complete until the - action is complete. If the action does not complete the network changes can be forced by rebooting - the server. - - Args: - server_id (int): The target server id. - json_body (FailoverIpsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]] - """ - - kwargs = _get_kwargs( - server_id=server_id, - client=client, - json_body=json_body, - ) - - async with httpx.AsyncClient(verify=client.verify_ssl) as _client: - response = await _client.request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - server_id: int, - *, - client: Client, - json_body: FailoverIpsRequest, -) -> Optional[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: - """Sets the List of Failover IPs that are Assigned to a Server - - This overwrites the current list, i.e. submit the entire list, not just updates. - If NoContent is returned no changes were made. - If an action is returned the changes have been saved but the effect may not be complete until the - action is complete. If the action does not complete the network changes can be forced by rebooting - the server. - - Args: - server_id (int): The target server id. - json_body (FailoverIpsRequest): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]] - """ - - return ( - await asyncio_detailed( - server_id=server_id, - client=client, - json_body=json_body, - ) - ).parsed diff --git a/lib/binarylane/api/images/get_v2_images_image_id_download.py b/lib/binarylane/api/images/get_v2_images_image_id_download.py index 49354a9c..5fe28081 100644 --- a/lib/binarylane/api/images/get_v2_images_image_id_download.py +++ b/lib/binarylane/api/images/get_v2_images_image_id_download.py @@ -9,6 +9,7 @@ from binarylane.client import Client from binarylane.models.image_download_response import ImageDownloadResponse from binarylane.models.problem_details import ProblemDetails +from binarylane.models.validation_problem_details import ValidationProblemDetails from binarylane.types import Response @@ -33,11 +34,15 @@ def _get_kwargs( def _parse_response( *, client: Client, response: httpx.Response -) -> Optional[Union[Any, ImageDownloadResponse, ProblemDetails]]: +) -> Optional[Union[Any, ImageDownloadResponse, ProblemDetails, ValidationProblemDetails]]: if response.status_code == HTTPStatus.OK: response_200 = ImageDownloadResponse.from_dict(response.json()) return response_200 + if response.status_code == HTTPStatus.BAD_REQUEST: + response_400 = ValidationProblemDetails.from_dict(response.json()) + + return response_400 if response.status_code == HTTPStatus.NOT_FOUND: response_404 = ProblemDetails.from_dict(response.json()) @@ -53,7 +58,7 @@ def _parse_response( def _build_response( *, client: Client, response: httpx.Response -) -> Response[Union[Any, ImageDownloadResponse, ProblemDetails]]: +) -> Response[Union[Any, ImageDownloadResponse, ProblemDetails, ValidationProblemDetails]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,7 +71,7 @@ def sync_detailed( image_id: int, *, client: Client, -) -> Response[Union[Any, ImageDownloadResponse, ProblemDetails]]: +) -> Response[Union[Any, ImageDownloadResponse, ProblemDetails, ValidationProblemDetails]]: """Download an Existing Image Only user created backup images are currently available for download. @@ -79,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ImageDownloadResponse, ProblemDetails]] + Response[Union[Any, ImageDownloadResponse, ProblemDetails, ValidationProblemDetails]] """ kwargs = _get_kwargs( @@ -99,7 +104,7 @@ def sync( image_id: int, *, client: Client, -) -> Optional[Union[Any, ImageDownloadResponse, ProblemDetails]]: +) -> Optional[Union[Any, ImageDownloadResponse, ProblemDetails, ValidationProblemDetails]]: """Download an Existing Image Only user created backup images are currently available for download. @@ -112,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ImageDownloadResponse, ProblemDetails]] + Response[Union[Any, ImageDownloadResponse, ProblemDetails, ValidationProblemDetails]] """ return sync_detailed( @@ -125,7 +130,7 @@ async def asyncio_detailed( image_id: int, *, client: Client, -) -> Response[Union[Any, ImageDownloadResponse, ProblemDetails]]: +) -> Response[Union[Any, ImageDownloadResponse, ProblemDetails, ValidationProblemDetails]]: """Download an Existing Image Only user created backup images are currently available for download. @@ -138,7 +143,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ImageDownloadResponse, ProblemDetails]] + Response[Union[Any, ImageDownloadResponse, ProblemDetails, ValidationProblemDetails]] """ kwargs = _get_kwargs( @@ -156,7 +161,7 @@ async def asyncio( image_id: int, *, client: Client, -) -> Optional[Union[Any, ImageDownloadResponse, ProblemDetails]]: +) -> Optional[Union[Any, ImageDownloadResponse, ProblemDetails, ValidationProblemDetails]]: """Download an Existing Image Only user created backup images are currently available for download. @@ -169,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, ImageDownloadResponse, ProblemDetails]] + Response[Union[Any, ImageDownloadResponse, ProblemDetails, ValidationProblemDetails]] """ return ( diff --git a/lib/binarylane/api/load_balancers/delete_v2_load_balancers_load_balancer_id_servers.py b/lib/binarylane/api/load_balancers/delete_v2_load_balancers_load_balancer_id_servers.py index 6923bdca..80a27ba1 100644 --- a/lib/binarylane/api/load_balancers/delete_v2_load_balancers_load_balancer_id_servers.py +++ b/lib/binarylane/api/load_balancers/delete_v2_load_balancers_load_balancer_id_servers.py @@ -50,10 +50,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/load_balancers/post_v2_load_balancers.py b/lib/binarylane/api/load_balancers/post_v2_load_balancers.py index 576e31a3..67176c76 100644 --- a/lib/binarylane/api/load_balancers/post_v2_load_balancers.py +++ b/lib/binarylane/api/load_balancers/post_v2_load_balancers.py @@ -9,7 +9,6 @@ from binarylane.client import Client from binarylane.models.create_load_balancer_request import CreateLoadBalancerRequest from binarylane.models.create_load_balancer_response import CreateLoadBalancerResponse -from binarylane.models.problem_details import ProblemDetails from binarylane.models.validation_problem_details import ValidationProblemDetails from binarylane.types import Response @@ -38,7 +37,7 @@ def _get_kwargs( def _parse_response( *, client: Client, response: httpx.Response -) -> Optional[Union[Any, CreateLoadBalancerResponse, ProblemDetails, ValidationProblemDetails]]: +) -> Optional[Union[Any, CreateLoadBalancerResponse, ValidationProblemDetails]]: if response.status_code == HTTPStatus.OK: response_200 = CreateLoadBalancerResponse.from_dict(response.json()) @@ -47,10 +46,6 @@ def _parse_response( response_400 = ValidationProblemDetails.from_dict(response.json()) return response_400 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 @@ -62,7 +57,7 @@ def _parse_response( def _build_response( *, client: Client, response: httpx.Response -) -> Response[Union[Any, CreateLoadBalancerResponse, ProblemDetails, ValidationProblemDetails]]: +) -> Response[Union[Any, CreateLoadBalancerResponse, ValidationProblemDetails]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,7 +70,7 @@ def sync_detailed( *, client: Client, json_body: CreateLoadBalancerRequest, -) -> Response[Union[Any, CreateLoadBalancerResponse, ProblemDetails, ValidationProblemDetails]]: +) -> Response[Union[Any, CreateLoadBalancerResponse, ValidationProblemDetails]]: """Create a New Load Balancer Args: @@ -86,7 +81,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, CreateLoadBalancerResponse, ProblemDetails, ValidationProblemDetails]] + Response[Union[Any, CreateLoadBalancerResponse, ValidationProblemDetails]] """ kwargs = _get_kwargs( @@ -106,7 +101,7 @@ def sync( *, client: Client, json_body: CreateLoadBalancerRequest, -) -> Optional[Union[Any, CreateLoadBalancerResponse, ProblemDetails, ValidationProblemDetails]]: +) -> Optional[Union[Any, CreateLoadBalancerResponse, ValidationProblemDetails]]: """Create a New Load Balancer Args: @@ -117,7 +112,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, CreateLoadBalancerResponse, ProblemDetails, ValidationProblemDetails]] + Response[Union[Any, CreateLoadBalancerResponse, ValidationProblemDetails]] """ return sync_detailed( @@ -130,7 +125,7 @@ async def asyncio_detailed( *, client: Client, json_body: CreateLoadBalancerRequest, -) -> Response[Union[Any, CreateLoadBalancerResponse, ProblemDetails, ValidationProblemDetails]]: +) -> Response[Union[Any, CreateLoadBalancerResponse, ValidationProblemDetails]]: """Create a New Load Balancer Args: @@ -141,7 +136,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, CreateLoadBalancerResponse, ProblemDetails, ValidationProblemDetails]] + Response[Union[Any, CreateLoadBalancerResponse, ValidationProblemDetails]] """ kwargs = _get_kwargs( @@ -159,7 +154,7 @@ async def asyncio( *, client: Client, json_body: CreateLoadBalancerRequest, -) -> Optional[Union[Any, CreateLoadBalancerResponse, ProblemDetails, ValidationProblemDetails]]: +) -> Optional[Union[Any, CreateLoadBalancerResponse, ValidationProblemDetails]]: """Create a New Load Balancer Args: @@ -170,7 +165,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, CreateLoadBalancerResponse, ProblemDetails, ValidationProblemDetails]] + Response[Union[Any, CreateLoadBalancerResponse, ValidationProblemDetails]] """ return ( diff --git a/lib/binarylane/api/load_balancers/post_v2_load_balancers_load_balancer_id_servers.py b/lib/binarylane/api/load_balancers/post_v2_load_balancers_load_balancer_id_servers.py index 05ccf3ee..01f54857 100644 --- a/lib/binarylane/api/load_balancers/post_v2_load_balancers_load_balancer_id_servers.py +++ b/lib/binarylane/api/load_balancers/post_v2_load_balancers_load_balancer_id_servers.py @@ -50,10 +50,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/reverse_names/post_v2_reverse_names_ipv6.py b/lib/binarylane/api/reverse_names/post_v2_reverse_names_ipv6.py index c8be16af..980976d5 100644 --- a/lib/binarylane/api/reverse_names/post_v2_reverse_names_ipv6.py +++ b/lib/binarylane/api/reverse_names/post_v2_reverse_names_ipv6.py @@ -76,7 +76,7 @@ def sync_detailed( client: Client, json_body: ReverseNameserversRequest, ) -> Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: - """Create New or Update Existing IPv6 Name Server Records + """Create New or Update Existing Global IPv6 Name Server Records Args: json_body (ReverseNameserversRequest): @@ -107,7 +107,7 @@ def sync( client: Client, json_body: ReverseNameserversRequest, ) -> Optional[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: - """Create New or Update Existing IPv6 Name Server Records + """Create New or Update Existing Global IPv6 Name Server Records Args: json_body (ReverseNameserversRequest): @@ -131,7 +131,7 @@ async def asyncio_detailed( client: Client, json_body: ReverseNameserversRequest, ) -> Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: - """Create New or Update Existing IPv6 Name Server Records + """Create New or Update Existing Global IPv6 Name Server Records Args: json_body (ReverseNameserversRequest): @@ -160,7 +160,7 @@ async def asyncio( client: Client, json_body: ReverseNameserversRequest, ) -> Optional[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: - """Create New or Update Existing IPv6 Name Server Records + """Create New or Update Existing Global IPv6 Name Server Records Args: json_body (ReverseNameserversRequest): diff --git a/lib/binarylane/api/server_actions/post_v2_servers_server_id_actions.py b/lib/binarylane/api/server_actions/post_v2_servers_server_id_actions.py index ae3f42a4..c221bd75 100644 --- a/lib/binarylane/api/server_actions/post_v2_servers_server_id_actions.py +++ b/lib/binarylane/api/server_actions/post_v2_servers_server_id_actions.py @@ -260,10 +260,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_add_disk.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_add_disk.py index 3684e238..1b1883bd 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_add_disk.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_add_disk.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_attach_backup.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_attach_backup.py index 50d757a2..5b8c4520 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_attach_backup.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_attach_backup.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_advanced_features.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_advanced_features.py index 2a6ba1cd..f7abc11c 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_advanced_features.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_advanced_features.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_advanced_firewall_rules.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_advanced_firewall_rules.py index 43e77c6e..19c28965 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_advanced_firewall_rules.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_advanced_firewall_rules.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_backup_schedule.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_backup_schedule.py index c1992922..2f01c8a4 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_backup_schedule.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_backup_schedule.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_ipv_6.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_ipv_6.py index 26dfa93c..86ea4439 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_ipv_6.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_ipv_6.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_ipv_6_reverse_nameservers.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_ipv_6_reverse_nameservers.py index d3b1f170..7af823c8 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_ipv_6_reverse_nameservers.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_ipv_6_reverse_nameservers.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_kernel.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_kernel.py index 53674dc8..491af1de 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_kernel.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_kernel.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_manage_offsite_backup_copies.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_manage_offsite_backup_copies.py index 60d0f59e..125da4a9 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_manage_offsite_backup_copies.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_manage_offsite_backup_copies.py @@ -57,10 +57,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_network.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_network.py index bbab266c..afe65c3e 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_network.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_network.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_offsite_backup_location.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_offsite_backup_location.py index c7f609c1..1f6a0f8f 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_offsite_backup_location.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_offsite_backup_location.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_partner.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_partner.py index 17fb6faf..1530e22c 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_partner.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_partner.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_port_blocking.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_port_blocking.py index 204d4e33..5380377e 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_port_blocking.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_port_blocking.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_reverse_name.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_reverse_name.py index 38589c56..77ff6e23 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_reverse_name.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_reverse_name.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_separate_private_network_interface.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_separate_private_network_interface.py index 8c4ddec4..804c4543 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_separate_private_network_interface.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_separate_private_network_interface.py @@ -57,10 +57,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_source_and_destination_check.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_source_and_destination_check.py index 55495941..881c90c8 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_source_and_destination_check.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_source_and_destination_check.py @@ -57,10 +57,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_threshold_alerts.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_threshold_alerts.py index 047f7adc..59ec6450 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_threshold_alerts.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_threshold_alerts.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_vpc_ipv_4.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_vpc_ipv_4.py index 39fb1106..e57b9abb 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_vpc_ipv_4.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_vpc_ipv_4.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_clone_using_backup.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_clone_using_backup.py index 75990821..41c08f40 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_clone_using_backup.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_clone_using_backup.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_delete_disk.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_delete_disk.py index 1e64ce24..606d8cf1 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_delete_disk.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_delete_disk.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_detach_backup.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_detach_backup.py index ba011312..a9260a5c 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_detach_backup.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_detach_backup.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_disable_backups.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_disable_backups.py index 513e8762..67fb34df 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_disable_backups.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_disable_backups.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_disable_selinux.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_disable_selinux.py index bab7cfce..b2bb4034 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_disable_selinux.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_disable_selinux.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_enable_backups.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_enable_backups.py index 7394e9c0..3acdc5c6 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_enable_backups.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_enable_backups.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_enable_ipv_6.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_enable_ipv_6.py index faf9db74..44101854 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_enable_ipv_6.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_enable_ipv_6.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_is_running.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_is_running.py index 23641608..db2d7219 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_is_running.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_is_running.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_password_reset.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_password_reset.py index 46739d42..ac43fbac 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_password_reset.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_password_reset.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_ping.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_ping.py index 35f64cc2..96974861 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_ping.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_ping.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_power_cycle.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_power_cycle.py index 8c8e272d..1c456747 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_power_cycle.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_power_cycle.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_power_off.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_power_off.py index 447f3b43..71c384e0 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_power_off.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_power_off.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_power_on.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_power_on.py index 52569f24..592135cd 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_power_on.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_power_on.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_reboot.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_reboot.py index 4b65e9cd..9844d477 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_reboot.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_reboot.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_rebuild.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_rebuild.py index 8a5c59d8..2f91fadb 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_rebuild.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_rebuild.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_rename.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_rename.py index 900d99fe..f2a3e781 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_rename.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_rename.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_resize.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_resize.py index 8c89e1e3..0176ccb5 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_resize.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_resize.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_resize_disk.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_resize_disk.py index e1ab0337..1f947e1d 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_resize_disk.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_resize_disk.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_restore.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_restore.py index e6157d54..5129127a 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_restore.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_restore.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_shutdown.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_shutdown.py index 8910a271..9f87e9f0 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_shutdown.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_shutdown.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_take_backup.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_take_backup.py index eff729af..789eae2d 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_take_backup.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_take_backup.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_uncancel.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_uncancel.py index f6e24011..a8b335b5 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_uncancel.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_uncancel.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_uptime.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_uptime.py index 1f2b82be..fc7c7463 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_uptime.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_uptime.py @@ -55,10 +55,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/servers/post_v2_servers_server_id_backups.py b/lib/binarylane/api/servers/post_v2_servers_server_id_backups.py index 54c7d483..a0accec9 100644 --- a/lib/binarylane/api/servers/post_v2_servers_server_id_backups.py +++ b/lib/binarylane/api/servers/post_v2_servers_server_id_backups.py @@ -52,10 +52,6 @@ def _parse_response( response_404 = ProblemDetails.from_dict(response.json()) return response_404 - if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: - response_422 = ProblemDetails.from_dict(response.json()) - - return response_422 if response.status_code == HTTPStatus.UNAUTHORIZED: response_401 = cast(Any, None) return response_401 diff --git a/lib/binarylane/api/software/get_v2_software_operating_system_operating_system_id_or_slug.py b/lib/binarylane/api/software/get_v2_software_operating_system_operating_system_id_or_slug.py index 7a3b6467..117fc799 100644 --- a/lib/binarylane/api/software/get_v2_software_operating_system_operating_system_id_or_slug.py +++ b/lib/binarylane/api/software/get_v2_software_operating_system_operating_system_id_or_slug.py @@ -85,6 +85,11 @@ def sync_detailed( ) -> Response[Union[ProblemDetails, SoftwaresResponse, ValidationProblemDetails]]: """List All Available Software for an Existing Operating System + If any software for the operating system has a non null value for the group property, one (and only + one) of the software from each group must be selected. + There may be a software in each group with a licence_step_count value of -1 that may be selected to + indicate the software from that group is not required. + Args: operating_system_id_or_slug (Union[int, str]): The ID or slug of the operating system for which available software should be listed. Example: 5. @@ -123,6 +128,11 @@ def sync( ) -> Optional[Union[ProblemDetails, SoftwaresResponse, ValidationProblemDetails]]: """List All Available Software for an Existing Operating System + If any software for the operating system has a non null value for the group property, one (and only + one) of the software from each group must be selected. + There may be a software in each group with a licence_step_count value of -1 that may be selected to + indicate the software from that group is not required. + Args: operating_system_id_or_slug (Union[int, str]): The ID or slug of the operating system for which available software should be listed. Example: 5. @@ -154,6 +164,11 @@ async def asyncio_detailed( ) -> Response[Union[ProblemDetails, SoftwaresResponse, ValidationProblemDetails]]: """List All Available Software for an Existing Operating System + If any software for the operating system has a non null value for the group property, one (and only + one) of the software from each group must be selected. + There may be a software in each group with a licence_step_count value of -1 that may be selected to + indicate the software from that group is not required. + Args: operating_system_id_or_slug (Union[int, str]): The ID or slug of the operating system for which available software should be listed. Example: 5. @@ -190,6 +205,11 @@ async def asyncio( ) -> Optional[Union[ProblemDetails, SoftwaresResponse, ValidationProblemDetails]]: """List All Available Software for an Existing Operating System + If any software for the operating system has a non null value for the group property, one (and only + one) of the software from each group must be selected. + There may be a software in each group with a licence_step_count value of -1 that may be selected to + indicate the software from that group is not required. + Args: operating_system_id_or_slug (Union[int, str]): The ID or slug of the operating system for which available software should be listed. Example: 5. diff --git a/lib/binarylane/models/account.py b/lib/binarylane/models/account.py index a4c9f30b..ff4452b3 100644 --- a/lib/binarylane/models/account.py +++ b/lib/binarylane/models/account.py @@ -18,7 +18,9 @@ class Account: email (str): The email address registered for this account. email_verified (bool): Whether this account has been verified. Un-verified accounts are subject to some restrictions. - status (AccountStatus): + two_factor_authentication_enabled (bool): Whether this account has enabled two factor authentication. + status (AccountStatus): The status of this account. + | Value | Description | | ----- | ----------- | | incomplete | An account that exists but is not ready for use. The most common reason for this is a lack of @@ -35,6 +37,7 @@ class Account: email: str email_verified: bool + two_factor_authentication_enabled: bool status: AccountStatus tax_code: TaxCode configured_payment_methods: List[PaymentMethod] @@ -43,6 +46,7 @@ class Account: def to_dict(self) -> Dict[str, Any]: email = self.email email_verified = self.email_verified + two_factor_authentication_enabled = self.two_factor_authentication_enabled status = self.status.value tax_code = self.tax_code.to_dict() @@ -59,6 +63,7 @@ def to_dict(self) -> Dict[str, Any]: { "email": email, "email_verified": email_verified, + "two_factor_authentication_enabled": two_factor_authentication_enabled, "status": status, "tax_code": tax_code, "configured_payment_methods": configured_payment_methods, @@ -74,6 +79,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: email_verified = d.pop("email_verified") + two_factor_authentication_enabled = d.pop("two_factor_authentication_enabled") + status = AccountStatus(d.pop("status")) tax_code = TaxCode.from_dict(d.pop("tax_code")) @@ -88,6 +95,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: account = cls( email=email, email_verified=email_verified, + two_factor_authentication_enabled=two_factor_authentication_enabled, status=status, tax_code=tax_code, configured_payment_methods=configured_payment_methods, diff --git a/lib/binarylane/models/action.py b/lib/binarylane/models/action.py index 24411eef..e721e754 100644 --- a/lib/binarylane/models/action.py +++ b/lib/binarylane/models/action.py @@ -39,7 +39,7 @@ class Action: region (Union[Unset, None, Region]): The region (if any) of the resource associated with this action. region_slug (Union[Unset, None, str]): The region slug (if any) of the resource associated with this action. result_data (Union[Unset, None, str]): Returned information from a completed action. For example: a successful - completed 'ping' action will have the ping value in ms in this field. + completed 'uptime' action will have the uptime value in this field. blocking_invoice_id (Union[Unset, None, int]): If this Action is currently blocked by an invoice that requires payment this property will be set. user_interaction_required (Union[Unset, None, UserInteractionRequired]): If this is not null the action is diff --git a/lib/binarylane/models/backup_info.py b/lib/binarylane/models/backup_info.py index 77a935ad..17e3ae31 100644 --- a/lib/binarylane/models/backup_info.py +++ b/lib/binarylane/models/backup_info.py @@ -26,8 +26,8 @@ class BackupInfo: offsite (bool): If this is true, an attempt to create an offsite copy was made. This does not mean that the offsite copy attempt was successful or that the copy still exists. locked (bool): If this is true the backup is locked and cannot be replaced. - iso (bool): If this is true the backup is an ISO image and cannot be restored. ISO images may only be attached - for use as a boot disk or an additional disk. + iso (bool): If this is true the backup is an ISO image and cannot be restored or downloaded. ISO images may only + be attached for use as a boot disk or an additional disk. backup_disks (List[BackupDisk]): A list of the individual disks that make up this backup. """ diff --git a/lib/binarylane/models/domain.py b/lib/binarylane/models/domain.py index 8cd94eb0..40424ca3 100644 --- a/lib/binarylane/models/domain.py +++ b/lib/binarylane/models/domain.py @@ -13,6 +13,7 @@ class Domain: """ Attributes: + id (int): The ID of this domain. name (str): The name of the domain. current_nameservers (List[str]): The current authoritative name servers for this domain. zone_file (str): The zone file for the selected domain. If the DNS records for this domain are not managed @@ -21,6 +22,7 @@ class Domain: this domain are not managed locally this will be what the TTL would be if the authority was delegated to us. """ + id: int name: str current_nameservers: List[str] zone_file: str @@ -28,6 +30,7 @@ class Domain: additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + id = self.id name = self.name current_nameservers = self.current_nameservers @@ -38,6 +41,7 @@ def to_dict(self) -> Dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { + "id": id, "name": name, "current_nameservers": current_nameservers, "zone_file": zone_file, @@ -51,6 +55,8 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() + id = d.pop("id") + name = d.pop("name") current_nameservers = cast(List[str], d.pop("current_nameservers")) @@ -60,6 +66,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: ttl = d.pop("ttl", UNSET) domain = cls( + id=id, name=name, current_nameservers=current_nameservers, zone_file=zone_file, diff --git a/lib/binarylane/models/failover_ips_request.py b/lib/binarylane/models/failover_ips_request.py deleted file mode 100644 index ee584ec5..00000000 --- a/lib/binarylane/models/failover_ips_request.py +++ /dev/null @@ -1,60 +0,0 @@ -from __future__ import annotations - -from typing import Any, Dict, List, Type, TypeVar, cast - -import attr - -T = TypeVar("T", bound="FailoverIpsRequest") - - -@attr.s(auto_attribs=True) -class FailoverIpsRequest: - """ - Attributes: - failover_ips (List[str]): The list of failover IP addresses to assign to this server. This overwrites the - current list, so any current failover IP addresses that are omitted will be removed from the server. - """ - - failover_ips: List[str] - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - failover_ips = self.failover_ips - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "failover_ips": failover_ips, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - failover_ips = cast(List[str], d.pop("failover_ips")) - - failover_ips_request = cls( - failover_ips=failover_ips, - ) - - failover_ips_request.additional_properties = d - return failover_ips_request - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/lib/binarylane/models/failover_ips_response.py b/lib/binarylane/models/failover_ips_response.py deleted file mode 100644 index 3083b118..00000000 --- a/lib/binarylane/models/failover_ips_response.py +++ /dev/null @@ -1,89 +0,0 @@ -from __future__ import annotations - -from typing import Any, Dict, List, Type, TypeVar, Union, cast - -import attr - -from binarylane.models.links import Links -from binarylane.models.meta import Meta -from binarylane.types import UNSET, Unset - -T = TypeVar("T", bound="FailoverIpsResponse") - - -@attr.s(auto_attribs=True) -class FailoverIpsResponse: - """ - Attributes: - meta (Meta): Contains metadata about the response, currently this includes the total number of items. - failover_ips (List[str]): - links (Union[Unset, None, Links]): - """ - - meta: Meta - failover_ips: List[str] - links: Union[Unset, None, Links] = UNSET - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - meta = self.meta.to_dict() - - failover_ips = self.failover_ips - - links: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(self.links, Unset): - links = self.links.to_dict() if self.links else None - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "meta": meta, - "failover_ips": failover_ips, - } - ) - if links is not UNSET: - field_dict["links"] = links - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() - meta = Meta.from_dict(d.pop("meta")) - - failover_ips = cast(List[str], d.pop("failover_ips")) - - _links = d.pop("links", UNSET) - links: Union[Unset, None, Links] - if _links is None: - links = None - elif isinstance(_links, Unset): - links = UNSET - else: - links = Links.from_dict(_links) - - failover_ips_response = cls( - meta=meta, - failover_ips=failover_ips, - links=links, - ) - - failover_ips_response.additional_properties = d - return failover_ips_response - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/lib/binarylane/models/reverse_nameservers_request.py b/lib/binarylane/models/reverse_nameservers_request.py index 7f580274..0bf04fad 100644 --- a/lib/binarylane/models/reverse_nameservers_request.py +++ b/lib/binarylane/models/reverse_nameservers_request.py @@ -11,8 +11,8 @@ class ReverseNameserversRequest: """ Attributes: - reverse_nameservers (List[str]): A list of all IPv6 reverse name servers for this server. Any existing reverse - name servers that are omitted from the list will be removed from the server. + reverse_nameservers (List[str]): A list of IPv6 reverse name servers for all IPv6 enabled servers. Any existing + reverse name servers that are omitted from the list will be removed. """ reverse_nameservers: List[str] diff --git a/lib/binarylane/models/vm_machine_type.py b/lib/binarylane/models/vm_machine_type.py index 6332b427..dd329514 100644 --- a/lib/binarylane/models/vm_machine_type.py +++ b/lib/binarylane/models/vm_machine_type.py @@ -10,6 +10,7 @@ class VmMachineType(str, Enum): PC_I440FX_4POINT2 = "pc_i440fx_4point2" PC_I440FX_5POINT0 = "pc_i440fx_5point0" PC_I440FX_5POINT1 = "pc_i440fx_5point1" + PC_I440FX_7POINT2 = "pc_i440fx_7point2" def __str__(self) -> str: return str(self.value) diff --git a/src/binarylane/console/commands/api/__init__.py b/src/binarylane/console/commands/api/__init__.py index 019e8895..ead32548 100644 --- a/src/binarylane/console/commands/api/__init__.py +++ b/src/binarylane/console/commands/api/__init__.py @@ -122,21 +122,6 @@ def add_descriptor(module_path: str, name: str, description: str) -> None: "domain record delete", "Delete an Existing Domain Record", ) -add_descriptor( - ".commands.api.get_v2_failover_ips_server_id", - "server failover-ip get", - "Fetch the Failover IPs for a Server", -) -add_descriptor( - ".commands.api.post_v2_failover_ips_server_id", - "server failover-ip update", - "Sets the List of Failover IPs that are Assigned to a Server", -) -add_descriptor( - ".commands.api.get_v2_failover_ips_server_id_available", - "server failover-ip available", - "Fetch a List of all Failover IPs that are Available to be Assigned to a Server", -) add_descriptor( ".commands.api.get_v2_images", "image list", @@ -245,7 +230,7 @@ def add_descriptor(module_path: str, name: str, description: str) -> None: add_descriptor( ".commands.api.post_v2_reverse_names_ipv6", "server ipv6-ptr-ns update", - "Create New or Update Existing IPv6 Name Server Records", + "Create New or Update Existing Global IPv6 Name Server Records", ) add_descriptor( ".commands.api.get_v2_samplesets_server_id_latest", diff --git a/src/binarylane/console/commands/api/delete_v2_domains_domain_name.py b/src/binarylane/console/commands/api/delete_v2_domains_domain_name.py index 0161f7f8..63ebbcb1 100644 --- a/src/binarylane/console/commands/api/delete_v2_domains_domain_name.py +++ b/src/binarylane/console/commands/api/delete_v2_domains_domain_name.py @@ -14,9 +14,9 @@ class CommandRequest: - domain_name: str + domain_name: Union[int, str] - def __init__(self, domain_name: str) -> None: + def __init__(self, domain_name: Union[int, str]) -> None: self.domain_name = domain_name @@ -31,10 +31,10 @@ def create_mapping(self) -> Mapping: mapping.add( PrimitiveAttribute( "domain_name", - str, + Union[int, str], required=True, option_name=None, - description="""The name of the domain to delete.""", + description="""The name or domain ID of the domain to delete.""", ) ) diff --git a/src/binarylane/console/commands/api/delete_v2_domains_domain_name_records_record_id.py b/src/binarylane/console/commands/api/delete_v2_domains_domain_name_records_record_id.py index 569e260f..c0fc5359 100644 --- a/src/binarylane/console/commands/api/delete_v2_domains_domain_name_records_record_id.py +++ b/src/binarylane/console/commands/api/delete_v2_domains_domain_name_records_record_id.py @@ -14,10 +14,10 @@ class CommandRequest: - domain_name: str + domain_name: Union[int, str] record_id: int - def __init__(self, domain_name: str, record_id: int) -> None: + def __init__(self, domain_name: Union[int, str], record_id: int) -> None: self.domain_name = domain_name self.record_id = record_id @@ -33,10 +33,10 @@ def create_mapping(self) -> Mapping: mapping.add( PrimitiveAttribute( "domain_name", - str, + Union[int, str], required=True, option_name=None, - description="""The domain name for which the record should be deleted.""", + description="""The domain name or domain ID for which the record should be deleted.""", ) ) mapping.add( diff --git a/src/binarylane/console/commands/api/delete_v2_load_balancers_load_balancer_id_servers.py b/src/binarylane/console/commands/api/delete_v2_load_balancers_load_balancer_id_servers.py index 440cd710..8332c02f 100644 --- a/src/binarylane/console/commands/api/delete_v2_load_balancers_load_balancer_id_servers.py +++ b/src/binarylane/console/commands/api/delete_v2_load_balancers_load_balancer_id_servers.py @@ -70,7 +70,6 @@ def request( # HTTPStatus.NO_CONTENT: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( load_balancer_id=request.load_balancer_id, diff --git a/src/binarylane/console/commands/api/get_v2_actions.py b/src/binarylane/console/commands/api/get_v2_actions.py index e734e481..9e55b325 100644 --- a/src/binarylane/console/commands/api/get_v2_actions.py +++ b/src/binarylane/console/commands/api/get_v2_actions.py @@ -57,7 +57,7 @@ def fields(self) -> Dict[str, str]: "resource_id": """The resource id of the resource (if any) associated with this action.""", "region": """The region (if any) of the resource associated with this action.""", "region_slug": """The region slug (if any) of the resource associated with this action.""", - "result_data": """Returned information from a completed action. For example: a successful completed 'ping' action will have the ping value in ms in this field.""", + "result_data": """Returned information from a completed action. For example: a successful completed 'uptime' action will have the uptime value in this field.""", "blocking_invoice_id": """If this Action is currently blocked by an invoice that requires payment this property will be set.""", "user_interaction_required": """If this is not null the action is waiting on a response from the user.""", } diff --git a/src/binarylane/console/commands/api/get_v2_domains.py b/src/binarylane/console/commands/api/get_v2_domains.py index 17022eeb..2a97dbd4 100644 --- a/src/binarylane/console/commands/api/get_v2_domains.py +++ b/src/binarylane/console/commands/api/get_v2_domains.py @@ -30,6 +30,7 @@ def response(self, status_code: int, received: Any) -> None: @property def default_format(self) -> List[str]: return [ + "id", "name", "zone_file", ] @@ -37,6 +38,7 @@ def default_format(self) -> List[str]: @property def fields(self) -> Dict[str, str]: return { + "id": """The ID of this domain.""", "name": """The name of the domain.""", "current_nameservers": """The current authoritative name servers for this domain.""", "zone_file": """The zone file for the selected domain. If the DNS records for this domain are not managed locally this is what the zone file would be if the authority was delegated to us.""", diff --git a/src/binarylane/console/commands/api/get_v2_domains_domain_name.py b/src/binarylane/console/commands/api/get_v2_domains_domain_name.py index fd24fe6b..c1916ebb 100644 --- a/src/binarylane/console/commands/api/get_v2_domains_domain_name.py +++ b/src/binarylane/console/commands/api/get_v2_domains_domain_name.py @@ -15,9 +15,9 @@ class CommandRequest: - domain_name: str + domain_name: Union[int, str] - def __init__(self, domain_name: str) -> None: + def __init__(self, domain_name: Union[int, str]) -> None: self.domain_name = domain_name @@ -32,10 +32,10 @@ def create_mapping(self) -> Mapping: mapping.add( PrimitiveAttribute( "domain_name", - str, + Union[int, str], required=True, option_name=None, - description="""The name of the domain to fetch.""", + description="""The name or domain ID of the domain to fetch.""", ) ) diff --git a/src/binarylane/console/commands/api/get_v2_domains_domain_name_records.py b/src/binarylane/console/commands/api/get_v2_domains_domain_name_records.py index aeeec221..c81c9da1 100644 --- a/src/binarylane/console/commands/api/get_v2_domains_domain_name_records.py +++ b/src/binarylane/console/commands/api/get_v2_domains_domain_name_records.py @@ -18,11 +18,11 @@ class CommandRequest: - domain_name: str + domain_name: Union[int, str] type: Union[Unset, None, DomainRecordType] = UNSET name: Union[Unset, None, str] = UNSET - def __init__(self, domain_name: str) -> None: + def __init__(self, domain_name: Union[int, str]) -> None: self.domain_name = domain_name @@ -83,10 +83,10 @@ def create_mapping(self) -> Mapping: mapping.add( PrimitiveAttribute( "domain_name", - str, + Union[int, str], required=True, option_name=None, - description="""The domain name for which records should be listed.""", + description="""The domain name or domain ID for for which records should be listed.""", ) ) diff --git a/src/binarylane/console/commands/api/get_v2_domains_domain_name_records_record_id.py b/src/binarylane/console/commands/api/get_v2_domains_domain_name_records_record_id.py index 8a8910f6..1a4ecb8d 100644 --- a/src/binarylane/console/commands/api/get_v2_domains_domain_name_records_record_id.py +++ b/src/binarylane/console/commands/api/get_v2_domains_domain_name_records_record_id.py @@ -15,10 +15,10 @@ class CommandRequest: - domain_name: str + domain_name: Union[int, str] record_id: int - def __init__(self, domain_name: str, record_id: int) -> None: + def __init__(self, domain_name: Union[int, str], record_id: int) -> None: self.domain_name = domain_name self.record_id = record_id @@ -34,10 +34,10 @@ def create_mapping(self) -> Mapping: mapping.add( PrimitiveAttribute( "domain_name", - str, + Union[int, str], required=True, option_name=None, - description="""The domain name for which the record should be fetched.""", + description="""The domain name or domain ID for for which the record should be fetched.""", ) ) mapping.add( diff --git a/src/binarylane/console/commands/api/get_v2_failover_ips_server_id.py b/src/binarylane/console/commands/api/get_v2_failover_ips_server_id.py deleted file mode 100644 index 8bc80cc8..00000000 --- a/src/binarylane/console/commands/api/get_v2_failover_ips_server_id.py +++ /dev/null @@ -1,92 +0,0 @@ -from __future__ import annotations - -from http import HTTPStatus -from typing import TYPE_CHECKING, Optional, Tuple, Union - -from binarylane.api.failover_ips.get_v2_failover_ips_server_id import sync_detailed -from binarylane.models.failover_ips_response import FailoverIpsResponse -from binarylane.models.links import Links -from binarylane.models.problem_details import ProblemDetails - -if TYPE_CHECKING: - from binarylane.client import Client - -import binarylane.console.commands.api.get_v2_servers as api_get_v2_servers -from binarylane.console.parser import Mapping, PrimitiveAttribute -from binarylane.console.runners.command import CommandRunner - - -class CommandRequest: - server_id: int - - def __init__(self, server_id: int) -> None: - self.server_id = server_id - - -class Command(CommandRunner): - @property - def reference_url(self) -> str: - return "https://api.binarylane.com.au/reference/#tag/FailoverIps/paths/~1v2~1failover_ips~1%7Bserver_id%7D/get" - - def create_mapping(self) -> Mapping: - mapping = Mapping(CommandRequest) - - def lookup_server_id(ref: str) -> Union[None, int]: - return api_get_v2_servers.Command(self._context).lookup(ref) - - mapping.add( - PrimitiveAttribute( - "server_id", - int, - required=True, - option_name=None, - metavar="server", - description="""The target server id or name.""", - lookup=lookup_server_id, - ) - ) - - return mapping - - @property - def ok_response_type(self) -> type: - return FailoverIpsResponse - - def request( - self, - client: Client, - request: object, - ) -> Tuple[HTTPStatus, Union[None, FailoverIpsResponse, ProblemDetails]]: - assert isinstance(request, CommandRequest) - - # HTTPStatus.OK: FailoverIpsResponse - # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNAUTHORIZED: Any - page = 0 - per_page = 25 - has_next = True - response: Optional[FailoverIpsResponse] = None - - while has_next: - page += 1 - page_response = sync_detailed( - server_id=request.server_id, - client=client, - page=page, - per_page=per_page, - ) - - status_code = page_response.status_code - if status_code != 200: - return status_code, page_response.parsed - - assert isinstance(page_response.parsed, FailoverIpsResponse) - has_next = isinstance(page_response.parsed.links, Links) and isinstance( - page_response.parsed.links.pages.next_, str - ) - if not response: - response = page_response.parsed - else: - response.failover_ips += page_response.parsed.failover_ips - - return status_code, response diff --git a/src/binarylane/console/commands/api/get_v2_failover_ips_server_id_available.py b/src/binarylane/console/commands/api/get_v2_failover_ips_server_id_available.py deleted file mode 100644 index 9827c07c..00000000 --- a/src/binarylane/console/commands/api/get_v2_failover_ips_server_id_available.py +++ /dev/null @@ -1,92 +0,0 @@ -from __future__ import annotations - -from http import HTTPStatus -from typing import TYPE_CHECKING, Optional, Tuple, Union - -from binarylane.api.failover_ips.get_v2_failover_ips_server_id_available import sync_detailed -from binarylane.models.failover_ips_response import FailoverIpsResponse -from binarylane.models.links import Links -from binarylane.models.problem_details import ProblemDetails - -if TYPE_CHECKING: - from binarylane.client import Client - -import binarylane.console.commands.api.get_v2_servers as api_get_v2_servers -from binarylane.console.parser import Mapping, PrimitiveAttribute -from binarylane.console.runners.command import CommandRunner - - -class CommandRequest: - server_id: int - - def __init__(self, server_id: int) -> None: - self.server_id = server_id - - -class Command(CommandRunner): - @property - def reference_url(self) -> str: - return "https://api.binarylane.com.au/reference/#tag/FailoverIps/paths/~1v2~1failover_ips~1%7Bserver_id%7D~1available/get" - - def create_mapping(self) -> Mapping: - mapping = Mapping(CommandRequest) - - def lookup_server_id(ref: str) -> Union[None, int]: - return api_get_v2_servers.Command(self._context).lookup(ref) - - mapping.add( - PrimitiveAttribute( - "server_id", - int, - required=True, - option_name=None, - metavar="server", - description="""The target server id or name.""", - lookup=lookup_server_id, - ) - ) - - return mapping - - @property - def ok_response_type(self) -> type: - return FailoverIpsResponse - - def request( - self, - client: Client, - request: object, - ) -> Tuple[HTTPStatus, Union[None, FailoverIpsResponse, ProblemDetails]]: - assert isinstance(request, CommandRequest) - - # HTTPStatus.OK: FailoverIpsResponse - # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNAUTHORIZED: Any - page = 0 - per_page = 25 - has_next = True - response: Optional[FailoverIpsResponse] = None - - while has_next: - page += 1 - page_response = sync_detailed( - server_id=request.server_id, - client=client, - page=page, - per_page=per_page, - ) - - status_code = page_response.status_code - if status_code != 200: - return status_code, page_response.parsed - - assert isinstance(page_response.parsed, FailoverIpsResponse) - has_next = isinstance(page_response.parsed.links, Links) and isinstance( - page_response.parsed.links.pages.next_, str - ) - if not response: - response = page_response.parsed - else: - response.failover_ips += page_response.parsed.failover_ips - - return status_code, response diff --git a/src/binarylane/console/commands/api/get_v2_images_image_id_download.py b/src/binarylane/console/commands/api/get_v2_images_image_id_download.py index 37c8705d..ccf6a319 100644 --- a/src/binarylane/console/commands/api/get_v2_images_image_id_download.py +++ b/src/binarylane/console/commands/api/get_v2_images_image_id_download.py @@ -6,6 +6,7 @@ from binarylane.api.images.get_v2_images_image_id_download import sync_detailed from binarylane.models.image_download_response import ImageDownloadResponse from binarylane.models.problem_details import ProblemDetails +from binarylane.models.validation_problem_details import ValidationProblemDetails if TYPE_CHECKING: from binarylane.client import Client @@ -49,10 +50,11 @@ def request( self, client: Client, request: object, - ) -> Tuple[HTTPStatus, Union[None, ImageDownloadResponse, ProblemDetails]]: + ) -> Tuple[HTTPStatus, Union[None, ImageDownloadResponse, ProblemDetails, ValidationProblemDetails]]: assert isinstance(request, CommandRequest) # HTTPStatus.OK: ImageDownloadResponse + # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( diff --git a/src/binarylane/console/commands/api/get_v2_servers_server_id_actions.py b/src/binarylane/console/commands/api/get_v2_servers_server_id_actions.py index c64efe70..a03dc846 100644 --- a/src/binarylane/console/commands/api/get_v2_servers_server_id_actions.py +++ b/src/binarylane/console/commands/api/get_v2_servers_server_id_actions.py @@ -62,7 +62,7 @@ def fields(self) -> Dict[str, str]: "resource_id": """The resource id of the resource (if any) associated with this action.""", "region": """The region (if any) of the resource associated with this action.""", "region_slug": """The region slug (if any) of the resource associated with this action.""", - "result_data": """Returned information from a completed action. For example: a successful completed 'ping' action will have the ping value in ms in this field.""", + "result_data": """Returned information from a completed action. For example: a successful completed 'uptime' action will have the uptime value in this field.""", "blocking_invoice_id": """If this Action is currently blocked by an invoice that requires payment this property will be set.""", "user_interaction_required": """If this is not null the action is waiting on a response from the user.""", } diff --git a/src/binarylane/console/commands/api/post_v2_domains_domain_name_records.py b/src/binarylane/console/commands/api/post_v2_domains_domain_name_records.py index 49eb3271..2a9485ca 100644 --- a/src/binarylane/console/commands/api/post_v2_domains_domain_name_records.py +++ b/src/binarylane/console/commands/api/post_v2_domains_domain_name_records.py @@ -19,10 +19,10 @@ class CommandRequest: - domain_name: str + domain_name: Union[int, str] json_body: DomainRecordRequest - def __init__(self, domain_name: str, json_body: DomainRecordRequest) -> None: + def __init__(self, domain_name: Union[int, str], json_body: DomainRecordRequest) -> None: self.domain_name = domain_name self.json_body = json_body @@ -40,10 +40,10 @@ def create_mapping(self) -> Mapping: mapping.add( PrimitiveAttribute( "domain_name", - str, + Union[int, str], required=True, option_name=None, - description="""The domain name for which the record should be created.""", + description="""The domain name or domain ID for for which the record should be created.""", ) ) diff --git a/src/binarylane/console/commands/api/post_v2_failover_ips_server_id.py b/src/binarylane/console/commands/api/post_v2_failover_ips_server_id.py deleted file mode 100644 index 7956e4fb..00000000 --- a/src/binarylane/console/commands/api/post_v2_failover_ips_server_id.py +++ /dev/null @@ -1,87 +0,0 @@ -from __future__ import annotations - -from http import HTTPStatus -from typing import TYPE_CHECKING, List, Tuple, Union - -from binarylane.api.failover_ips.post_v2_failover_ips_server_id import sync_detailed -from binarylane.models.action_response import ActionResponse -from binarylane.models.failover_ips_request import FailoverIpsRequest -from binarylane.models.problem_details import ProblemDetails -from binarylane.models.validation_problem_details import ValidationProblemDetails - -if TYPE_CHECKING: - from binarylane.client import Client - -import binarylane.console.commands.api.get_v2_servers as api_get_v2_servers -from binarylane.console.parser import Mapping, PrimitiveAttribute -from binarylane.console.runners.action import ActionRunner - - -class CommandRequest: - server_id: int - json_body: FailoverIpsRequest - - def __init__(self, server_id: int, json_body: FailoverIpsRequest) -> None: - self.server_id = server_id - self.json_body = json_body - - -class Command(ActionRunner): - @property - def reference_url(self) -> str: - return "https://api.binarylane.com.au/reference/#tag/FailoverIps/paths/~1v2~1failover_ips~1%7Bserver_id%7D/post" - - def create_mapping(self) -> Mapping: - mapping = Mapping(CommandRequest) - - def lookup_server_id(ref: str) -> Union[None, int]: - return api_get_v2_servers.Command(self._context).lookup(ref) - - mapping.add( - PrimitiveAttribute( - "server_id", - int, - required=True, - option_name=None, - metavar="server", - description="""The target server id or name.""", - lookup=lookup_server_id, - ) - ) - - json_body = mapping.add_json_body(FailoverIpsRequest) - - json_body.add( - PrimitiveAttribute( - "failover_ips", - List[str], - required=True, - option_name="failover-ips", - description="""The list of failover IP addresses to assign to this server. This overwrites the current list, so any current failover IP addresses that are omitted will be removed from the server.""", - ) - ) - - return mapping - - @property - def ok_response_type(self) -> type: - return ActionResponse - - def request( - self, - client: Client, - request: object, - ) -> Tuple[HTTPStatus, Union[ActionResponse, None, ProblemDetails, ValidationProblemDetails]]: - assert isinstance(request, CommandRequest) - - # HTTPStatus.OK: ActionResponse - # HTTPStatus.NO_CONTENT: Any - # HTTPStatus.BAD_REQUEST: ValidationProblemDetails - # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNAUTHORIZED: Any - page_response = sync_detailed( - server_id=request.server_id, - client=client, - json_body=request.json_body, - ) - return page_response.status_code, page_response.parsed diff --git a/src/binarylane/console/commands/api/post_v2_load_balancers.py b/src/binarylane/console/commands/api/post_v2_load_balancers.py index f2c38da9..cbfa0882 100644 --- a/src/binarylane/console/commands/api/post_v2_load_balancers.py +++ b/src/binarylane/console/commands/api/post_v2_load_balancers.py @@ -10,7 +10,6 @@ from binarylane.models.health_check import HealthCheck from binarylane.models.health_check_protocol import HealthCheckProtocol from binarylane.models.load_balancer_rule_protocol import LoadBalancerRuleProtocol -from binarylane.models.problem_details import ProblemDetails from binarylane.models.validation_problem_details import ValidationProblemDetails from binarylane.types import Unset @@ -128,12 +127,11 @@ def request( self, client: Client, request: object, - ) -> Tuple[HTTPStatus, Union[None, CreateLoadBalancerResponse, ProblemDetails, ValidationProblemDetails]]: + ) -> Tuple[HTTPStatus, Union[None, CreateLoadBalancerResponse, ValidationProblemDetails]]: assert isinstance(request, CommandRequest) # HTTPStatus.OK: CreateLoadBalancerResponse # HTTPStatus.BAD_REQUEST: ValidationProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( client=client, diff --git a/src/binarylane/console/commands/api/post_v2_load_balancers_load_balancer_id_servers.py b/src/binarylane/console/commands/api/post_v2_load_balancers_load_balancer_id_servers.py index fd60bba8..c355f8d5 100644 --- a/src/binarylane/console/commands/api/post_v2_load_balancers_load_balancer_id_servers.py +++ b/src/binarylane/console/commands/api/post_v2_load_balancers_load_balancer_id_servers.py @@ -70,7 +70,6 @@ def request( # HTTPStatus.NO_CONTENT: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( load_balancer_id=request.load_balancer_id, diff --git a/src/binarylane/console/commands/api/post_v2_reverse_names_ipv6.py b/src/binarylane/console/commands/api/post_v2_reverse_names_ipv6.py index 31734c42..ee11eff0 100644 --- a/src/binarylane/console/commands/api/post_v2_reverse_names_ipv6.py +++ b/src/binarylane/console/commands/api/post_v2_reverse_names_ipv6.py @@ -39,7 +39,7 @@ def create_mapping(self) -> Mapping: List[str], required=True, option_name="reverse-nameservers", - description="""A list of all IPv6 reverse name servers for this server. Any existing reverse name servers that are omitted from the list will be removed from the server.""", + description="""A list of IPv6 reverse name servers for all IPv6 enabled servers. Any existing reverse name servers that are omitted from the list will be removed.""", ) ) diff --git a/src/binarylane/console/commands/api/post_v2_servers_server_id_backups.py b/src/binarylane/console/commands/api/post_v2_servers_server_id_backups.py index bbc6ffe9..6e9dfd23 100644 --- a/src/binarylane/console/commands/api/post_v2_servers_server_id_backups.py +++ b/src/binarylane/console/commands/api/post_v2_servers_server_id_backups.py @@ -120,7 +120,6 @@ def request( # HTTPStatus.OK: ActionResponse # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_add_disk.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_add_disk.py index d5ab7cf7..b935513d 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_add_disk.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_add_disk.py @@ -99,7 +99,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_attach_backup.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_attach_backup.py index f0c3b920..6858d73b 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_attach_backup.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_attach_backup.py @@ -88,7 +88,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_advanced_features.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_advanced_features.py index fa148aac..69ceced9 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_advanced_features.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_advanced_features.py @@ -142,7 +142,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_advanced_firewall_rules.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_advanced_firewall_rules.py index 13e55753..5f070136 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_advanced_firewall_rules.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_advanced_firewall_rules.py @@ -154,7 +154,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_backup_schedule.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_backup_schedule.py index 4425b26f..55d23cf0 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_backup_schedule.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_backup_schedule.py @@ -109,7 +109,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_ipv_6.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_ipv_6.py index 24c1ba5e..c3565d4f 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_ipv_6.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_ipv_6.py @@ -88,7 +88,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_ipv_6_reverse_nameservers.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_ipv_6_reverse_nameservers.py index 3686f6c9..bdf64495 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_ipv_6_reverse_nameservers.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_ipv_6_reverse_nameservers.py @@ -90,7 +90,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_kernel.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_kernel.py index d899e51b..2de7c2f3 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_kernel.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_kernel.py @@ -88,7 +88,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_manage_offsite_backup_copies.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_manage_offsite_backup_copies.py index 12e53ac7..76667c5a 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_manage_offsite_backup_copies.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_manage_offsite_backup_copies.py @@ -90,7 +90,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_network.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_network.py index 7ec35191..93662642 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_network.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_network.py @@ -89,7 +89,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_offsite_backup_location.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_offsite_backup_location.py index cdcc1fea..dd19aa1d 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_offsite_backup_location.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_offsite_backup_location.py @@ -91,7 +91,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_partner.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_partner.py index 75445304..48850993 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_partner.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_partner.py @@ -89,7 +89,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_port_blocking.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_port_blocking.py index 1c55926b..fd5ad719 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_port_blocking.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_port_blocking.py @@ -88,7 +88,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_reverse_name.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_reverse_name.py index 77430ae5..d5046a7c 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_reverse_name.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_reverse_name.py @@ -99,7 +99,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_separate_private_network_interface.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_separate_private_network_interface.py index 37df3389..0fe85412 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_separate_private_network_interface.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_separate_private_network_interface.py @@ -90,7 +90,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_source_and_destination_check.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_source_and_destination_check.py index acfed8c2..b0259736 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_source_and_destination_check.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_source_and_destination_check.py @@ -90,7 +90,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_threshold_alerts.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_threshold_alerts.py index d69c450a..4ea2de23 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_threshold_alerts.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_threshold_alerts.py @@ -132,7 +132,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_vpc_ipv_4.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_vpc_ipv_4.py index 6692ab16..af0477d3 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_vpc_ipv_4.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_vpc_ipv_4.py @@ -98,7 +98,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_clone_using_backup.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_clone_using_backup.py index fcc5f7d1..ec414ce7 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_clone_using_backup.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_clone_using_backup.py @@ -109,7 +109,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_delete_disk.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_delete_disk.py index 08edd1bb..1a0784c2 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_delete_disk.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_delete_disk.py @@ -88,7 +88,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_detach_backup.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_detach_backup.py index 4a208eec..56c736ce 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_detach_backup.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_detach_backup.py @@ -78,7 +78,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_disable_backups.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_disable_backups.py index 41906741..fceabada 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_disable_backups.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_disable_backups.py @@ -78,7 +78,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_disable_selinux.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_disable_selinux.py index 1564d58c..c782f537 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_disable_selinux.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_disable_selinux.py @@ -78,7 +78,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_enable_backups.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_enable_backups.py index 0b69556a..64cb682d 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_enable_backups.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_enable_backups.py @@ -78,7 +78,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_enable_ipv_6.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_enable_ipv_6.py index d9be9aa2..15e48662 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_enable_ipv_6.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_enable_ipv_6.py @@ -78,7 +78,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_is_running.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_is_running.py index f26070e9..5662c554 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_is_running.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_is_running.py @@ -78,7 +78,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_password_reset.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_password_reset.py index acfc1d08..84492026 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_password_reset.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_password_reset.py @@ -103,7 +103,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_ping.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_ping.py index 632ae1cd..9646da9d 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_ping.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_ping.py @@ -78,7 +78,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_power_cycle.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_power_cycle.py index 6a9b1a3b..e81003dc 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_power_cycle.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_power_cycle.py @@ -78,7 +78,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_power_off.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_power_off.py index 09917d85..6c85e64b 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_power_off.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_power_off.py @@ -78,7 +78,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_power_on.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_power_on.py index 6348912b..87417ebb 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_power_on.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_power_on.py @@ -78,7 +78,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_reboot.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_reboot.py index c0f2bd89..269a42d3 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_reboot.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_reboot.py @@ -78,7 +78,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_rebuild.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_rebuild.py index 8b1b33f0..6844b045 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_rebuild.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_rebuild.py @@ -142,7 +142,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_rename.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_rename.py index 63bb3866..fe0b69b2 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_rename.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_rename.py @@ -88,7 +88,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_resize.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_resize.py index 8f8735e9..cb0c3079 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_resize.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_resize.py @@ -392,7 +392,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_resize_disk.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_resize_disk.py index e810ec72..a8099a7d 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_resize_disk.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_resize_disk.py @@ -98,7 +98,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_restore.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_restore.py index 5dbc27b7..f18762f3 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_restore.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_restore.py @@ -88,7 +88,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_shutdown.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_shutdown.py index e40a9d3c..5227a66e 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_shutdown.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_shutdown.py @@ -78,7 +78,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_take_backup.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_take_backup.py index 92a925f5..affa2d10 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_take_backup.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_take_backup.py @@ -121,7 +121,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_uncancel.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_uncancel.py index 4d603781..027ed0bb 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_uncancel.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_uncancel.py @@ -78,7 +78,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_uptime.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_uptime.py index 6743e220..e8d5784e 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_uptime.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_uptime.py @@ -78,7 +78,6 @@ def request( # HTTPStatus.ACCEPTED: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails - # HTTPStatus.UNPROCESSABLE_ENTITY: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any page_response = sync_detailed( server_id=request.server_id, diff --git a/src/binarylane/console/commands/api/put_v2_domains_domain_name_records_record_id.py b/src/binarylane/console/commands/api/put_v2_domains_domain_name_records_record_id.py index 70090245..66022d40 100644 --- a/src/binarylane/console/commands/api/put_v2_domains_domain_name_records_record_id.py +++ b/src/binarylane/console/commands/api/put_v2_domains_domain_name_records_record_id.py @@ -19,11 +19,11 @@ class CommandRequest: - domain_name: str + domain_name: Union[int, str] record_id: int json_body: DomainRecordRequest - def __init__(self, domain_name: str, record_id: int, json_body: DomainRecordRequest) -> None: + def __init__(self, domain_name: Union[int, str], record_id: int, json_body: DomainRecordRequest) -> None: self.domain_name = domain_name self.record_id = record_id self.json_body = json_body @@ -40,10 +40,10 @@ def create_mapping(self) -> Mapping: mapping.add( PrimitiveAttribute( "domain_name", - str, + Union[int, str], required=True, option_name=None, - description="""The domain name for which the record should be updated.""", + description="""The domain name or domain ID for for which the record should be updated.""", ) ) mapping.add( From 350e67aca1ab6d8ea371fd473febf24bb5f53894 Mon Sep 17 00:00:00 2001 From: Nathan O'Sullivan Date: Wed, 12 Feb 2025 14:49:12 +1000 Subject: [PATCH 2/2] ci: build static linux-x64 binary on tag --- .github/workflows/checks.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 03ade0ed..3bdc1d59 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -62,3 +62,37 @@ jobs: run: poetry run task test env: TASKIPY: true + + build-linux: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install binarylane-cli + run: pip install . + + - name: Install PyInstaller + run: pip install pyinstaller + + - name: Run PyInstaller + run: pyinstaller --name bl --onefile --copy-metadata binarylane-cli --collect-submodules binarylane src/binarylane/console/__main__.py + + - name: Install StaticX + run: pip install staticx + + - name: Install patchelf + run: sudo apt install -y patchelf + + - name: Run StaticX + run: staticx --strip --no-compress dist/bl dist/bl + + - uses: actions/upload-artifact@v3 + with: + name: linux-x64 + path: dist/*