Skip to content

Commit

Permalink
feat(lb): generate ip_type for ListIpsRequest (scaleway#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Jan 3, 2024
1 parent 3e9e7a4 commit 8516a2b
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scaleway-async/scaleway_async/lb/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
ListBackendsRequestOrderBy,
ListCertificatesRequestOrderBy,
ListFrontendsRequestOrderBy,
ListIpsRequestIpType,
ListLbsRequestOrderBy,
ListPrivateNetworksRequestOrderBy,
ListRoutesRequestOrderBy,
Expand Down Expand Up @@ -586,6 +587,7 @@ async def list_i_ps(
ip_address: Optional[str] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
ip_type: ListIpsRequestIpType = ListIpsRequestIpType.ALL,
) -> ListIpsResponse:
"""
List IPs.
Expand All @@ -595,6 +597,7 @@ async def list_i_ps(
:param ip_address: IP address to filter for.
:param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned.
:param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned.
:param ip_type: IP type to filter for.
:return: :class:`ListIpsResponse <ListIpsResponse>`
Usage:
Expand All @@ -612,6 +615,7 @@ async def list_i_ps(
f"/lb/v1/regions/{param_region}/ips",
params={
"ip_address": ip_address,
"ip_type": ip_type,
"organization_id": organization_id
or self.client.default_organization_id,
"page": page,
Expand All @@ -632,6 +636,7 @@ async def list_i_ps_all(
ip_address: Optional[str] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
ip_type: Optional[ListIpsRequestIpType] = None,
) -> List[Ip]:
"""
List IPs.
Expand All @@ -641,6 +646,7 @@ async def list_i_ps_all(
:param ip_address: IP address to filter for.
:param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned.
:param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned.
:param ip_type: IP type to filter for.
:return: :class:`List[ListIpsResponse] <List[ListIpsResponse]>`
Usage:
Expand All @@ -660,6 +666,7 @@ async def list_i_ps_all(
"ip_address": ip_address,
"organization_id": organization_id,
"project_id": project_id,
"ip_type": ip_type,
},
)

Expand Down Expand Up @@ -3538,6 +3545,7 @@ async def list_i_ps(
ip_address: Optional[str] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
ip_type: ListIpsRequestIpType = ListIpsRequestIpType.ALL,
) -> ListIpsResponse:
"""
List IP addresses.
Expand All @@ -3548,6 +3556,7 @@ async def list_i_ps(
:param ip_address: IP address to filter for.
:param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned.
:param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned.
:param ip_type: IP type to filter for.
:return: :class:`ListIpsResponse <ListIpsResponse>`
Usage:
Expand All @@ -3563,6 +3572,7 @@ async def list_i_ps(
f"/lb/v1/zones/{param_zone}/ips",
params={
"ip_address": ip_address,
"ip_type": ip_type,
"organization_id": organization_id
or self.client.default_organization_id,
"page": page,
Expand All @@ -3583,6 +3593,7 @@ async def list_i_ps_all(
ip_address: Optional[str] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
ip_type: Optional[ListIpsRequestIpType] = None,
) -> List[Ip]:
"""
List IP addresses.
Expand All @@ -3593,6 +3604,7 @@ async def list_i_ps_all(
:param ip_address: IP address to filter for.
:param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned.
:param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned.
:param ip_type: IP type to filter for.
:return: :class:`List[ListIpsResponse] <List[ListIpsResponse]>`
Usage:
Expand All @@ -3612,6 +3624,7 @@ async def list_i_ps_all(
"ip_address": ip_address,
"organization_id": organization_id,
"project_id": project_id,
"ip_type": ip_type,
},
)

Expand Down
10 changes: 10 additions & 0 deletions scaleway-async/scaleway_async/lb/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1832,6 +1832,11 @@ class ListIPsRequest:
Project ID to filter for, only Load Balancer IP addresses from this Project will be returned.
"""

ip_type: Optional[ListIpsRequestIpType]
"""
IP type to filter for.
"""


@dataclass
class CreateIpRequest:
Expand Down Expand Up @@ -3391,6 +3396,11 @@ class ZonedApiListIPsRequest:
Project ID to filter for, only Load Balancer IP addresses from this Project will be returned.
"""

ip_type: Optional[ListIpsRequestIpType]
"""
IP type to filter for.
"""


@dataclass
class ZonedApiCreateIpRequest:
Expand Down
13 changes: 13 additions & 0 deletions scaleway/scaleway/lb/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
ListBackendsRequestOrderBy,
ListCertificatesRequestOrderBy,
ListFrontendsRequestOrderBy,
ListIpsRequestIpType,
ListLbsRequestOrderBy,
ListPrivateNetworksRequestOrderBy,
ListRoutesRequestOrderBy,
Expand Down Expand Up @@ -586,6 +587,7 @@ def list_i_ps(
ip_address: Optional[str] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
ip_type: ListIpsRequestIpType = ListIpsRequestIpType.ALL,
) -> ListIpsResponse:
"""
List IPs.
Expand All @@ -595,6 +597,7 @@ def list_i_ps(
:param ip_address: IP address to filter for.
:param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned.
:param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned.
:param ip_type: IP type to filter for.
:return: :class:`ListIpsResponse <ListIpsResponse>`
Usage:
Expand All @@ -612,6 +615,7 @@ def list_i_ps(
f"/lb/v1/regions/{param_region}/ips",
params={
"ip_address": ip_address,
"ip_type": ip_type,
"organization_id": organization_id
or self.client.default_organization_id,
"page": page,
Expand All @@ -632,6 +636,7 @@ def list_i_ps_all(
ip_address: Optional[str] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
ip_type: Optional[ListIpsRequestIpType] = None,
) -> List[Ip]:
"""
List IPs.
Expand All @@ -641,6 +646,7 @@ def list_i_ps_all(
:param ip_address: IP address to filter for.
:param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned.
:param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned.
:param ip_type: IP type to filter for.
:return: :class:`List[ListIpsResponse] <List[ListIpsResponse]>`
Usage:
Expand All @@ -660,6 +666,7 @@ def list_i_ps_all(
"ip_address": ip_address,
"organization_id": organization_id,
"project_id": project_id,
"ip_type": ip_type,
},
)

Expand Down Expand Up @@ -3536,6 +3543,7 @@ def list_i_ps(
ip_address: Optional[str] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
ip_type: ListIpsRequestIpType = ListIpsRequestIpType.ALL,
) -> ListIpsResponse:
"""
List IP addresses.
Expand All @@ -3546,6 +3554,7 @@ def list_i_ps(
:param ip_address: IP address to filter for.
:param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned.
:param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned.
:param ip_type: IP type to filter for.
:return: :class:`ListIpsResponse <ListIpsResponse>`
Usage:
Expand All @@ -3561,6 +3570,7 @@ def list_i_ps(
f"/lb/v1/zones/{param_zone}/ips",
params={
"ip_address": ip_address,
"ip_type": ip_type,
"organization_id": organization_id
or self.client.default_organization_id,
"page": page,
Expand All @@ -3581,6 +3591,7 @@ def list_i_ps_all(
ip_address: Optional[str] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
ip_type: Optional[ListIpsRequestIpType] = None,
) -> List[Ip]:
"""
List IP addresses.
Expand All @@ -3591,6 +3602,7 @@ def list_i_ps_all(
:param ip_address: IP address to filter for.
:param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned.
:param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned.
:param ip_type: IP type to filter for.
:return: :class:`List[ListIpsResponse] <List[ListIpsResponse]>`
Usage:
Expand All @@ -3610,6 +3622,7 @@ def list_i_ps_all(
"ip_address": ip_address,
"organization_id": organization_id,
"project_id": project_id,
"ip_type": ip_type,
},
)

Expand Down
10 changes: 10 additions & 0 deletions scaleway/scaleway/lb/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1832,6 +1832,11 @@ class ListIPsRequest:
Project ID to filter for, only Load Balancer IP addresses from this Project will be returned.
"""

ip_type: Optional[ListIpsRequestIpType]
"""
IP type to filter for.
"""


@dataclass
class CreateIpRequest:
Expand Down Expand Up @@ -3391,6 +3396,11 @@ class ZonedApiListIPsRequest:
Project ID to filter for, only Load Balancer IP addresses from this Project will be returned.
"""

ip_type: Optional[ListIpsRequestIpType]
"""
IP type to filter for.
"""


@dataclass
class ZonedApiCreateIpRequest:
Expand Down

0 comments on commit 8516a2b

Please sign in to comment.