public static PSNetAppFilesVolumeDataProtection ConvertDataProtectionToPs(VolumePropertiesDataProtection DataProtection) { var psDataProtection = new PSNetAppFilesVolumeDataProtection(); if (DataProtection.Replication != null) { var replication = new PSNetAppFilesReplicationObject(); // replication.ReplicationId = DataProtection.Replication.ReplicationId; replication.EndpointType = DataProtection.Replication.EndpointType; replication.ReplicationSchedule = DataProtection.Replication.ReplicationSchedule; replication.RemoteVolumeResourceId = DataProtection.Replication.RemoteVolumeResourceId; // replication.RemoteVolumeRegion = DataProtection.Replication.RemoteVolumeRegion; psDataProtection.Replication = replication; } if (DataProtection.Snapshot != null) { var snapshot = new PSNetAppFilesVolumeSnapshot(); snapshot.SnapshotPolicyId = DataProtection.Snapshot.SnapshotPolicyId; psDataProtection.Snapshot = snapshot; } if (DataProtection.Backup != null) { var psBackupProps = new PSNetAppFilesVolumeBackupProperties() { BackupEnabled = DataProtection.Backup.BackupEnabled, BackupPolicyId = DataProtection.Backup.BackupPolicyId, PolicyEnforced = DataProtection.Backup.PolicyEnforced, VaultId = DataProtection.Backup.VaultId }; psDataProtection.Backup = psBackupProps; } return(psDataProtection); }
public static PSNetAppFilesVolumeDataProtection ConvertDataProtectionToPs(VolumePropertiesDataProtection DataProtection) { var psDataProtection = new PSNetAppFilesVolumeDataProtection(); var replication = new PSNetAppFilesReplicationObject(); // replication.ReplicationId = DataProtection.Replication.ReplicationId; replication.EndpointType = DataProtection.Replication.EndpointType; replication.ReplicationSchedule = DataProtection.Replication.ReplicationSchedule; replication.RemoteVolumeResourceId = DataProtection.Replication.RemoteVolumeResourceId; // replication.RemoteVolumeRegion = DataProtection.Replication.RemoteVolumeRegion; psDataProtection.Replication = replication; return(psDataProtection); }
public static PSNetAppFilesVolumeDataProtection ConvertDataProtectionToPs(VolumePropertiesDataProtection DataProtection) { var psDataProtection = new PSNetAppFilesVolumeDataProtection(); if (DataProtection.Replication != null) { var replication = new PSNetAppFilesReplicationObject(); // replication.ReplicationId = DataProtection.Replication.ReplicationId; replication.EndpointType = DataProtection.Replication.EndpointType; replication.ReplicationSchedule = DataProtection.Replication.ReplicationSchedule; replication.RemoteVolumeResourceId = DataProtection.Replication.RemoteVolumeResourceId; // replication.RemoteVolumeRegion = DataProtection.Replication.RemoteVolumeRegion; psDataProtection.Replication = replication; } if (DataProtection.Snapshot != null) { var snapshot = new PSNetAppFilesVolumeSnapshot(); snapshot.SnapshotPolicyId = DataProtection.Snapshot.SnapshotPolicyId; } return(psDataProtection); }