/// <summary> /// Constructor. Takes the service client object representing the protected item /// and converts it in to the PS protected item model /// </summary> /// <param name="protectedItemResource">Service client object representing the protected item resource</param> /// <param name="containerName">Name of the container associated with this protected item</param> /// <param name="containerType">Type of the container associated with this protected item</param> /// <param name="policyName">Name of the protection policy associated with this protected item</param> public AzureSqlItem(ProtectedItemResource protectedItemResource, string containerName, ContainerType containerType, string policyName) : base(protectedItemResource, containerName, containerType) { AzureSqlProtectedItem protectedItem = (AzureSqlProtectedItem)protectedItemResource.Properties; ProtectedItemDataId = protectedItem.ProtectedItemDataId; ProtectionState = protectedItem.ProtectionState; ProtectionPolicyName = policyName; }
/// <summary> /// Constructor. Takes the service client object representing the protected item /// and converts it in to the PS protected item model /// </summary> /// <param name="protectedItemResource">Service client object representing the protected item resource</param> /// <param name="containerName">Name of the container associated with this protected item</param> /// <param name="containerType">Type of the container associated with this protected item</param> /// <param name="policyName">Name of the protection policy associated with this protected item</param> public AzureVmItem(ProtectedItemResource protectedItemResource, string containerName, ContainerType containerType, string policyName) : base(protectedItemResource, containerName, containerType) { AzureIaaSVMProtectedItem protectedItem = (AzureIaaSVMProtectedItem)protectedItemResource.Properties; LastBackupStatus = protectedItem.LastBackupStatus; ProtectionPolicyName = policyName; ProtectionState = EnumUtils.GetEnum<ItemProtectionState>(protectedItem.ProtectionState); ProtectionStatus = EnumUtils.GetEnum<ItemProtectionStatus>(protectedItem.ProtectionStatus); VirtualMachineId = protectedItem.VirtualMachineId; }
public ContainerContext(ContainerType containerType, string backupManagementType) : base(backupManagementType) { ContainerType = containerType; }
public ItemBase(ServiceClientModel.ProtectedItemResource protectedItemResource, string containerName, ContainerType containerType) : base((ServiceClientModel.ProtectedItem)protectedItemResource.Properties, containerName, containerType) { ServiceClientModel.ProtectedItem protectedItem = (ServiceClientModel.ProtectedItem)protectedItemResource.Properties; Name = protectedItemResource.Name; Id = protectedItemResource.Id; LatestRecoveryPoint = protectedItem.LastRecoveryPoint; SourceResourceId = protectedItem.SourceResourceId; }
public ItemContext(ServiceClientModel.ProtectedItem protectedItem, string containerName, ContainerType containerType) : base(containerType, protectedItem.BackupManagementType) { WorkloadType = ConversionUtils.GetPsWorkloadType(protectedItem.WorkloadType); ContainerName = containerName; }