diff --git a/scaleway-async/scaleway_async/iam/v1alpha1/__init__.py b/scaleway-async/scaleway_async/iam/v1alpha1/__init__.py index 385a286af..4f3af8cf3 100644 --- a/scaleway-async/scaleway_async/iam/v1alpha1/__init__.py +++ b/scaleway-async/scaleway_async/iam/v1alpha1/__init__.py @@ -18,13 +18,13 @@ from .types import PermissionSetScopeType from .types import UserStatus from .types import UserType -from .types import GetUserConnectionsResponseConnectionConnectedOrganization -from .types import GetUserConnectionsResponseConnectionConnectedUser +from .types import ConnectionConnectedOrganization +from .types import ConnectionConnectedUser from .types import QuotumLimit from .types import JWT from .types import RuleSpecs from .types import CreateUserRequestMember -from .types import GetUserConnectionsResponseConnection +from .types import Connection from .types import APIKey from .types import Application from .types import GracePeriod @@ -132,13 +132,13 @@ "PermissionSetScopeType", "UserStatus", "UserType", - "GetUserConnectionsResponseConnectionConnectedOrganization", - "GetUserConnectionsResponseConnectionConnectedUser", + "ConnectionConnectedOrganization", + "ConnectionConnectedUser", "QuotumLimit", "JWT", "RuleSpecs", "CreateUserRequestMember", - "GetUserConnectionsResponseConnection", + "Connection", "APIKey", "Application", "GracePeriod", diff --git a/scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py index 4b35ea99c..5dbb80eb5 100644 --- a/scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py @@ -21,9 +21,9 @@ SSHKey, User, EncodedJWT, - GetUserConnectionsResponseConnectionConnectedOrganization, - GetUserConnectionsResponseConnectionConnectedUser, - GetUserConnectionsResponseConnection, + ConnectionConnectedOrganization, + ConnectionConnectedUser, + Connection, GetUserConnectionsResponse, ListAPIKeysResponse, ListApplicationsResponse, @@ -704,12 +704,12 @@ def unmarshal_EncodedJWT(data: Any) -> EncodedJWT: return EncodedJWT(**args) -def unmarshal_GetUserConnectionsResponseConnectionConnectedOrganization( +def unmarshal_ConnectionConnectedOrganization( data: Any, -) -> GetUserConnectionsResponseConnectionConnectedOrganization: +) -> ConnectionConnectedOrganization: if not isinstance(data, dict): raise TypeError( - "Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedOrganization' failed as data isn't a dictionary." + "Unmarshalling the type 'ConnectionConnectedOrganization' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -726,15 +726,13 @@ def unmarshal_GetUserConnectionsResponseConnectionConnectedOrganization( if field is not None: args["locked"] = field - return GetUserConnectionsResponseConnectionConnectedOrganization(**args) + return ConnectionConnectedOrganization(**args) -def unmarshal_GetUserConnectionsResponseConnectionConnectedUser( - data: Any, -) -> GetUserConnectionsResponseConnectionConnectedUser: +def unmarshal_ConnectionConnectedUser(data: Any) -> ConnectionConnectedUser: if not isinstance(data, dict): raise TypeError( - "Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedUser' failed as data isn't a dictionary." + "Unmarshalling the type 'ConnectionConnectedUser' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -751,36 +749,30 @@ def unmarshal_GetUserConnectionsResponseConnectionConnectedUser( if field is not None: args["type_"] = field - return GetUserConnectionsResponseConnectionConnectedUser(**args) + return ConnectionConnectedUser(**args) -def unmarshal_GetUserConnectionsResponseConnection( - data: Any, -) -> GetUserConnectionsResponseConnection: +def unmarshal_Connection(data: Any) -> Connection: if not isinstance(data, dict): raise TypeError( - "Unmarshalling the type 'GetUserConnectionsResponseConnection' failed as data isn't a dictionary." + "Unmarshalling the type 'Connection' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} field = data.get("organization", None) if field is not None: - args["organization"] = ( - unmarshal_GetUserConnectionsResponseConnectionConnectedOrganization(field) - ) + args["organization"] = unmarshal_ConnectionConnectedOrganization(field) else: args["organization"] = None field = data.get("user", None) if field is not None: - args["user"] = unmarshal_GetUserConnectionsResponseConnectionConnectedUser( - field - ) + args["user"] = unmarshal_ConnectionConnectedUser(field) else: args["user"] = None - return GetUserConnectionsResponseConnection(**args) + return Connection(**args) def unmarshal_GetUserConnectionsResponse(data: Any) -> GetUserConnectionsResponse: @@ -794,9 +786,7 @@ def unmarshal_GetUserConnectionsResponse(data: Any) -> GetUserConnectionsRespons field = data.get("connections", None) if field is not None: args["connections"] = ( - [unmarshal_GetUserConnectionsResponseConnection(v) for v in field] - if field is not None - else None + [unmarshal_Connection(v) for v in field] if field is not None else None ) return GetUserConnectionsResponse(**args) diff --git a/scaleway-async/scaleway_async/iam/v1alpha1/types.py b/scaleway-async/scaleway_async/iam/v1alpha1/types.py index 3c32d3ebe..8df9525f8 100644 --- a/scaleway-async/scaleway_async/iam/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/iam/v1alpha1/types.py @@ -207,7 +207,7 @@ def __str__(self) -> str: @dataclass -class GetUserConnectionsResponseConnectionConnectedOrganization: +class ConnectionConnectedOrganization: id: str name: str @@ -216,7 +216,7 @@ class GetUserConnectionsResponseConnectionConnectedOrganization: @dataclass -class GetUserConnectionsResponseConnectionConnectedUser: +class ConnectionConnectedUser: id: str username: str @@ -326,13 +326,13 @@ class CreateUserRequestMember: @dataclass -class GetUserConnectionsResponseConnection: - organization: Optional[GetUserConnectionsResponseConnectionConnectedOrganization] +class Connection: + organization: Optional[ConnectionConnectedOrganization] """ Information about the connected organization. """ - user: Optional[GetUserConnectionsResponseConnectionConnectedUser] + user: Optional[ConnectionConnectedUser] """ Information about the connected user. """ @@ -1244,7 +1244,7 @@ class GetUserConnectionsRequest: @dataclass class GetUserConnectionsResponse: - connections: List[GetUserConnectionsResponseConnection] + connections: List[Connection] """ List of connections. """ diff --git a/scaleway/scaleway/iam/v1alpha1/__init__.py b/scaleway/scaleway/iam/v1alpha1/__init__.py index 385a286af..4f3af8cf3 100644 --- a/scaleway/scaleway/iam/v1alpha1/__init__.py +++ b/scaleway/scaleway/iam/v1alpha1/__init__.py @@ -18,13 +18,13 @@ from .types import PermissionSetScopeType from .types import UserStatus from .types import UserType -from .types import GetUserConnectionsResponseConnectionConnectedOrganization -from .types import GetUserConnectionsResponseConnectionConnectedUser +from .types import ConnectionConnectedOrganization +from .types import ConnectionConnectedUser from .types import QuotumLimit from .types import JWT from .types import RuleSpecs from .types import CreateUserRequestMember -from .types import GetUserConnectionsResponseConnection +from .types import Connection from .types import APIKey from .types import Application from .types import GracePeriod @@ -132,13 +132,13 @@ "PermissionSetScopeType", "UserStatus", "UserType", - "GetUserConnectionsResponseConnectionConnectedOrganization", - "GetUserConnectionsResponseConnectionConnectedUser", + "ConnectionConnectedOrganization", + "ConnectionConnectedUser", "QuotumLimit", "JWT", "RuleSpecs", "CreateUserRequestMember", - "GetUserConnectionsResponseConnection", + "Connection", "APIKey", "Application", "GracePeriod", diff --git a/scaleway/scaleway/iam/v1alpha1/marshalling.py b/scaleway/scaleway/iam/v1alpha1/marshalling.py index 4b35ea99c..5dbb80eb5 100644 --- a/scaleway/scaleway/iam/v1alpha1/marshalling.py +++ b/scaleway/scaleway/iam/v1alpha1/marshalling.py @@ -21,9 +21,9 @@ SSHKey, User, EncodedJWT, - GetUserConnectionsResponseConnectionConnectedOrganization, - GetUserConnectionsResponseConnectionConnectedUser, - GetUserConnectionsResponseConnection, + ConnectionConnectedOrganization, + ConnectionConnectedUser, + Connection, GetUserConnectionsResponse, ListAPIKeysResponse, ListApplicationsResponse, @@ -704,12 +704,12 @@ def unmarshal_EncodedJWT(data: Any) -> EncodedJWT: return EncodedJWT(**args) -def unmarshal_GetUserConnectionsResponseConnectionConnectedOrganization( +def unmarshal_ConnectionConnectedOrganization( data: Any, -) -> GetUserConnectionsResponseConnectionConnectedOrganization: +) -> ConnectionConnectedOrganization: if not isinstance(data, dict): raise TypeError( - "Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedOrganization' failed as data isn't a dictionary." + "Unmarshalling the type 'ConnectionConnectedOrganization' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -726,15 +726,13 @@ def unmarshal_GetUserConnectionsResponseConnectionConnectedOrganization( if field is not None: args["locked"] = field - return GetUserConnectionsResponseConnectionConnectedOrganization(**args) + return ConnectionConnectedOrganization(**args) -def unmarshal_GetUserConnectionsResponseConnectionConnectedUser( - data: Any, -) -> GetUserConnectionsResponseConnectionConnectedUser: +def unmarshal_ConnectionConnectedUser(data: Any) -> ConnectionConnectedUser: if not isinstance(data, dict): raise TypeError( - "Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedUser' failed as data isn't a dictionary." + "Unmarshalling the type 'ConnectionConnectedUser' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -751,36 +749,30 @@ def unmarshal_GetUserConnectionsResponseConnectionConnectedUser( if field is not None: args["type_"] = field - return GetUserConnectionsResponseConnectionConnectedUser(**args) + return ConnectionConnectedUser(**args) -def unmarshal_GetUserConnectionsResponseConnection( - data: Any, -) -> GetUserConnectionsResponseConnection: +def unmarshal_Connection(data: Any) -> Connection: if not isinstance(data, dict): raise TypeError( - "Unmarshalling the type 'GetUserConnectionsResponseConnection' failed as data isn't a dictionary." + "Unmarshalling the type 'Connection' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} field = data.get("organization", None) if field is not None: - args["organization"] = ( - unmarshal_GetUserConnectionsResponseConnectionConnectedOrganization(field) - ) + args["organization"] = unmarshal_ConnectionConnectedOrganization(field) else: args["organization"] = None field = data.get("user", None) if field is not None: - args["user"] = unmarshal_GetUserConnectionsResponseConnectionConnectedUser( - field - ) + args["user"] = unmarshal_ConnectionConnectedUser(field) else: args["user"] = None - return GetUserConnectionsResponseConnection(**args) + return Connection(**args) def unmarshal_GetUserConnectionsResponse(data: Any) -> GetUserConnectionsResponse: @@ -794,9 +786,7 @@ def unmarshal_GetUserConnectionsResponse(data: Any) -> GetUserConnectionsRespons field = data.get("connections", None) if field is not None: args["connections"] = ( - [unmarshal_GetUserConnectionsResponseConnection(v) for v in field] - if field is not None - else None + [unmarshal_Connection(v) for v in field] if field is not None else None ) return GetUserConnectionsResponse(**args) diff --git a/scaleway/scaleway/iam/v1alpha1/types.py b/scaleway/scaleway/iam/v1alpha1/types.py index 3c32d3ebe..8df9525f8 100644 --- a/scaleway/scaleway/iam/v1alpha1/types.py +++ b/scaleway/scaleway/iam/v1alpha1/types.py @@ -207,7 +207,7 @@ def __str__(self) -> str: @dataclass -class GetUserConnectionsResponseConnectionConnectedOrganization: +class ConnectionConnectedOrganization: id: str name: str @@ -216,7 +216,7 @@ class GetUserConnectionsResponseConnectionConnectedOrganization: @dataclass -class GetUserConnectionsResponseConnectionConnectedUser: +class ConnectionConnectedUser: id: str username: str @@ -326,13 +326,13 @@ class CreateUserRequestMember: @dataclass -class GetUserConnectionsResponseConnection: - organization: Optional[GetUserConnectionsResponseConnectionConnectedOrganization] +class Connection: + organization: Optional[ConnectionConnectedOrganization] """ Information about the connected organization. """ - user: Optional[GetUserConnectionsResponseConnectionConnectedUser] + user: Optional[ConnectionConnectedUser] """ Information about the connected user. """ @@ -1244,7 +1244,7 @@ class GetUserConnectionsRequest: @dataclass class GetUserConnectionsResponse: - connections: List[GetUserConnectionsResponseConnection] + connections: List[Connection] """ List of connections. """