示例#1
0
        public bool Equals(GlacierSettings other)
        {
            if (other == null)
            {
                return(false);
            }

            if (WasEnabled(other))
            {
                return(true);
            }

            if (other.AwsRegionName != AwsRegionName)
            {
                return(false);
            }

            if (other.VaultName != VaultName)
            {
                return(false);
            }

            if (other.RemoteFolderName != RemoteFolderName)
            {
                return(false);
            }

            return(true);
        }
示例#2
0
 public virtual DynamicJsonValue ToJson()
 {
     return(new DynamicJsonValue
     {
         [nameof(BackupType)] = BackupType,
         [nameof(SnapshotSettings)] = SnapshotSettings?.ToJson(),
         [nameof(BackupEncryptionSettings)] = BackupEncryptionSettings?.ToJson(),
         [nameof(LocalSettings)] = LocalSettings?.ToJson(),
         [nameof(S3Settings)] = S3Settings?.ToJson(),
         [nameof(GlacierSettings)] = GlacierSettings?.ToJson(),
         [nameof(AzureSettings)] = AzureSettings?.ToJson(),
         [nameof(GoogleCloudSettings)] = GoogleCloudSettings?.ToJson(),
         [nameof(FtpSettings)] = FtpSettings?.ToJson()
     });
 }
示例#3
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()
     });
 }
示例#4
0
        internal GlacierSettings(GlacierSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            VaultName       = settings.VaultName;
            AwsRegionName   = settings.AwsRegionName;
            AwsAccessKey    = settings.AwsAccessKey;
            AwsSecretKey    = settings.AwsSecretKey;
            AwsSessionToken = settings.AwsSessionToken;

            RemoteFolderName = settings.RemoteFolderName;
            Disabled         = settings.Disabled;

            if (settings.GetBackupConfigurationScript != null)
            {
                GetBackupConfigurationScript = new GetBackupConfigurationScript(settings.GetBackupConfigurationScript);
            }
        }