Skip to content

Commit 4c20660

Browse files
committed
feat: update generated APIs
1 parent f929891 commit 4c20660

File tree

6 files changed

+56
-76
lines changed

6 files changed

+56
-76
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
from .types import PermissionSetScopeType
1919
from .types import UserStatus
2020
from .types import UserType
21-
from .types import GetUserConnectionsResponseConnectionConnectedOrganization
22-
from .types import GetUserConnectionsResponseConnectionConnectedUser
21+
from .types import ConnectionConnectedOrganization
22+
from .types import ConnectionConnectedUser
2323
from .types import QuotumLimit
2424
from .types import JWT
2525
from .types import RuleSpecs
2626
from .types import CreateUserRequestMember
27-
from .types import GetUserConnectionsResponseConnection
27+
from .types import Connection
2828
from .types import APIKey
2929
from .types import Application
3030
from .types import GracePeriod
@@ -132,13 +132,13 @@
132132
"PermissionSetScopeType",
133133
"UserStatus",
134134
"UserType",
135-
"GetUserConnectionsResponseConnectionConnectedOrganization",
136-
"GetUserConnectionsResponseConnectionConnectedUser",
135+
"ConnectionConnectedOrganization",
136+
"ConnectionConnectedUser",
137137
"QuotumLimit",
138138
"JWT",
139139
"RuleSpecs",
140140
"CreateUserRequestMember",
141-
"GetUserConnectionsResponseConnection",
141+
"Connection",
142142
"APIKey",
143143
"Application",
144144
"GracePeriod",

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

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
SSHKey,
2222
User,
2323
EncodedJWT,
24-
GetUserConnectionsResponseConnectionConnectedOrganization,
25-
GetUserConnectionsResponseConnectionConnectedUser,
26-
GetUserConnectionsResponseConnection,
24+
ConnectionConnectedOrganization,
25+
ConnectionConnectedUser,
26+
Connection,
2727
GetUserConnectionsResponse,
2828
ListAPIKeysResponse,
2929
ListApplicationsResponse,
@@ -704,12 +704,12 @@ def unmarshal_EncodedJWT(data: Any) -> EncodedJWT:
704704
return EncodedJWT(**args)
705705

706706

707-
def unmarshal_GetUserConnectionsResponseConnectionConnectedOrganization(
707+
def unmarshal_ConnectionConnectedOrganization(
708708
data: Any,
709-
) -> GetUserConnectionsResponseConnectionConnectedOrganization:
709+
) -> ConnectionConnectedOrganization:
710710
if not isinstance(data, dict):
711711
raise TypeError(
712-
"Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedOrganization' failed as data isn't a dictionary."
712+
"Unmarshalling the type 'ConnectionConnectedOrganization' failed as data isn't a dictionary."
713713
)
714714

715715
args: Dict[str, Any] = {}
@@ -726,15 +726,13 @@ def unmarshal_GetUserConnectionsResponseConnectionConnectedOrganization(
726726
if field is not None:
727727
args["locked"] = field
728728

729-
return GetUserConnectionsResponseConnectionConnectedOrganization(**args)
729+
return ConnectionConnectedOrganization(**args)
730730

731731

732-
def unmarshal_GetUserConnectionsResponseConnectionConnectedUser(
733-
data: Any,
734-
) -> GetUserConnectionsResponseConnectionConnectedUser:
732+
def unmarshal_ConnectionConnectedUser(data: Any) -> ConnectionConnectedUser:
735733
if not isinstance(data, dict):
736734
raise TypeError(
737-
"Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedUser' failed as data isn't a dictionary."
735+
"Unmarshalling the type 'ConnectionConnectedUser' failed as data isn't a dictionary."
738736
)
739737

740738
args: Dict[str, Any] = {}
@@ -751,36 +749,30 @@ def unmarshal_GetUserConnectionsResponseConnectionConnectedUser(
751749
if field is not None:
752750
args["type_"] = field
753751

754-
return GetUserConnectionsResponseConnectionConnectedUser(**args)
752+
return ConnectionConnectedUser(**args)
755753

756754

757-
def unmarshal_GetUserConnectionsResponseConnection(
758-
data: Any,
759-
) -> GetUserConnectionsResponseConnection:
755+
def unmarshal_Connection(data: Any) -> Connection:
760756
if not isinstance(data, dict):
761757
raise TypeError(
762-
"Unmarshalling the type 'GetUserConnectionsResponseConnection' failed as data isn't a dictionary."
758+
"Unmarshalling the type 'Connection' failed as data isn't a dictionary."
763759
)
764760

765761
args: Dict[str, Any] = {}
766762

767763
field = data.get("organization", None)
768764
if field is not None:
769-
args["organization"] = (
770-
unmarshal_GetUserConnectionsResponseConnectionConnectedOrganization(field)
771-
)
765+
args["organization"] = unmarshal_ConnectionConnectedOrganization(field)
772766
else:
773767
args["organization"] = None
774768

775769
field = data.get("user", None)
776770
if field is not None:
777-
args["user"] = unmarshal_GetUserConnectionsResponseConnectionConnectedUser(
778-
field
779-
)
771+
args["user"] = unmarshal_ConnectionConnectedUser(field)
780772
else:
781773
args["user"] = None
782774

783-
return GetUserConnectionsResponseConnection(**args)
775+
return Connection(**args)
784776

785777

786778
def unmarshal_GetUserConnectionsResponse(data: Any) -> GetUserConnectionsResponse:
@@ -794,9 +786,7 @@ def unmarshal_GetUserConnectionsResponse(data: Any) -> GetUserConnectionsRespons
794786
field = data.get("connections", None)
795787
if field is not None:
796788
args["connections"] = (
797-
[unmarshal_GetUserConnectionsResponseConnection(v) for v in field]
798-
if field is not None
799-
else None
789+
[unmarshal_Connection(v) for v in field] if field is not None else None
800790
)
801791

802792
return GetUserConnectionsResponse(**args)

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def __str__(self) -> str:
207207

208208

209209
@dataclass
210-
class GetUserConnectionsResponseConnectionConnectedOrganization:
210+
class ConnectionConnectedOrganization:
211211
id: str
212212

213213
name: str
@@ -216,7 +216,7 @@ class GetUserConnectionsResponseConnectionConnectedOrganization:
216216

217217

218218
@dataclass
219-
class GetUserConnectionsResponseConnectionConnectedUser:
219+
class ConnectionConnectedUser:
220220
id: str
221221

222222
username: str
@@ -326,13 +326,13 @@ class CreateUserRequestMember:
326326

327327

328328
@dataclass
329-
class GetUserConnectionsResponseConnection:
330-
organization: Optional[GetUserConnectionsResponseConnectionConnectedOrganization]
329+
class Connection:
330+
organization: Optional[ConnectionConnectedOrganization]
331331
"""
332332
Information about the connected organization.
333333
"""
334334

335-
user: Optional[GetUserConnectionsResponseConnectionConnectedUser]
335+
user: Optional[ConnectionConnectedUser]
336336
"""
337337
Information about the connected user.
338338
"""
@@ -1244,7 +1244,7 @@ class GetUserConnectionsRequest:
12441244

12451245
@dataclass
12461246
class GetUserConnectionsResponse:
1247-
connections: List[GetUserConnectionsResponseConnection]
1247+
connections: List[Connection]
12481248
"""
12491249
List of connections.
12501250
"""

scaleway/scaleway/iam/v1alpha1/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
from .types import PermissionSetScopeType
1919
from .types import UserStatus
2020
from .types import UserType
21-
from .types import GetUserConnectionsResponseConnectionConnectedOrganization
22-
from .types import GetUserConnectionsResponseConnectionConnectedUser
21+
from .types import ConnectionConnectedOrganization
22+
from .types import ConnectionConnectedUser
2323
from .types import QuotumLimit
2424
from .types import JWT
2525
from .types import RuleSpecs
2626
from .types import CreateUserRequestMember
27-
from .types import GetUserConnectionsResponseConnection
27+
from .types import Connection
2828
from .types import APIKey
2929
from .types import Application
3030
from .types import GracePeriod
@@ -132,13 +132,13 @@
132132
"PermissionSetScopeType",
133133
"UserStatus",
134134
"UserType",
135-
"GetUserConnectionsResponseConnectionConnectedOrganization",
136-
"GetUserConnectionsResponseConnectionConnectedUser",
135+
"ConnectionConnectedOrganization",
136+
"ConnectionConnectedUser",
137137
"QuotumLimit",
138138
"JWT",
139139
"RuleSpecs",
140140
"CreateUserRequestMember",
141-
"GetUserConnectionsResponseConnection",
141+
"Connection",
142142
"APIKey",
143143
"Application",
144144
"GracePeriod",

scaleway/scaleway/iam/v1alpha1/marshalling.py

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
SSHKey,
2222
User,
2323
EncodedJWT,
24-
GetUserConnectionsResponseConnectionConnectedOrganization,
25-
GetUserConnectionsResponseConnectionConnectedUser,
26-
GetUserConnectionsResponseConnection,
24+
ConnectionConnectedOrganization,
25+
ConnectionConnectedUser,
26+
Connection,
2727
GetUserConnectionsResponse,
2828
ListAPIKeysResponse,
2929
ListApplicationsResponse,
@@ -704,12 +704,12 @@ def unmarshal_EncodedJWT(data: Any) -> EncodedJWT:
704704
return EncodedJWT(**args)
705705

706706

707-
def unmarshal_GetUserConnectionsResponseConnectionConnectedOrganization(
707+
def unmarshal_ConnectionConnectedOrganization(
708708
data: Any,
709-
) -> GetUserConnectionsResponseConnectionConnectedOrganization:
709+
) -> ConnectionConnectedOrganization:
710710
if not isinstance(data, dict):
711711
raise TypeError(
712-
"Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedOrganization' failed as data isn't a dictionary."
712+
"Unmarshalling the type 'ConnectionConnectedOrganization' failed as data isn't a dictionary."
713713
)
714714

715715
args: Dict[str, Any] = {}
@@ -726,15 +726,13 @@ def unmarshal_GetUserConnectionsResponseConnectionConnectedOrganization(
726726
if field is not None:
727727
args["locked"] = field
728728

729-
return GetUserConnectionsResponseConnectionConnectedOrganization(**args)
729+
return ConnectionConnectedOrganization(**args)
730730

731731

732-
def unmarshal_GetUserConnectionsResponseConnectionConnectedUser(
733-
data: Any,
734-
) -> GetUserConnectionsResponseConnectionConnectedUser:
732+
def unmarshal_ConnectionConnectedUser(data: Any) -> ConnectionConnectedUser:
735733
if not isinstance(data, dict):
736734
raise TypeError(
737-
"Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedUser' failed as data isn't a dictionary."
735+
"Unmarshalling the type 'ConnectionConnectedUser' failed as data isn't a dictionary."
738736
)
739737

740738
args: Dict[str, Any] = {}
@@ -751,36 +749,30 @@ def unmarshal_GetUserConnectionsResponseConnectionConnectedUser(
751749
if field is not None:
752750
args["type_"] = field
753751

754-
return GetUserConnectionsResponseConnectionConnectedUser(**args)
752+
return ConnectionConnectedUser(**args)
755753

756754

757-
def unmarshal_GetUserConnectionsResponseConnection(
758-
data: Any,
759-
) -> GetUserConnectionsResponseConnection:
755+
def unmarshal_Connection(data: Any) -> Connection:
760756
if not isinstance(data, dict):
761757
raise TypeError(
762-
"Unmarshalling the type 'GetUserConnectionsResponseConnection' failed as data isn't a dictionary."
758+
"Unmarshalling the type 'Connection' failed as data isn't a dictionary."
763759
)
764760

765761
args: Dict[str, Any] = {}
766762

767763
field = data.get("organization", None)
768764
if field is not None:
769-
args["organization"] = (
770-
unmarshal_GetUserConnectionsResponseConnectionConnectedOrganization(field)
771-
)
765+
args["organization"] = unmarshal_ConnectionConnectedOrganization(field)
772766
else:
773767
args["organization"] = None
774768

775769
field = data.get("user", None)
776770
if field is not None:
777-
args["user"] = unmarshal_GetUserConnectionsResponseConnectionConnectedUser(
778-
field
779-
)
771+
args["user"] = unmarshal_ConnectionConnectedUser(field)
780772
else:
781773
args["user"] = None
782774

783-
return GetUserConnectionsResponseConnection(**args)
775+
return Connection(**args)
784776

785777

786778
def unmarshal_GetUserConnectionsResponse(data: Any) -> GetUserConnectionsResponse:
@@ -794,9 +786,7 @@ def unmarshal_GetUserConnectionsResponse(data: Any) -> GetUserConnectionsRespons
794786
field = data.get("connections", None)
795787
if field is not None:
796788
args["connections"] = (
797-
[unmarshal_GetUserConnectionsResponseConnection(v) for v in field]
798-
if field is not None
799-
else None
789+
[unmarshal_Connection(v) for v in field] if field is not None else None
800790
)
801791

802792
return GetUserConnectionsResponse(**args)

scaleway/scaleway/iam/v1alpha1/types.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def __str__(self) -> str:
207207

208208

209209
@dataclass
210-
class GetUserConnectionsResponseConnectionConnectedOrganization:
210+
class ConnectionConnectedOrganization:
211211
id: str
212212

213213
name: str
@@ -216,7 +216,7 @@ class GetUserConnectionsResponseConnectionConnectedOrganization:
216216

217217

218218
@dataclass
219-
class GetUserConnectionsResponseConnectionConnectedUser:
219+
class ConnectionConnectedUser:
220220
id: str
221221

222222
username: str
@@ -326,13 +326,13 @@ class CreateUserRequestMember:
326326

327327

328328
@dataclass
329-
class GetUserConnectionsResponseConnection:
330-
organization: Optional[GetUserConnectionsResponseConnectionConnectedOrganization]
329+
class Connection:
330+
organization: Optional[ConnectionConnectedOrganization]
331331
"""
332332
Information about the connected organization.
333333
"""
334334

335-
user: Optional[GetUserConnectionsResponseConnectionConnectedUser]
335+
user: Optional[ConnectionConnectedUser]
336336
"""
337337
Information about the connected user.
338338
"""
@@ -1244,7 +1244,7 @@ class GetUserConnectionsRequest:
12441244

12451245
@dataclass
12461246
class GetUserConnectionsResponse:
1247-
connections: List[GetUserConnectionsResponseConnection]
1247+
connections: List[Connection]
12481248
"""
12491249
List of connections.
12501250
"""

0 commit comments

Comments
 (0)