Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions scaleway-async/scaleway_async/ipam/v1/api.py
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down Expand Up @@ -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:
"""
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
"""
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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] <List[IP]>`
:return: :class:`list[IP] <list[IP]>`

Usage:
::
Expand Down
48 changes: 24 additions & 24 deletions scaleway-async/scaleway_async/ipam/v1/marshalling.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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(
[
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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(
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
24 changes: 12 additions & 12 deletions scaleway-async/scaleway_async/ipam/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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.
"""
Expand All @@ -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.
"""
Expand All @@ -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.
"""
Expand All @@ -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.
"""
Expand All @@ -373,7 +373,7 @@ class ListIPsRequest:
@dataclass
class ListIPsResponse:
total_count: int
ips: List[IP]
ips: list[IP]


@dataclass
Expand Down Expand Up @@ -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
Expand All @@ -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.
"""
Loading