Пример #1
0
        public AzureRMBackupItem(CSMProtectedItemResponse datasource, AzureRMBackupContainer azureBackupContainer)
            : base(datasource, azureBackupContainer)
        {
            DataSourceStatus = datasource.Properties.ProtectionStatus;
            ProtectionStatus = datasource.Properties.Status;
            ItemName = datasource.Name;
            Name = datasource.Properties.FriendlyName;

            if (datasource.Properties.ProtectionPolicyId != null)
            {
                ProtectionPolicyName = datasource.Properties.ProtectionPolicyId.Split('/').Last();
            }

            ProtectionPolicyId = datasource.Properties.ProtectionPolicyId;
            RecoveryPointsCount = datasource.Properties.RecoveryPointsCount;
            Type = ItemHelpers.GetTypeForItem(datasource.Properties.ItemType);
        }
 public AzureRMBackupItemContextObject(CSMProtectedItemResponse item, AzureRMBackupContainer azureBackupContainer)
     : base(azureBackupContainer)
 {
     ItemName = item.Name;
 }
 public void WriteAzureBackupItem(CSMProtectedItemResponse sourceItem, AzureRMBackupContainer azureBackupItem)
 {
     this.WriteObject(new AzureRMBackupItem(sourceItem, azureBackupItem));
 }