Skip to content

Commit f9fa807

Browse files
authored
Merge branch 'main' into test-vcrpy
2 parents 9b1eff6 + 6bda4a8 commit f9fa807

File tree

12 files changed

+300
-158
lines changed

12 files changed

+300
-158
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
from .types import GetPolicyRequest
7575
from .types import GetQuotumRequest
7676
from .types import GetSSHKeyRequest
77+
from .types import GetSamlInformationRequest
7778
from .types import GetUserConnectionsRequest
7879
from .types import GetUserConnectionsResponse
7980
from .types import GetUserRequest
@@ -114,6 +115,7 @@
114115
from .types import RemoveGroupMemberRequest
115116
from .types import RemoveUserConnectionRequest
116117
from .types import Saml
118+
from .types import SamlInformation
117119
from .types import SetGroupMembersRequest
118120
from .types import SetOrganizationAliasRequest
119121
from .types import SetRulesRequest
@@ -208,6 +210,7 @@
208210
"GetPolicyRequest",
209211
"GetQuotumRequest",
210212
"GetSSHKeyRequest",
213+
"GetSamlInformationRequest",
211214
"GetUserConnectionsRequest",
212215
"GetUserConnectionsResponse",
213216
"GetUserRequest",
@@ -248,6 +251,7 @@
248251
"RemoveGroupMemberRequest",
249252
"RemoveUserConnectionRequest",
250253
"Saml",
254+
"SamlInformation",
251255
"SetGroupMembersRequest",
252256
"SetOrganizationAliasRequest",
253257
"SetRulesRequest",

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
SSHKey,
7676
Saml,
7777
SamlCertificate,
78+
SamlInformation,
7879
SetGroupMembersRequest,
7980
SetOrganizationAliasRequest,
8081
SetRulesRequest,
@@ -124,6 +125,7 @@
124125
unmarshal_Organization,
125126
unmarshal_OrganizationSecuritySettings,
126127
unmarshal_Saml,
128+
unmarshal_SamlInformation,
127129
unmarshal_SetRulesResponse,
128130
unmarshal_ValidateUserMFAOTPResponse,
129131
marshal_AddGroupMemberRequest,
@@ -3274,3 +3276,25 @@ async def delete_saml_certificate(
32743276
)
32753277

32763278
self._throw_on_error(res)
3279+
3280+
async def get_saml_information(
3281+
self,
3282+
) -> SamlInformation:
3283+
"""
3284+
Get SAML information.
3285+
3286+
:return: :class:`SamlInformation <SamlInformation>`
3287+
3288+
Usage:
3289+
::
3290+
3291+
result = await api.get_saml_information()
3292+
"""
3293+
3294+
res = self._request(
3295+
"GET",
3296+
"/iam/v1alpha1/saml-information",
3297+
)
3298+
3299+
self._throw_on_error(res)
3300+
return unmarshal_SamlInformation(res.json())

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
Organization,
5757
OrganizationSecuritySettings,
5858
Saml,
59+
SamlInformation,
5960
SetRulesResponse,
6061
ValidateUserMFAOTPResponse,
6162
AddGroupMemberRequest,
@@ -1598,6 +1599,29 @@ def unmarshal_Saml(data: Any) -> Saml:
15981599
return Saml(**args)
15991600

16001601

1602+
def unmarshal_SamlInformation(data: Any) -> SamlInformation:
1603+
if not isinstance(data, dict):
1604+
raise TypeError(
1605+
"Unmarshalling the type 'SamlInformation' failed as data isn't a dictionary."
1606+
)
1607+
1608+
args: Dict[str, Any] = {}
1609+
1610+
field = data.get("entity_id", None)
1611+
if field is not None:
1612+
args["entity_id"] = field
1613+
else:
1614+
args["entity_id"] = None
1615+
1616+
field = data.get("assertion_consumer_service_url", None)
1617+
if field is not None:
1618+
args["assertion_consumer_service_url"] = field
1619+
else:
1620+
args["assertion_consumer_service_url"] = None
1621+
1622+
return SamlInformation(**args)
1623+
1624+
16011625
def unmarshal_SetRulesResponse(data: Any) -> SetRulesResponse:
16021626
if not isinstance(data, dict):
16031627
raise TypeError(

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,6 +1384,11 @@ class GetSSHKeyRequest:
13841384
"""
13851385

13861386

1387+
@dataclass
1388+
class GetSamlInformationRequest:
1389+
pass
1390+
1391+
13871392
@dataclass
13881393
class GetUserConnectionsRequest:
13891394
user_id: str
@@ -2159,6 +2164,19 @@ class Saml:
21592164
"""
21602165

21612166

2167+
@dataclass
2168+
class SamlInformation:
2169+
entity_id: str
2170+
"""
2171+
Entity ID.
2172+
"""
2173+
2174+
assertion_consumer_service_url: str
2175+
"""
2176+
SAML Assertion Consumer Service url.
2177+
"""
2178+
2179+
21622180
@dataclass
21632181
class SetGroupMembersRequest:
21642182
group_id: str

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

Lines changed: 79 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
EndpointPrivateNetworkDetails,
1717
EndpointPublicNetworkDetails,
1818
Endpoint,
19+
DeploymentQuantization,
20+
Deployment,
1921
ModelSupportedQuantization,
2022
ModelSupportedNode,
2123
ModelSupportInfo,
22-
DeploymentQuantization,
23-
Deployment,
2424
Model,
2525
ListDeploymentsResponse,
2626
ListModelsResponse,
@@ -105,83 +105,6 @@ def unmarshal_Endpoint(data: Any) -> Endpoint:
105105
return Endpoint(**args)
106106

107107

108-
def unmarshal_ModelSupportedQuantization(data: Any) -> ModelSupportedQuantization:
109-
if not isinstance(data, dict):
110-
raise TypeError(
111-
"Unmarshalling the type 'ModelSupportedQuantization' failed as data isn't a dictionary."
112-
)
113-
114-
args: Dict[str, Any] = {}
115-
116-
field = data.get("quantization_bits", None)
117-
if field is not None:
118-
args["quantization_bits"] = field
119-
else:
120-
args["quantization_bits"] = 0
121-
122-
field = data.get("allowed", None)
123-
if field is not None:
124-
args["allowed"] = field
125-
else:
126-
args["allowed"] = False
127-
128-
field = data.get("max_context_size", None)
129-
if field is not None:
130-
args["max_context_size"] = field
131-
else:
132-
args["max_context_size"] = 0
133-
134-
return ModelSupportedQuantization(**args)
135-
136-
137-
def unmarshal_ModelSupportedNode(data: Any) -> ModelSupportedNode:
138-
if not isinstance(data, dict):
139-
raise TypeError(
140-
"Unmarshalling the type 'ModelSupportedNode' failed as data isn't a dictionary."
141-
)
142-
143-
args: Dict[str, Any] = {}
144-
145-
field = data.get("node_type_name", None)
146-
if field is not None:
147-
args["node_type_name"] = field
148-
else:
149-
args["node_type_name"] = None
150-
151-
field = data.get("quantizations", None)
152-
if field is not None:
153-
args["quantizations"] = (
154-
[unmarshal_ModelSupportedQuantization(v) for v in field]
155-
if field is not None
156-
else None
157-
)
158-
else:
159-
args["quantizations"] = []
160-
161-
return ModelSupportedNode(**args)
162-
163-
164-
def unmarshal_ModelSupportInfo(data: Any) -> ModelSupportInfo:
165-
if not isinstance(data, dict):
166-
raise TypeError(
167-
"Unmarshalling the type 'ModelSupportInfo' failed as data isn't a dictionary."
168-
)
169-
170-
args: Dict[str, Any] = {}
171-
172-
field = data.get("nodes", None)
173-
if field is not None:
174-
args["nodes"] = (
175-
[unmarshal_ModelSupportedNode(v) for v in field]
176-
if field is not None
177-
else None
178-
)
179-
else:
180-
args["nodes"] = []
181-
182-
return ModelSupportInfo(**args)
183-
184-
185108
def unmarshal_DeploymentQuantization(data: Any) -> DeploymentQuantization:
186109
if not isinstance(data, dict):
187110
raise TypeError(
@@ -314,6 +237,83 @@ def unmarshal_Deployment(data: Any) -> Deployment:
314237
return Deployment(**args)
315238

316239

240+
def unmarshal_ModelSupportedQuantization(data: Any) -> ModelSupportedQuantization:
241+
if not isinstance(data, dict):
242+
raise TypeError(
243+
"Unmarshalling the type 'ModelSupportedQuantization' failed as data isn't a dictionary."
244+
)
245+
246+
args: Dict[str, Any] = {}
247+
248+
field = data.get("quantization_bits", None)
249+
if field is not None:
250+
args["quantization_bits"] = field
251+
else:
252+
args["quantization_bits"] = 0
253+
254+
field = data.get("allowed", None)
255+
if field is not None:
256+
args["allowed"] = field
257+
else:
258+
args["allowed"] = False
259+
260+
field = data.get("max_context_size", None)
261+
if field is not None:
262+
args["max_context_size"] = field
263+
else:
264+
args["max_context_size"] = 0
265+
266+
return ModelSupportedQuantization(**args)
267+
268+
269+
def unmarshal_ModelSupportedNode(data: Any) -> ModelSupportedNode:
270+
if not isinstance(data, dict):
271+
raise TypeError(
272+
"Unmarshalling the type 'ModelSupportedNode' failed as data isn't a dictionary."
273+
)
274+
275+
args: Dict[str, Any] = {}
276+
277+
field = data.get("node_type_name", None)
278+
if field is not None:
279+
args["node_type_name"] = field
280+
else:
281+
args["node_type_name"] = None
282+
283+
field = data.get("quantizations", None)
284+
if field is not None:
285+
args["quantizations"] = (
286+
[unmarshal_ModelSupportedQuantization(v) for v in field]
287+
if field is not None
288+
else None
289+
)
290+
else:
291+
args["quantizations"] = []
292+
293+
return ModelSupportedNode(**args)
294+
295+
296+
def unmarshal_ModelSupportInfo(data: Any) -> ModelSupportInfo:
297+
if not isinstance(data, dict):
298+
raise TypeError(
299+
"Unmarshalling the type 'ModelSupportInfo' failed as data isn't a dictionary."
300+
)
301+
302+
args: Dict[str, Any] = {}
303+
304+
field = data.get("nodes", None)
305+
if field is not None:
306+
args["nodes"] = (
307+
[unmarshal_ModelSupportedNode(v) for v in field]
308+
if field is not None
309+
else None
310+
)
311+
else:
312+
args["nodes"] = []
313+
314+
return ModelSupportInfo(**args)
315+
316+
317317
def unmarshal_Model(data: Any) -> Model:
318318
if not isinstance(data, dict):
319319
raise TypeError(

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,7 @@ async def check_user_owns_domain(
11061106
:param region: Region to target. If none is passed will use default region from the config.
11071107
:param project_id: ID of the project currently in use.
11081108
:return: :class:`CheckUserOwnsDomainResponse <CheckUserOwnsDomainResponse>`
1109+
:deprecated
11091110
11101111
Usage:
11111112
::

scaleway/scaleway/iam/v1alpha1/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
from .types import GetPolicyRequest
7575
from .types import GetQuotumRequest
7676
from .types import GetSSHKeyRequest
77+
from .types import GetSamlInformationRequest
7778
from .types import GetUserConnectionsRequest
7879
from .types import GetUserConnectionsResponse
7980
from .types import GetUserRequest
@@ -114,6 +115,7 @@
114115
from .types import RemoveGroupMemberRequest
115116
from .types import RemoveUserConnectionRequest
116117
from .types import Saml
118+
from .types import SamlInformation
117119
from .types import SetGroupMembersRequest
118120
from .types import SetOrganizationAliasRequest
119121
from .types import SetRulesRequest
@@ -208,6 +210,7 @@
208210
"GetPolicyRequest",
209211
"GetQuotumRequest",
210212
"GetSSHKeyRequest",
213+
"GetSamlInformationRequest",
211214
"GetUserConnectionsRequest",
212215
"GetUserConnectionsResponse",
213216
"GetUserRequest",
@@ -248,6 +251,7 @@
248251
"RemoveGroupMemberRequest",
249252
"RemoveUserConnectionRequest",
250253
"Saml",
254+
"SamlInformation",
251255
"SetGroupMembersRequest",
252256
"SetOrganizationAliasRequest",
253257
"SetRulesRequest",

0 commit comments

Comments
 (0)