@@ -227,9 +227,11 @@ def __init__(
227227 def from_json (cls , json_dict : Dict [str , Any ]) -> AzureSettings :
228228 return cls (
229229 json_dict ["Disabled" ],
230- GetBackupConfigurationScript .from_json (json_dict ["GetBackupConfigurationScript" ])
231- if json_dict ["GetBackupConfigurationScript" ]
232- else None ,
230+ (
231+ GetBackupConfigurationScript .from_json (json_dict ["GetBackupConfigurationScript" ])
232+ if json_dict ["GetBackupConfigurationScript" ]
233+ else None
234+ ),
233235 json_dict ["StorageContainer" ],
234236 json_dict ["RemoteFolderName" ],
235237 json_dict ["AccountName" ],
@@ -240,9 +242,9 @@ def from_json(cls, json_dict: Dict[str, Any]) -> AzureSettings:
240242 def to_json (self ) -> Dict [str , Any ]:
241243 return {
242244 "Disabled" : self .disabled ,
243- "GetBackupConfigurationScript" : self . get_backup_configuration_script . to_json ()
244- if self .get_backup_configuration_script
245- else None ,
245+ "GetBackupConfigurationScript" : (
246+ self . get_backup_configuration_script . to_json () if self .get_backup_configuration_script else None
247+ ) ,
246248 "StorageContainer" : self .storage_container ,
247249 "RemoteFolderName" : self .remote_folder_name ,
248250 "AccountName" : self .account_name ,
@@ -275,9 +277,11 @@ def __init__(
275277 def from_json (cls , json_dict : Dict [str , Any ]) -> FtpSettings :
276278 return cls (
277279 json_dict ["Disabled" ],
278- GetBackupConfigurationScript .from_json (json_dict ["GetBackupConfigurationScript" ])
279- if json_dict ["GetBackupConfigurationScript" ]
280- else None ,
280+ (
281+ GetBackupConfigurationScript .from_json (json_dict ["GetBackupConfigurationScript" ])
282+ if json_dict ["GetBackupConfigurationScript" ]
283+ else None
284+ ),
281285 json_dict ["Url" ],
282286 json_dict ["Port" ] if "Port" in json_dict else None ,
283287 json_dict ["UserName" ],
@@ -289,9 +293,9 @@ def from_json(cls, json_dict: Dict[str, Any]) -> FtpSettings:
289293 def to_json (self ) -> Dict [str , Any ]:
290294 return {
291295 "Disabled" : self .disabled ,
292- "GetBackupConfigurationScript" : self . get_backup_configuration_script . to_json ()
293- if self .get_backup_configuration_script
294- else None ,
296+ "GetBackupConfigurationScript" : (
297+ self . get_backup_configuration_script . to_json () if self .get_backup_configuration_script else None
298+ ) ,
295299 "Url" : self .url ,
296300 "Port" : self .port ,
297301 "UserName" : self .user_name ,
@@ -419,26 +423,30 @@ def from_json(cls, json_dict: Dict[str, Any]) -> BackupConfiguration:
419423 return cls (
420424 BackupType (json_dict ["BackupType" ]),
421425 SnapshotSettings .from_json (json_dict ["SnapshotSettings" ]) if json_dict ["SnapshotSettings" ] else None ,
422- BackupEncryptionSettings .from_json (json_dict ["BackupEncryptionSettings" ])
423- if json_dict ["BackupEncryptionSettings" ]
424- else None ,
426+ (
427+ BackupEncryptionSettings .from_json (json_dict ["BackupEncryptionSettings" ])
428+ if json_dict ["BackupEncryptionSettings" ]
429+ else None
430+ ),
425431 LocalSettings .from_json (json_dict ["LocalSettings" ]) if json_dict ["LocalSettings" ] else None ,
426432 S3Settings .from_json (json_dict ["S3Settings" ]) if json_dict ["S3Settings" ] else None ,
427433 GlacierSettings .from_json (json_dict ["GlacierSettings" ]) if json_dict ["GlacierSettings" ] else None ,
428434 AzureSettings .from_json (json_dict ["AzureSettings" ]) if json_dict ["AzureSettings" ] else None ,
429435 FtpSettings .from_json (json_dict ["FtpSettings" ]) if json_dict ["FtpSettings" ] else None ,
430- GoogleCloudSettings .from_json (json_dict ["GoogleCloudSettings" ])
431- if json_dict ["GoogleCloudSettings" ]
432- else None ,
436+ (
437+ GoogleCloudSettings .from_json (json_dict ["GoogleCloudSettings" ])
438+ if json_dict ["GoogleCloudSettings" ]
439+ else None
440+ ),
433441 )
434442
435443 def to_json (self ) -> Dict [str , Any ]:
436444 return {
437445 "BackupType" : self .backup_type .value if self .backup_type else None ,
438446 "SnapshotSettings" : self .snapshot_settings .to_json () if self .snapshot_settings else None ,
439- "BackupEncryptionSettings" : self . backup_encryption_settings . to_json ()
440- if self .backup_encryption_settings
441- else None ,
447+ "BackupEncryptionSettings" : (
448+ self . backup_encryption_settings . to_json () if self .backup_encryption_settings else None
449+ ) ,
442450 "LocalSettings" : self .local_settings .to_json () if self .local_settings else None ,
443451 "S3Settings" : self .s3_settings .to_json () if self .s3_settings else None ,
444452 "GlacierSettings" : self .glacier_settings .to_json () if self .glacier_settings else None ,
0 commit comments