public override DynamicJsonValue ToJson()
        {
            var json = base.ToJson();

            json[nameof(Name)]                       = Name;
            json[nameof(TaskId)]                     = TaskId;
            json[nameof(Disabled)]                   = Disabled;
            json[nameof(MentorNode)]                 = MentorNode;
            json[nameof(FullBackupFrequency)]        = FullBackupFrequency;
            json[nameof(IncrementalBackupFrequency)] = IncrementalBackupFrequency;
            json[nameof(RetentionPolicy)]            = RetentionPolicy?.ToJson();
            return(json);
        }
Exemple #2
0
 public DynamicJsonValue ToJson()
 {
     return(new DynamicJsonValue
     {
         [nameof(TaskId)] = TaskId,
         [nameof(Disabled)] = Disabled,
         [nameof(Name)] = Name,
         [nameof(MentorNode)] = MentorNode,
         [nameof(BackupType)] = BackupType,
         [nameof(BackupEncryptionSettings)] = BackupEncryptionSettings?.ToJson(),
         [nameof(RetentionPolicy)] = RetentionPolicy?.ToJson(),
         [nameof(FullBackupFrequency)] = FullBackupFrequency,
         [nameof(IncrementalBackupFrequency)] = IncrementalBackupFrequency,
         [nameof(LocalSettings)] = LocalSettings?.ToJson(),
         [nameof(S3Settings)] = S3Settings?.ToJson(),
         [nameof(GlacierSettings)] = GlacierSettings?.ToJson(),
         [nameof(AzureSettings)] = AzureSettings?.ToJson(),
         [nameof(GoogleCloudSettings)] = GoogleCloudSettings?.ToJson(),
         [nameof(FtpSettings)] = FtpSettings?.ToJson()
     });
 }