From 3c1cd49e98ffc1def2fd4bdf3cf592b60ed434aa Mon Sep 17 00:00:00 2001 From: pikumarmsft Date: Fri, 29 May 2015 15:29:15 +0530 Subject: [PATCH 1/2] Adding AzureBackupItemContextObject class and AzureBackupItem.cs file --- .../Models/AzureBackupBaseObjects.cs | 8 ++ .../Models/AzureBackupItem.cs | 83 +++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupItem.cs diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs index cfee78bec859..227412839abf 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs @@ -54,4 +54,12 @@ public class AzureBackupContainerContextObject : AzureBackupVaultContextObject /// public string ContainerId { get; set; } } + + public class AzureBackupItemContextObject : AzureBackupContainerContextObject + { + /// + /// DataSourceId of Azure Backup Item + /// + public string DataSourceId { get; set; } + } } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupItem.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupItem.cs new file mode 100644 index 000000000000..28f6e6607364 --- /dev/null +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupItem.cs @@ -0,0 +1,83 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets +{ + /// + /// Represents Azure Backup Container + /// + public class AzureBackupItem : AzureBackupItemContextObject + { + /// + /// Status for the Azure Backup Item + /// + public string Status { get; set; } + + /// + /// Protection Status for the Azure Backup Item + /// + public string ProtectionStatus { get; set; } + + /// + /// Protectable Object Name for the Azure Backup Item + /// + public string ProtectableObjectName { get; set; } + + /// + /// Protection Policy Name for the Azure Backup Item + /// + public string ProtectionPolicyName { get; set; } + + /// + /// Protection Policy Id for the Azure Backup Item + /// + public string ProtectionPolicyId { get; set; } + + /// + /// Policy Inconsistent for the Azure Backup Item + /// + public bool PolicyInconsistent { get; set; } + + /// + /// Recovery Points Count for the Azure Backup Item + /// + public int RecoveryPointsCount { get; set; } + + /// + /// Last Recovery Point for the Azure Backup Item + /// + public DateTime? LastRecoveryPoint { get; set; } + + /// + /// Last Backup Time for the Azure Backup Item + /// + public DateTime? LastBackupTime { get; set; } + + /// + /// Last Backup Status for the Azure Backup Item + /// + public string LastBackupStatus { get; set; } + + /// + /// Last Backup Job Id for the Azure Backup Item + /// + public string LastBackupJobId { get; set; } + } +} \ No newline at end of file From e571e451fffb1ccc84bdaa718d8ef4f4d206c56e Mon Sep 17 00:00:00 2001 From: pikumarmsft Date: Fri, 29 May 2015 16:18:47 +0530 Subject: [PATCH 2/2] Adding DataSourceType in AzureBackupItemContextObject class --- .../Commands.AzureBackup/Models/AzureBackupBaseObjects.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs index 227412839abf..b50deee0f03e 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs @@ -61,5 +61,10 @@ public class AzureBackupItemContextObject : AzureBackupContainerContextObject /// DataSourceId of Azure Backup Item /// public string DataSourceId { get; set; } + + /// + /// DataSourceId of Azure Backup Item + /// + public string DataSourceType { get; set; } } }