diff --git a/scaleway-async/scaleway_async/ipam/v1/api.py b/scaleway-async/scaleway_async/ipam/v1/api.py index 19411d586..8bb766997 100644 --- a/scaleway-async/scaleway_async/ipam/v1/api.py +++ b/scaleway-async/scaleway_async/ipam/v1/api.py @@ -1,7 +1,7 @@ # This file was automatically generated. DO NOT EDIT. # If you have any remark or suggestion do not hesitate to open an issue. -from typing import List, Optional +from typing import Optional from scaleway_core.api import API from scaleway_core.bridge import ( @@ -53,7 +53,7 @@ async def book_ip( region: Optional[ScwRegion] = None, project_id: Optional[str] = None, address: Optional[str] = None, - tags: Optional[List[str]] = None, + tags: Optional[list[str]] = None, resource: Optional[CustomResource] = None, ) -> IP: """ @@ -138,7 +138,7 @@ async def release_ip_set( self, *, region: Optional[ScwRegion] = None, - ip_ids: Optional[List[str]] = None, + ip_ids: Optional[list[str]] = None, ) -> None: """ :param region: Region to target. If none is passed will use default region from the config. @@ -207,8 +207,8 @@ async def update_ip( *, ip_id: str, region: Optional[ScwRegion] = None, - tags: Optional[List[str]] = None, - reverses: Optional[List[Reverse]] = None, + tags: Optional[list[str]] = None, + reverses: Optional[list[Reverse]] = None, ) -> IP: """ Update an IP. @@ -264,14 +264,14 @@ async def list_i_ps( attached: Optional[bool] = None, resource_name: Optional[str] = None, resource_id: Optional[str] = None, - resource_ids: Optional[List[str]] = None, + resource_ids: Optional[list[str]] = None, resource_type: Optional[ResourceType] = None, - resource_types: Optional[List[ResourceType]] = None, + resource_types: Optional[list[ResourceType]] = None, mac_address: Optional[str] = None, - tags: Optional[List[str]] = None, + tags: Optional[list[str]] = None, organization_id: Optional[str] = None, is_ipv6: Optional[bool] = None, - ip_ids: Optional[List[str]] = None, + ip_ids: Optional[list[str]] = None, source_vpc_id: Optional[str] = None, ) -> ListIPsResponse: """ @@ -364,16 +364,16 @@ async def list_i_ps_all( attached: Optional[bool] = None, resource_name: Optional[str] = None, resource_id: Optional[str] = None, - resource_ids: Optional[List[str]] = None, + resource_ids: Optional[list[str]] = None, resource_type: Optional[ResourceType] = None, - resource_types: Optional[List[ResourceType]] = None, + resource_types: Optional[list[ResourceType]] = None, mac_address: Optional[str] = None, - tags: Optional[List[str]] = None, + tags: Optional[list[str]] = None, organization_id: Optional[str] = None, is_ipv6: Optional[bool] = None, - ip_ids: Optional[List[str]] = None, + ip_ids: Optional[list[str]] = None, source_vpc_id: Optional[str] = None, - ) -> List[IP]: + ) -> list[IP]: """ List existing IPs. List existing IPs in the specified region using various filters. For example, you can filter for IPs within a specified Private Network, or for public IPs within a specified Project. By default, the IPs returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. @@ -402,7 +402,7 @@ async def list_i_ps_all( :param ip_ids: IP IDs to filter for. Only IPs with these UUIDs will be returned. :param source_vpc_id: One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. - :return: :class:`List[IP] ` + :return: :class:`list[IP] ` Usage: :: diff --git a/scaleway-async/scaleway_async/ipam/v1/marshalling.py b/scaleway-async/scaleway_async/ipam/v1/marshalling.py index ac03e4575..0c99f36d4 100644 --- a/scaleway-async/scaleway_async/ipam/v1/marshalling.py +++ b/scaleway-async/scaleway_async/ipam/v1/marshalling.py @@ -1,7 +1,7 @@ # This file was automatically generated. DO NOT EDIT. # If you have any remark or suggestion do not hesitate to open an issue. -from typing import Any, Dict +from typing import Any from dateutil import parser from scaleway_core.profile import ProfileDefaults @@ -32,7 +32,7 @@ def unmarshal_Resource(data: Any) -> Resource: "Unmarshalling the type 'Resource' failed as data isn't a dictionary." ) - args: Dict[str, Any] = {} + args: dict[str, Any] = {} field = data.get("type", None) if field is not None: @@ -67,7 +67,7 @@ def unmarshal_Reverse(data: Any) -> Reverse: "Unmarshalling the type 'Reverse' failed as data isn't a dictionary." ) - args: Dict[str, Any] = {} + args: dict[str, Any] = {} field = data.get("hostname", None) if field is not None: @@ -90,7 +90,7 @@ def unmarshal_Source(data: Any) -> Source: "Unmarshalling the type 'Source' failed as data isn't a dictionary." ) - args: Dict[str, Any] = {} + args: dict[str, Any] = {} field = data.get("zonal", None) if field is not None: @@ -125,7 +125,7 @@ def unmarshal_IP(data: Any) -> IP: "Unmarshalling the type 'IP' failed as data isn't a dictionary." ) - args: Dict[str, Any] = {} + args: dict[str, Any] = {} field = data.get("id", None) if field is not None: @@ -210,7 +210,7 @@ def unmarshal_ListIPsResponse(data: Any) -> ListIPsResponse: "Unmarshalling the type 'ListIPsResponse' failed as data isn't a dictionary." ) - args: Dict[str, Any] = {} + args: dict[str, Any] = {} field = data.get("total_count", None) if field is not None: @@ -230,8 +230,8 @@ def unmarshal_ListIPsResponse(data: Any) -> ListIPsResponse: def marshal_CustomResource( request: CustomResource, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.mac_address is not None: output["mac_address"] = request.mac_address @@ -245,8 +245,8 @@ def marshal_CustomResource( def marshal_AttachIPRequest( request: AttachIPRequest, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.resource is not None: output["resource"] = marshal_CustomResource(request.resource, defaults) @@ -257,8 +257,8 @@ def marshal_AttachIPRequest( def marshal_Source( request: Source, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} output.update( resolve_one_of( [ @@ -284,8 +284,8 @@ def marshal_Source( def marshal_BookIPRequest( request: BookIPRequest, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.source is not None: output["source"] = marshal_Source(request.source, defaults) @@ -313,8 +313,8 @@ def marshal_BookIPRequest( def marshal_DetachIPRequest( request: DetachIPRequest, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.resource is not None: output["resource"] = marshal_CustomResource(request.resource, defaults) @@ -325,8 +325,8 @@ def marshal_DetachIPRequest( def marshal_MoveIPRequest( request: MoveIPRequest, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.from_resource is not None: output["from_resource"] = marshal_CustomResource( @@ -342,8 +342,8 @@ def marshal_MoveIPRequest( def marshal_ReleaseIPSetRequest( request: ReleaseIPSetRequest, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.ip_ids is not None: output["ip_ids"] = request.ip_ids @@ -354,8 +354,8 @@ def marshal_ReleaseIPSetRequest( def marshal_Reverse( request: Reverse, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.hostname is not None: output["hostname"] = request.hostname @@ -369,8 +369,8 @@ def marshal_Reverse( def marshal_UpdateIPRequest( request: UpdateIPRequest, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.tags is not None: output["tags"] = request.tags diff --git a/scaleway-async/scaleway_async/ipam/v1/types.py b/scaleway-async/scaleway_async/ipam/v1/types.py index 29da1b1f8..6f0599897 100644 --- a/scaleway-async/scaleway_async/ipam/v1/types.py +++ b/scaleway-async/scaleway_async/ipam/v1/types.py @@ -5,7 +5,7 @@ from dataclasses import dataclass, field from datetime import datetime from enum import Enum -from typing import List, Optional +from typing import Optional from scaleway_core.bridge import ( Region as ScwRegion, @@ -146,12 +146,12 @@ class IP: Defines whether the IP is an IPv6 (false = IPv4). """ - tags: List[str] + tags: list[str] """ Tags for the IP. """ - reverses: List[Reverse] + reverses: list[Reverse] """ Array of reverses associated with the IP. """ @@ -232,7 +232,7 @@ class BookIPRequest: The requested address should not include the subnet mask (/suffix). Note that only the Private Network source allows you to pick a specific IP. If the requested IP is already reserved, then the call will fail. """ - tags: Optional[List[str]] = field(default_factory=list) + tags: Optional[list[str]] = field(default_factory=list) """ Tags for the IP. """ @@ -321,7 +321,7 @@ class ListIPsRequest: Resource ID to filter for. Only IPs attached to this resource will be returned. """ - resource_ids: Optional[List[str]] = field(default_factory=list) + resource_ids: Optional[list[str]] = field(default_factory=list) """ Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned. """ @@ -331,7 +331,7 @@ class ListIPsRequest: Resource type to filter for. Only IPs attached to this type of resource will be returned. """ - resource_types: Optional[List[ResourceType]] = field(default_factory=list) + resource_types: Optional[list[ResourceType]] = field(default_factory=list) """ Resource types to filter for. Only IPs attached to these types of resources will be returned. """ @@ -341,7 +341,7 @@ class ListIPsRequest: MAC address to filter for. Only IPs attached to a resource with this MAC address will be returned. """ - tags: Optional[List[str]] = field(default_factory=list) + tags: Optional[list[str]] = field(default_factory=list) """ Tags to filter for, only IPs with one or more matching tags will be returned. """ @@ -356,7 +356,7 @@ class ListIPsRequest: Defines whether to filter only for IPv4s or IPv6s. """ - ip_ids: Optional[List[str]] = field(default_factory=list) + ip_ids: Optional[list[str]] = field(default_factory=list) """ IP IDs to filter for. Only IPs with these UUIDs will be returned. """ @@ -373,7 +373,7 @@ class ListIPsRequest: @dataclass class ListIPsResponse: total_count: int - ips: List[IP] + ips: list[IP] @dataclass @@ -419,7 +419,7 @@ class ReleaseIPSetRequest: Region to target. If none is passed will use default region from the config. """ - ip_ids: Optional[List[str]] = field(default_factory=list) + ip_ids: Optional[list[str]] = field(default_factory=list) @dataclass @@ -434,12 +434,12 @@ class UpdateIPRequest: Region to target. If none is passed will use default region from the config. """ - tags: Optional[List[str]] = field(default_factory=list) + tags: Optional[list[str]] = field(default_factory=list) """ Tags for the IP. """ - reverses: Optional[List[Reverse]] = field(default_factory=list) + reverses: Optional[list[Reverse]] = field(default_factory=list) """ Array of reverse domain names associated with an IP in the subnet of the current IP. """ diff --git a/scaleway/scaleway/ipam/v1/api.py b/scaleway/scaleway/ipam/v1/api.py index ad43dcd85..0c6580b2c 100644 --- a/scaleway/scaleway/ipam/v1/api.py +++ b/scaleway/scaleway/ipam/v1/api.py @@ -1,7 +1,7 @@ # This file was automatically generated. DO NOT EDIT. # If you have any remark or suggestion do not hesitate to open an issue. -from typing import List, Optional +from typing import Optional from scaleway_core.api import API from scaleway_core.bridge import ( @@ -53,7 +53,7 @@ def book_ip( region: Optional[ScwRegion] = None, project_id: Optional[str] = None, address: Optional[str] = None, - tags: Optional[List[str]] = None, + tags: Optional[list[str]] = None, resource: Optional[CustomResource] = None, ) -> IP: """ @@ -138,7 +138,7 @@ def release_ip_set( self, *, region: Optional[ScwRegion] = None, - ip_ids: Optional[List[str]] = None, + ip_ids: Optional[list[str]] = None, ) -> None: """ :param region: Region to target. If none is passed will use default region from the config. @@ -207,8 +207,8 @@ def update_ip( *, ip_id: str, region: Optional[ScwRegion] = None, - tags: Optional[List[str]] = None, - reverses: Optional[List[Reverse]] = None, + tags: Optional[list[str]] = None, + reverses: Optional[list[Reverse]] = None, ) -> IP: """ Update an IP. @@ -264,14 +264,14 @@ def list_i_ps( attached: Optional[bool] = None, resource_name: Optional[str] = None, resource_id: Optional[str] = None, - resource_ids: Optional[List[str]] = None, + resource_ids: Optional[list[str]] = None, resource_type: Optional[ResourceType] = None, - resource_types: Optional[List[ResourceType]] = None, + resource_types: Optional[list[ResourceType]] = None, mac_address: Optional[str] = None, - tags: Optional[List[str]] = None, + tags: Optional[list[str]] = None, organization_id: Optional[str] = None, is_ipv6: Optional[bool] = None, - ip_ids: Optional[List[str]] = None, + ip_ids: Optional[list[str]] = None, source_vpc_id: Optional[str] = None, ) -> ListIPsResponse: """ @@ -364,16 +364,16 @@ def list_i_ps_all( attached: Optional[bool] = None, resource_name: Optional[str] = None, resource_id: Optional[str] = None, - resource_ids: Optional[List[str]] = None, + resource_ids: Optional[list[str]] = None, resource_type: Optional[ResourceType] = None, - resource_types: Optional[List[ResourceType]] = None, + resource_types: Optional[list[ResourceType]] = None, mac_address: Optional[str] = None, - tags: Optional[List[str]] = None, + tags: Optional[list[str]] = None, organization_id: Optional[str] = None, is_ipv6: Optional[bool] = None, - ip_ids: Optional[List[str]] = None, + ip_ids: Optional[list[str]] = None, source_vpc_id: Optional[str] = None, - ) -> List[IP]: + ) -> list[IP]: """ List existing IPs. List existing IPs in the specified region using various filters. For example, you can filter for IPs within a specified Private Network, or for public IPs within a specified Project. By default, the IPs returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. @@ -402,7 +402,7 @@ def list_i_ps_all( :param ip_ids: IP IDs to filter for. Only IPs with these UUIDs will be returned. :param source_vpc_id: One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. - :return: :class:`List[IP] ` + :return: :class:`list[IP] ` Usage: :: diff --git a/scaleway/scaleway/ipam/v1/marshalling.py b/scaleway/scaleway/ipam/v1/marshalling.py index ac03e4575..0c99f36d4 100644 --- a/scaleway/scaleway/ipam/v1/marshalling.py +++ b/scaleway/scaleway/ipam/v1/marshalling.py @@ -1,7 +1,7 @@ # This file was automatically generated. DO NOT EDIT. # If you have any remark or suggestion do not hesitate to open an issue. -from typing import Any, Dict +from typing import Any from dateutil import parser from scaleway_core.profile import ProfileDefaults @@ -32,7 +32,7 @@ def unmarshal_Resource(data: Any) -> Resource: "Unmarshalling the type 'Resource' failed as data isn't a dictionary." ) - args: Dict[str, Any] = {} + args: dict[str, Any] = {} field = data.get("type", None) if field is not None: @@ -67,7 +67,7 @@ def unmarshal_Reverse(data: Any) -> Reverse: "Unmarshalling the type 'Reverse' failed as data isn't a dictionary." ) - args: Dict[str, Any] = {} + args: dict[str, Any] = {} field = data.get("hostname", None) if field is not None: @@ -90,7 +90,7 @@ def unmarshal_Source(data: Any) -> Source: "Unmarshalling the type 'Source' failed as data isn't a dictionary." ) - args: Dict[str, Any] = {} + args: dict[str, Any] = {} field = data.get("zonal", None) if field is not None: @@ -125,7 +125,7 @@ def unmarshal_IP(data: Any) -> IP: "Unmarshalling the type 'IP' failed as data isn't a dictionary." ) - args: Dict[str, Any] = {} + args: dict[str, Any] = {} field = data.get("id", None) if field is not None: @@ -210,7 +210,7 @@ def unmarshal_ListIPsResponse(data: Any) -> ListIPsResponse: "Unmarshalling the type 'ListIPsResponse' failed as data isn't a dictionary." ) - args: Dict[str, Any] = {} + args: dict[str, Any] = {} field = data.get("total_count", None) if field is not None: @@ -230,8 +230,8 @@ def unmarshal_ListIPsResponse(data: Any) -> ListIPsResponse: def marshal_CustomResource( request: CustomResource, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.mac_address is not None: output["mac_address"] = request.mac_address @@ -245,8 +245,8 @@ def marshal_CustomResource( def marshal_AttachIPRequest( request: AttachIPRequest, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.resource is not None: output["resource"] = marshal_CustomResource(request.resource, defaults) @@ -257,8 +257,8 @@ def marshal_AttachIPRequest( def marshal_Source( request: Source, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} output.update( resolve_one_of( [ @@ -284,8 +284,8 @@ def marshal_Source( def marshal_BookIPRequest( request: BookIPRequest, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.source is not None: output["source"] = marshal_Source(request.source, defaults) @@ -313,8 +313,8 @@ def marshal_BookIPRequest( def marshal_DetachIPRequest( request: DetachIPRequest, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.resource is not None: output["resource"] = marshal_CustomResource(request.resource, defaults) @@ -325,8 +325,8 @@ def marshal_DetachIPRequest( def marshal_MoveIPRequest( request: MoveIPRequest, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.from_resource is not None: output["from_resource"] = marshal_CustomResource( @@ -342,8 +342,8 @@ def marshal_MoveIPRequest( def marshal_ReleaseIPSetRequest( request: ReleaseIPSetRequest, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.ip_ids is not None: output["ip_ids"] = request.ip_ids @@ -354,8 +354,8 @@ def marshal_ReleaseIPSetRequest( def marshal_Reverse( request: Reverse, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.hostname is not None: output["hostname"] = request.hostname @@ -369,8 +369,8 @@ def marshal_Reverse( def marshal_UpdateIPRequest( request: UpdateIPRequest, defaults: ProfileDefaults, -) -> Dict[str, Any]: - output: Dict[str, Any] = {} +) -> dict[str, Any]: + output: dict[str, Any] = {} if request.tags is not None: output["tags"] = request.tags diff --git a/scaleway/scaleway/ipam/v1/types.py b/scaleway/scaleway/ipam/v1/types.py index 29da1b1f8..6f0599897 100644 --- a/scaleway/scaleway/ipam/v1/types.py +++ b/scaleway/scaleway/ipam/v1/types.py @@ -5,7 +5,7 @@ from dataclasses import dataclass, field from datetime import datetime from enum import Enum -from typing import List, Optional +from typing import Optional from scaleway_core.bridge import ( Region as ScwRegion, @@ -146,12 +146,12 @@ class IP: Defines whether the IP is an IPv6 (false = IPv4). """ - tags: List[str] + tags: list[str] """ Tags for the IP. """ - reverses: List[Reverse] + reverses: list[Reverse] """ Array of reverses associated with the IP. """ @@ -232,7 +232,7 @@ class BookIPRequest: The requested address should not include the subnet mask (/suffix). Note that only the Private Network source allows you to pick a specific IP. If the requested IP is already reserved, then the call will fail. """ - tags: Optional[List[str]] = field(default_factory=list) + tags: Optional[list[str]] = field(default_factory=list) """ Tags for the IP. """ @@ -321,7 +321,7 @@ class ListIPsRequest: Resource ID to filter for. Only IPs attached to this resource will be returned. """ - resource_ids: Optional[List[str]] = field(default_factory=list) + resource_ids: Optional[list[str]] = field(default_factory=list) """ Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned. """ @@ -331,7 +331,7 @@ class ListIPsRequest: Resource type to filter for. Only IPs attached to this type of resource will be returned. """ - resource_types: Optional[List[ResourceType]] = field(default_factory=list) + resource_types: Optional[list[ResourceType]] = field(default_factory=list) """ Resource types to filter for. Only IPs attached to these types of resources will be returned. """ @@ -341,7 +341,7 @@ class ListIPsRequest: MAC address to filter for. Only IPs attached to a resource with this MAC address will be returned. """ - tags: Optional[List[str]] = field(default_factory=list) + tags: Optional[list[str]] = field(default_factory=list) """ Tags to filter for, only IPs with one or more matching tags will be returned. """ @@ -356,7 +356,7 @@ class ListIPsRequest: Defines whether to filter only for IPv4s or IPv6s. """ - ip_ids: Optional[List[str]] = field(default_factory=list) + ip_ids: Optional[list[str]] = field(default_factory=list) """ IP IDs to filter for. Only IPs with these UUIDs will be returned. """ @@ -373,7 +373,7 @@ class ListIPsRequest: @dataclass class ListIPsResponse: total_count: int - ips: List[IP] + ips: list[IP] @dataclass @@ -419,7 +419,7 @@ class ReleaseIPSetRequest: Region to target. If none is passed will use default region from the config. """ - ip_ids: Optional[List[str]] = field(default_factory=list) + ip_ids: Optional[list[str]] = field(default_factory=list) @dataclass @@ -434,12 +434,12 @@ class UpdateIPRequest: Region to target. If none is passed will use default region from the config. """ - tags: Optional[List[str]] = field(default_factory=list) + tags: Optional[list[str]] = field(default_factory=list) """ Tags for the IP. """ - reverses: Optional[List[Reverse]] = field(default_factory=list) + reverses: Optional[list[Reverse]] = field(default_factory=list) """ Array of reverse domain names associated with an IP in the subnet of the current IP. """