Skip to content

Commit 6da87ef

Browse files
authored
feat: update generated APIs (#1)
1 parent 2febbb4 commit 6da87ef

File tree

44 files changed

+449
-115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+449
-115
lines changed

scaleway-async/scaleway_async/baremetal/v1/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,7 @@ async def list_server_private_networks_all(
14731473

14741474
return await fetch_all_pages_async(
14751475
type=ListServerPrivateNetworksResponse,
1476-
key="serverPrivateNetworks",
1476+
key="server_private_networks",
14771477
fetcher=self.list_server_private_networks,
14781478
args={
14791479
"zone": zone,

scaleway-async/scaleway_async/domain/v2beta1/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ async def list_dns_zones_all(
247247

248248
return await fetch_all_pages_async(
249249
type=ListDNSZonesResponse,
250-
key="dnsZones",
250+
key="dns_zones",
251251
fetcher=self.list_dns_zones,
252252
args={
253253
"domain": domain,

scaleway-async/scaleway_async/domain/v2beta1/marshalling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2307,7 +2307,7 @@ def marshal_ImportRawDNSZoneRequest(
23072307
]
23082308
),
23092309
"content": request.content,
2310-
"format": RawFormat(request.format),
2310+
"format": RawFormat(request.format) if request.format is not None else None,
23112311
"project_id": request.project_id or defaults.default_project_id,
23122312
}
23132313

scaleway-async/scaleway_async/flexibleip/v1alpha1/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ async def list_flexible_i_ps_all(
253253

254254
return await fetch_all_pages_async(
255255
type=ListFlexibleIPsResponse,
256-
key="flexibleIps",
256+
key="flexible_ips",
257257
fetcher=self.list_flexible_i_ps,
258258
args={
259259
"zone": zone,

scaleway-async/scaleway_async/flexibleip/v1alpha1/marshalling.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ def marshal_GenerateMACAddrRequest(
202202
defaults: ProfileDefaults,
203203
) -> Dict[str, Any]:
204204
return {
205-
"mac_type": MACAddressType(request.mac_type),
205+
"mac_type": MACAddressType(request.mac_type)
206+
if request.mac_type is not None
207+
else None,
206208
}
207209

208210

scaleway-async/scaleway_async/iam/v1alpha1/api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ async def list_ssh_keys_all(
165165

166166
return await fetch_all_pages_async(
167167
type=ListSSHKeysResponse,
168-
key="sshKeys",
168+
key="ssh_keys",
169169
fetcher=self.list_ssh_keys,
170170
args={
171171
"order_by": order_by,
@@ -1415,7 +1415,7 @@ async def list_permission_sets_all(
14151415

14161416
return await fetch_all_pages_async(
14171417
type=ListPermissionSetsResponse,
1418-
key="permissionSets",
1418+
key="permission_sets",
14191419
fetcher=self.list_permission_sets,
14201420
args={
14211421
"order_by": order_by,
@@ -1511,7 +1511,7 @@ async def list_api_keys_all(
15111511

15121512
return await fetch_all_pages_async(
15131513
type=ListAPIKeysResponse,
1514-
key="apiKeys",
1514+
key="api_keys",
15151515
fetcher=self.list_api_keys,
15161516
args={
15171517
"order_by": order_by,

scaleway-async/scaleway_async/instance/v1/api.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,7 +1858,7 @@ async def list_security_groups_all(
18581858

18591859
return await fetch_all_pages_async(
18601860
type=ListSecurityGroupsResponse,
1861-
key="securityGroups",
1861+
key="security_groups",
18621862
fetcher=self.list_security_groups,
18631863
args={
18641864
"zone": zone,
@@ -2525,7 +2525,7 @@ async def list_placement_groups_all(
25252525

25262526
return await fetch_all_pages_async(
25272527
type=ListPlacementGroupsResponse,
2528-
key="placementGroups",
2528+
key="placement_groups",
25292529
fetcher=self.list_placement_groups,
25302530
args={
25312531
"zone": zone,
@@ -3116,7 +3116,7 @@ async def list_private_ni_cs(
31163116
"""
31173117
List all private NICs of a given server.
31183118
:param zone: Zone to target. If none is passed will use default zone from the config
3119-
:param server_id:
3119+
:param server_id: The server the private NIC is attached to
31203120
:return: :class:`ListPrivateNICsResponse <ListPrivateNICsResponse>`
31213121
31223122
Usage:
@@ -3145,8 +3145,8 @@ async def create_private_nic(
31453145
"""
31463146
Create a private NIC connecting a server to a private network.
31473147
:param zone: Zone to target. If none is passed will use default zone from the config
3148-
:param server_id:
3149-
:param private_network_id:
3148+
:param server_id: UUID of the server the private NIC will be attached to
3149+
:param private_network_id: UUID of the private network where the private NIC will be attached
31503150
:return: :class:`CreatePrivateNICResponse <CreatePrivateNICResponse>`
31513151
31523152
Usage:
@@ -3186,8 +3186,8 @@ async def get_private_nic(
31863186
"""
31873187
Get private NIC properties.
31883188
:param zone: Zone to target. If none is passed will use default zone from the config
3189-
:param server_id:
3190-
:param private_nic_id:
3189+
:param server_id: The server the private NIC is attached to
3190+
:param private_nic_id: The private NIC unique ID
31913191
:return: :class:`GetPrivateNICResponse <GetPrivateNICResponse>`
31923192
31933193
Usage:
@@ -3220,8 +3220,8 @@ async def delete_private_nic(
32203220
"""
32213221
Delete a private NIC.
32223222
:param zone: Zone to target. If none is passed will use default zone from the config
3223-
:param server_id:
3224-
:param private_nic_id:
3223+
:param server_id: The server the private NIC is attached to
3224+
:param private_nic_id: The private NIC unique ID
32253225
32263226
Usage:
32273227
::

scaleway-async/scaleway_async/instance/v1/marshalling.py

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,7 +2258,7 @@ def marshal_CreateImageRequest(
22582258
defaults: ProfileDefaults,
22592259
) -> Dict[str, Any]:
22602260
return {
2261-
"arch": Arch(request.arch),
2261+
"arch": Arch(request.arch) if request.arch is not None else None,
22622262
"default_bootscript": request.default_bootscript,
22632263
"extra_volumes": {
22642264
k: marshal_VolumeTemplate(v, defaults)
@@ -2468,14 +2468,20 @@ def marshal_CreateSecurityGroupRuleRequest(
24682468
defaults: ProfileDefaults,
24692469
) -> Dict[str, Any]:
24702470
return {
2471-
"action": SecurityGroupRuleAction(request.action),
2471+
"action": SecurityGroupRuleAction(request.action)
2472+
if request.action is not None
2473+
else None,
24722474
"dest_port_from": request.dest_port_from,
24732475
"dest_port_to": request.dest_port_to,
2474-
"direction": SecurityGroupRuleDirection(request.direction),
2476+
"direction": SecurityGroupRuleDirection(request.direction)
2477+
if request.direction is not None
2478+
else None,
24752479
"editable": request.editable,
24762480
"ip_range": request.ip_range,
24772481
"position": request.position,
2478-
"protocol": SecurityGroupRuleProtocol(request.protocol),
2482+
"protocol": SecurityGroupRuleProtocol(request.protocol)
2483+
if request.protocol is not None
2484+
else None,
24792485
}
24802486

24812487

@@ -2703,8 +2709,12 @@ def marshal_UpdatePlacementGroupRequest(
27032709
) -> Dict[str, Any]:
27042710
return {
27052711
"name": request.name,
2706-
"policy_mode": PlacementGroupPolicyMode(request.policy_mode),
2707-
"policy_type": PlacementGroupPolicyType(request.policy_type),
2712+
"policy_mode": PlacementGroupPolicyMode(request.policy_mode)
2713+
if request.policy_mode is not None
2714+
else None,
2715+
"policy_type": PlacementGroupPolicyType(request.policy_type)
2716+
if request.policy_type is not None
2717+
else None,
27082718
"tags": request.tags,
27092719
}
27102720

@@ -2734,7 +2744,9 @@ def marshal__CreateServerRequest(
27342744
defaults: ProfileDefaults,
27352745
) -> Dict[str, Any]:
27362746
return {
2737-
"boot_type": BootType(request.boot_type),
2747+
"boot_type": BootType(request.boot_type)
2748+
if request.boot_type is not None
2749+
else None,
27382750
"bootscript": request.bootscript,
27392751
"commercial_type": request.commercial_type,
27402752
"dynamic_ip_required": request.dynamic_ip_required,
@@ -2933,7 +2945,9 @@ def marshal__UpdateServerRequest(
29332945
defaults: ProfileDefaults,
29342946
) -> Dict[str, Any]:
29352947
return {
2936-
"boot_type": BootType(request.boot_type),
2948+
"boot_type": BootType(request.boot_type)
2949+
if request.boot_type is not None
2950+
else None,
29372951
"bootscript": request.bootscript,
29382952
"dynamic_ip_required": request.dynamic_ip_required,
29392953
"enable_ipv6": request.enable_ipv6,

scaleway-async/scaleway_async/instance/v1/types.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2955,6 +2955,9 @@ class ListPrivateNICsRequest:
29552955
"""
29562956

29572957
server_id: str
2958+
"""
2959+
The server the private NIC is attached to
2960+
"""
29582961

29592962

29602963
@dataclass
@@ -2965,8 +2968,14 @@ class CreatePrivateNICRequest:
29652968
"""
29662969

29672970
server_id: str
2971+
"""
2972+
UUID of the server the private NIC will be attached to
2973+
"""
29682974

29692975
private_network_id: str
2976+
"""
2977+
UUID of the private network where the private NIC will be attached
2978+
"""
29702979

29712980

29722981
@dataclass
@@ -2977,8 +2986,14 @@ class GetPrivateNICRequest:
29772986
"""
29782987

29792988
server_id: str
2989+
"""
2990+
The server the private NIC is attached to
2991+
"""
29802992

29812993
private_nic_id: str
2994+
"""
2995+
The private NIC unique ID
2996+
"""
29822997

29832998

29842999
@dataclass
@@ -2989,8 +3004,14 @@ class DeletePrivateNICRequest:
29893004
"""
29903005

29913006
server_id: str
3007+
"""
3008+
The server the private NIC is attached to
3009+
"""
29923010

29933011
private_nic_id: str
3012+
"""
3013+
The private NIC unique ID
3014+
"""
29943015

29953016

29963017
@dataclass

scaleway-async/scaleway_async/iot/v1/marshalling.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,9 @@ def marshal_CreateHubRequest(
825825
"disable_events": request.disable_events,
826826
"events_topic_prefix": request.events_topic_prefix,
827827
"name": request.name,
828-
"product_plan": HubProductPlan(request.product_plan),
828+
"product_plan": HubProductPlan(request.product_plan)
829+
if request.product_plan is not None
830+
else None,
829831
"project_id": request.project_id or defaults.default_project_id,
830832
**resolve_one_of(
831833
[
@@ -845,7 +847,9 @@ def marshal_CreateNetworkRequest(
845847
"hub_id": request.hub_id,
846848
"name": request.name,
847849
"topic_prefix": request.topic_prefix,
848-
"type": NetworkNetworkType(request.type_),
850+
"type": NetworkNetworkType(request.type_)
851+
if request.type_ is not None
852+
else None,
849853
}
850854

851855

scaleway-async/scaleway_async/k8s/v1/marshalling.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -691,11 +691,11 @@ def marshal_CreateClusterRequest(
691691
)
692692
if request.autoscaler_config is not None
693693
else None,
694-
"cni": CNI(request.cni),
694+
"cni": CNI(request.cni) if request.cni is not None else None,
695695
"description": request.description,
696696
"enable_dashboard": request.enable_dashboard,
697697
"feature_gates": request.feature_gates,
698-
"ingress": Ingress(request.ingress),
698+
"ingress": Ingress(request.ingress) if request.ingress is not None else None,
699699
"name": request.name,
700700
"open_id_connect_config": marshal_CreateClusterRequestOpenIDConnectConfig(
701701
request.open_id_connect_config, defaults
@@ -784,7 +784,7 @@ def marshal_UpdateClusterRequest(
784784
"description": request.description,
785785
"enable_dashboard": request.enable_dashboard,
786786
"feature_gates": request.feature_gates,
787-
"ingress": Ingress(request.ingress),
787+
"ingress": Ingress(request.ingress) if request.ingress is not None else None,
788788
"name": request.name,
789789
"open_id_connect_config": marshal_UpdateClusterRequestOpenIDConnectConfig(
790790
request.open_id_connect_config, defaults

scaleway-async/scaleway_async/lb/v1/api.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,7 @@ async def list_backend_stats_all(
19401940

19411941
return await fetch_all_pages_async(
19421942
type=ListBackendStatsResponse,
1943-
key="backendServersStats",
1943+
key="backend_servers_stats",
19441944
fetcher=self.list_backend_stats,
19451945
args={
19461946
"lb_id": lb_id,
@@ -2533,7 +2533,7 @@ async def list_lb_types_all(
25332533

25342534
return await fetch_all_pages_async(
25352535
type=ListLbTypesResponse,
2536-
key="lbTypes",
2536+
key="lb_types",
25372537
fetcher=self.list_lb_types,
25382538
args={
25392539
"region": region,
@@ -2939,7 +2939,7 @@ async def list_lb_private_networks_all(
29392939

29402940
return await fetch_all_pages_async(
29412941
type=ListLbPrivateNetworksResponse,
2942-
key="privateNetwork",
2942+
key="private_network",
29432943
fetcher=self.list_lb_private_networks,
29442944
args={
29452945
"lb_id": lb_id,
@@ -4722,7 +4722,7 @@ async def list_backend_stats_all(
47224722

47234723
return await fetch_all_pages_async(
47244724
type=ListBackendStatsResponse,
4725-
key="backendServersStats",
4725+
key="backend_servers_stats",
47264726
fetcher=self.list_backend_stats,
47274727
args={
47284728
"lb_id": lb_id,
@@ -5334,7 +5334,7 @@ async def list_lb_types_all(
53345334

53355335
return await fetch_all_pages_async(
53365336
type=ListLbTypesResponse,
5337-
key="lbTypes",
5337+
key="lb_types",
53385338
fetcher=self.list_lb_types,
53395339
args={
53405340
"zone": zone,
@@ -5724,7 +5724,7 @@ async def list_lb_private_networks_all(
57245724

57255725
return await fetch_all_pages_async(
57265726
type=ListLbPrivateNetworksResponse,
5727-
key="privateNetwork",
5727+
key="private_network",
57285728
fetcher=self.list_lb_private_networks,
57295729
args={
57305730
"lb_id": lb_id,

0 commit comments

Comments
 (0)