@@ -227,9 +227,11 @@ def __init__(
227
227
def from_json (cls , json_dict : Dict [str , Any ]) -> AzureSettings :
228
228
return cls (
229
229
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
+ ),
233
235
json_dict ["StorageContainer" ],
234
236
json_dict ["RemoteFolderName" ],
235
237
json_dict ["AccountName" ],
@@ -240,9 +242,9 @@ def from_json(cls, json_dict: Dict[str, Any]) -> AzureSettings:
240
242
def to_json (self ) -> Dict [str , Any ]:
241
243
return {
242
244
"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
+ ) ,
246
248
"StorageContainer" : self .storage_container ,
247
249
"RemoteFolderName" : self .remote_folder_name ,
248
250
"AccountName" : self .account_name ,
@@ -275,9 +277,11 @@ def __init__(
275
277
def from_json (cls , json_dict : Dict [str , Any ]) -> FtpSettings :
276
278
return cls (
277
279
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
+ ),
281
285
json_dict ["Url" ],
282
286
json_dict ["Port" ] if "Port" in json_dict else None ,
283
287
json_dict ["UserName" ],
@@ -289,9 +293,9 @@ def from_json(cls, json_dict: Dict[str, Any]) -> FtpSettings:
289
293
def to_json (self ) -> Dict [str , Any ]:
290
294
return {
291
295
"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
+ ) ,
295
299
"Url" : self .url ,
296
300
"Port" : self .port ,
297
301
"UserName" : self .user_name ,
@@ -419,26 +423,30 @@ def from_json(cls, json_dict: Dict[str, Any]) -> BackupConfiguration:
419
423
return cls (
420
424
BackupType (json_dict ["BackupType" ]),
421
425
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
+ ),
425
431
LocalSettings .from_json (json_dict ["LocalSettings" ]) if json_dict ["LocalSettings" ] else None ,
426
432
S3Settings .from_json (json_dict ["S3Settings" ]) if json_dict ["S3Settings" ] else None ,
427
433
GlacierSettings .from_json (json_dict ["GlacierSettings" ]) if json_dict ["GlacierSettings" ] else None ,
428
434
AzureSettings .from_json (json_dict ["AzureSettings" ]) if json_dict ["AzureSettings" ] else None ,
429
435
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
+ ),
433
441
)
434
442
435
443
def to_json (self ) -> Dict [str , Any ]:
436
444
return {
437
445
"BackupType" : self .backup_type .value if self .backup_type else None ,
438
446
"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
+ ) ,
442
450
"LocalSettings" : self .local_settings .to_json () if self .local_settings else None ,
443
451
"S3Settings" : self .s3_settings .to_json () if self .s3_settings else None ,
444
452
"GlacierSettings" : self .glacier_settings .to_json () if self .glacier_settings else None ,
0 commit comments