|
23 | 23 | Database, |
24 | 24 | InstanceLog, |
25 | 25 | BackupSchedule, |
| 26 | + EncryptionAtRest, |
26 | 27 | InstanceSetting, |
27 | 28 | LogsPolicy, |
28 | 29 | UpgradableVersion, |
@@ -466,6 +467,21 @@ def unmarshal_BackupSchedule(data: Any) -> BackupSchedule: |
466 | 467 | return BackupSchedule(**args) |
467 | 468 |
|
468 | 469 |
|
| 470 | +def unmarshal_EncryptionAtRest(data: Any) -> EncryptionAtRest: |
| 471 | + if not isinstance(data, dict): |
| 472 | + raise TypeError( |
| 473 | + "Unmarshalling the type 'EncryptionAtRest' failed as data isn't a dictionary." |
| 474 | + ) |
| 475 | + |
| 476 | + args: Dict[str, Any] = {} |
| 477 | + |
| 478 | + field = data.get("enabled", None) |
| 479 | + if field is not None: |
| 480 | + args["enabled"] = field |
| 481 | + |
| 482 | + return EncryptionAtRest(**args) |
| 483 | + |
| 484 | + |
469 | 485 | def unmarshal_InstanceSetting(data: Any) -> InstanceSetting: |
470 | 486 | if not isinstance(data, dict): |
471 | 487 | raise TypeError( |
@@ -678,6 +694,12 @@ def unmarshal_Instance(data: Any) -> Instance: |
678 | 694 | else: |
679 | 695 | args["logs_policy"] = None |
680 | 696 |
|
| 697 | + field = data.get("encryption", None) |
| 698 | + if field is not None: |
| 699 | + args["encryption"] = unmarshal_EncryptionAtRest(field) |
| 700 | + else: |
| 701 | + args["encryption"] = None |
| 702 | + |
681 | 703 | return Instance(**args) |
682 | 704 |
|
683 | 705 |
|
@@ -1702,6 +1724,18 @@ def marshal_CreateInstanceFromSnapshotRequest( |
1702 | 1724 | return output |
1703 | 1725 |
|
1704 | 1726 |
|
| 1727 | +def marshal_EncryptionAtRest( |
| 1728 | + request: EncryptionAtRest, |
| 1729 | + defaults: ProfileDefaults, |
| 1730 | +) -> Dict[str, Any]: |
| 1731 | + output: Dict[str, Any] = {} |
| 1732 | + |
| 1733 | + if request.enabled is not None: |
| 1734 | + output["enabled"] = request.enabled |
| 1735 | + |
| 1736 | + return output |
| 1737 | + |
| 1738 | + |
1705 | 1739 | def marshal_CreateInstanceRequest( |
1706 | 1740 | request: CreateInstanceRequest, |
1707 | 1741 | defaults: ProfileDefaults, |
@@ -1765,6 +1799,9 @@ def marshal_CreateInstanceRequest( |
1765 | 1799 | marshal_EndpointSpec(item, defaults) for item in request.init_endpoints |
1766 | 1800 | ] |
1767 | 1801 |
|
| 1802 | + if request.encryption is not None: |
| 1803 | + output["encryption"] = marshal_EncryptionAtRest(request.encryption, defaults) |
| 1804 | + |
1768 | 1805 | return output |
1769 | 1806 |
|
1770 | 1807 |
|
|
0 commit comments