|
12 | 12 | from .types import ( |
13 | 13 | Contract, |
14 | 14 | ContractSignature, |
15 | | - Project, |
16 | | - CheckContractSignatureResponse, |
17 | | - ListContractSignaturesResponse, |
18 | | - ListProjectsResponse, |
19 | 15 | QualificationAiMachine, |
20 | 16 | QualificationArchiveData, |
21 | 17 | QualificationContainer, |
|
26 | 22 | QualificationSetScalewayEnvironment, |
27 | 23 | QualificationShareData, |
28 | 24 | Qualification, |
| 25 | + Project, |
| 26 | + CheckContractSignatureResponse, |
| 27 | + ListContractSignaturesResponse, |
| 28 | + ListProjectsResponse, |
29 | 29 | ProjectQualification, |
30 | 30 | ContractApiCheckContractSignatureRequest, |
31 | 31 | ContractApiCreateContractSignatureRequest, |
@@ -117,112 +117,6 @@ def unmarshal_ContractSignature(data: Any) -> ContractSignature: |
117 | 117 | return ContractSignature(**args) |
118 | 118 |
|
119 | 119 |
|
120 | | -def unmarshal_Project(data: Any) -> Project: |
121 | | - if not isinstance(data, dict): |
122 | | - raise TypeError( |
123 | | - "Unmarshalling the type 'Project' failed as data isn't a dictionary." |
124 | | - ) |
125 | | - |
126 | | - args: Dict[str, Any] = {} |
127 | | - |
128 | | - field = data.get("id", None) |
129 | | - if field is not None: |
130 | | - args["id"] = field |
131 | | - |
132 | | - field = data.get("name", None) |
133 | | - if field is not None: |
134 | | - args["name"] = field |
135 | | - |
136 | | - field = data.get("organization_id", None) |
137 | | - if field is not None: |
138 | | - args["organization_id"] = field |
139 | | - |
140 | | - field = data.get("description", None) |
141 | | - if field is not None: |
142 | | - args["description"] = field |
143 | | - |
144 | | - field = data.get("created_at", None) |
145 | | - if field is not None: |
146 | | - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field |
147 | | - else: |
148 | | - args["created_at"] = None |
149 | | - |
150 | | - field = data.get("updated_at", None) |
151 | | - if field is not None: |
152 | | - args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field |
153 | | - else: |
154 | | - args["updated_at"] = None |
155 | | - |
156 | | - return Project(**args) |
157 | | - |
158 | | - |
159 | | -def unmarshal_CheckContractSignatureResponse( |
160 | | - data: Any, |
161 | | -) -> CheckContractSignatureResponse: |
162 | | - if not isinstance(data, dict): |
163 | | - raise TypeError( |
164 | | - "Unmarshalling the type 'CheckContractSignatureResponse' failed as data isn't a dictionary." |
165 | | - ) |
166 | | - |
167 | | - args: Dict[str, Any] = {} |
168 | | - |
169 | | - field = data.get("created", None) |
170 | | - if field is not None: |
171 | | - args["created"] = field |
172 | | - |
173 | | - field = data.get("validated", None) |
174 | | - if field is not None: |
175 | | - args["validated"] = field |
176 | | - |
177 | | - return CheckContractSignatureResponse(**args) |
178 | | - |
179 | | - |
180 | | -def unmarshal_ListContractSignaturesResponse( |
181 | | - data: Any, |
182 | | -) -> ListContractSignaturesResponse: |
183 | | - if not isinstance(data, dict): |
184 | | - raise TypeError( |
185 | | - "Unmarshalling the type 'ListContractSignaturesResponse' failed as data isn't a dictionary." |
186 | | - ) |
187 | | - |
188 | | - args: Dict[str, Any] = {} |
189 | | - |
190 | | - field = data.get("total_count", None) |
191 | | - if field is not None: |
192 | | - args["total_count"] = field |
193 | | - |
194 | | - field = data.get("contract_signatures", None) |
195 | | - if field is not None: |
196 | | - args["contract_signatures"] = ( |
197 | | - [unmarshal_ContractSignature(v) for v in field] |
198 | | - if field is not None |
199 | | - else None |
200 | | - ) |
201 | | - |
202 | | - return ListContractSignaturesResponse(**args) |
203 | | - |
204 | | - |
205 | | -def unmarshal_ListProjectsResponse(data: Any) -> ListProjectsResponse: |
206 | | - if not isinstance(data, dict): |
207 | | - raise TypeError( |
208 | | - "Unmarshalling the type 'ListProjectsResponse' failed as data isn't a dictionary." |
209 | | - ) |
210 | | - |
211 | | - args: Dict[str, Any] = {} |
212 | | - |
213 | | - field = data.get("total_count", None) |
214 | | - if field is not None: |
215 | | - args["total_count"] = field |
216 | | - |
217 | | - field = data.get("projects", None) |
218 | | - if field is not None: |
219 | | - args["projects"] = ( |
220 | | - [unmarshal_Project(v) for v in field] if field is not None else None |
221 | | - ) |
222 | | - |
223 | | - return ListProjectsResponse(**args) |
224 | | - |
225 | | - |
226 | 120 | def unmarshal_QualificationAiMachine(data: Any) -> QualificationAiMachine: |
227 | 121 | if not isinstance(data, dict): |
228 | 122 | raise TypeError( |
@@ -431,6 +325,118 @@ def unmarshal_Qualification(data: Any) -> Qualification: |
431 | 325 | return Qualification(**args) |
432 | 326 |
|
433 | 327 |
|
| 328 | +def unmarshal_Project(data: Any) -> Project: |
| 329 | + if not isinstance(data, dict): |
| 330 | + raise TypeError( |
| 331 | + "Unmarshalling the type 'Project' failed as data isn't a dictionary." |
| 332 | + ) |
| 333 | + |
| 334 | + args: Dict[str, Any] = {} |
| 335 | + |
| 336 | + field = data.get("id", None) |
| 337 | + if field is not None: |
| 338 | + args["id"] = field |
| 339 | + |
| 340 | + field = data.get("name", None) |
| 341 | + if field is not None: |
| 342 | + args["name"] = field |
| 343 | + |
| 344 | + field = data.get("organization_id", None) |
| 345 | + if field is not None: |
| 346 | + args["organization_id"] = field |
| 347 | + |
| 348 | + field = data.get("description", None) |
| 349 | + if field is not None: |
| 350 | + args["description"] = field |
| 351 | + |
| 352 | + field = data.get("created_at", None) |
| 353 | + if field is not None: |
| 354 | + args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field |
| 355 | + else: |
| 356 | + args["created_at"] = None |
| 357 | + |
| 358 | + field = data.get("updated_at", None) |
| 359 | + if field is not None: |
| 360 | + args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field |
| 361 | + else: |
| 362 | + args["updated_at"] = None |
| 363 | + |
| 364 | + field = data.get("qualification", None) |
| 365 | + if field is not None: |
| 366 | + args["qualification"] = unmarshal_Qualification(field) |
| 367 | + else: |
| 368 | + args["qualification"] = None |
| 369 | + |
| 370 | + return Project(**args) |
| 371 | + |
| 372 | + |
| 373 | +def unmarshal_CheckContractSignatureResponse( |
| 374 | + data: Any, |
| 375 | +) -> CheckContractSignatureResponse: |
| 376 | + if not isinstance(data, dict): |
| 377 | + raise TypeError( |
| 378 | + "Unmarshalling the type 'CheckContractSignatureResponse' failed as data isn't a dictionary." |
| 379 | + ) |
| 380 | + |
| 381 | + args: Dict[str, Any] = {} |
| 382 | + |
| 383 | + field = data.get("created", None) |
| 384 | + if field is not None: |
| 385 | + args["created"] = field |
| 386 | + |
| 387 | + field = data.get("validated", None) |
| 388 | + if field is not None: |
| 389 | + args["validated"] = field |
| 390 | + |
| 391 | + return CheckContractSignatureResponse(**args) |
| 392 | + |
| 393 | + |
| 394 | +def unmarshal_ListContractSignaturesResponse( |
| 395 | + data: Any, |
| 396 | +) -> ListContractSignaturesResponse: |
| 397 | + if not isinstance(data, dict): |
| 398 | + raise TypeError( |
| 399 | + "Unmarshalling the type 'ListContractSignaturesResponse' failed as data isn't a dictionary." |
| 400 | + ) |
| 401 | + |
| 402 | + args: Dict[str, Any] = {} |
| 403 | + |
| 404 | + field = data.get("total_count", None) |
| 405 | + if field is not None: |
| 406 | + args["total_count"] = field |
| 407 | + |
| 408 | + field = data.get("contract_signatures", None) |
| 409 | + if field is not None: |
| 410 | + args["contract_signatures"] = ( |
| 411 | + [unmarshal_ContractSignature(v) for v in field] |
| 412 | + if field is not None |
| 413 | + else None |
| 414 | + ) |
| 415 | + |
| 416 | + return ListContractSignaturesResponse(**args) |
| 417 | + |
| 418 | + |
| 419 | +def unmarshal_ListProjectsResponse(data: Any) -> ListProjectsResponse: |
| 420 | + if not isinstance(data, dict): |
| 421 | + raise TypeError( |
| 422 | + "Unmarshalling the type 'ListProjectsResponse' failed as data isn't a dictionary." |
| 423 | + ) |
| 424 | + |
| 425 | + args: Dict[str, Any] = {} |
| 426 | + |
| 427 | + field = data.get("total_count", None) |
| 428 | + if field is not None: |
| 429 | + args["total_count"] = field |
| 430 | + |
| 431 | + field = data.get("projects", None) |
| 432 | + if field is not None: |
| 433 | + args["projects"] = ( |
| 434 | + [unmarshal_Project(v) for v in field] if field is not None else None |
| 435 | + ) |
| 436 | + |
| 437 | + return ListProjectsResponse(**args) |
| 438 | + |
| 439 | + |
434 | 440 | def unmarshal_ProjectQualification(data: Any) -> ProjectQualification: |
435 | 441 | if not isinstance(data, dict): |
436 | 442 | raise TypeError( |
|
0 commit comments