Skip to content

Commit b68e403

Browse files
committed
Merge pull request AzureRT#174 from MabOneSdk/dev1-sudreddy
Added base object models for policy
2 parents be8a5fc + f570a50 commit b68e403

File tree

7 files changed

+686
-2
lines changed

7 files changed

+686
-2
lines changed

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Models/BaseObjects.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,29 @@ public class AzureRmRecoveryServicesItemBase
3737
{
3838
}
3939

40+
public class AzureRmRecoveryServicesRecoveryPointBase
41+
{
42+
}
43+
4044
public class AzureRmRecoveryServicesPolicyBase
4145
{
46+
public BackupManagementType BackupManagementType { get; set; }
47+
48+
public WorkloadType WorkloadType { get; set; }
49+
4250
}
4351

44-
public class AzureRmRecoveryServicesRecoveryPointBase
52+
public class AzureRmRecoveryServicesRetentionPolicyBase
4553
{
54+
public virtual void Validate()
55+
{
56+
}
4657
}
58+
59+
public class AzureRmRecoveryServicesSchedulePolicyBase
60+
{
61+
public virtual void Validate()
62+
{
63+
}
64+
}
4765
}

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Models/Commands.RecoveryServices.Backup.Models.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@
4141
<ItemGroup>
4242
<Compile Include="BaseObjects.cs" />
4343
<Compile Include="CmdletParamEnums.cs" />
44-
<Compile Include="CommonEnums.cs" />
44+
<Compile Include="CommonModels\Utils.cs" />
45+
<Compile Include="CommonModels\Enums.cs" />
46+
<Compile Include="CommonModels\PolicyRetentionObjects.cs" />
47+
<Compile Include="CommonModels\PolicyScheduleObjects.cs" />
4548
<Compile Include="IaasVmModels\AzureRmRecoveryServicesIaasVmPolicy.cs" />
4649
<Compile Include="IaasVmModels\AzureRmRecoveryServicesIaasVmItem.cs" />
4750
<Compile Include="IaasVmModels\AzureRmRecoveryServicesIaasVmContainer.cs" />

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Models/CommonEnums.cs renamed to src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Models/CommonModels/Enums.cs

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,56 @@ public enum ContainerRegistrationStatus
4343
Registered = 1,
4444
Registering,
4545
}
46+
47+
#region policy
48+
public enum WeekNumber
49+
{
50+
First,
51+
Second,
52+
Third,
53+
Fourth,
54+
Last
55+
}
56+
public enum Month
57+
{
58+
Invalid = 0,
59+
January = 1,
60+
February = 2,
61+
March = 3,
62+
April = 4,
63+
May = 5,
64+
June = 6,
65+
July = 7,
66+
August = 8,
67+
September = 9,
68+
October = 10,
69+
November = 11,
70+
December = 12
71+
}
72+
73+
public enum ScheduleRunType
74+
{
75+
Invalid = 0,
76+
Daily = 1,
77+
Weekly = 2,
78+
}
79+
80+
public enum RetentionDurationType
81+
{
82+
Invalid = 0,
83+
Days = 1,
84+
Weeks = 2,
85+
Months = 3,
86+
Years = 4
87+
}
88+
89+
public enum RetentionScheduleFormat
90+
{
91+
Invalid = 0,
92+
Daily = 1,
93+
Weekly = 2
94+
}
95+
96+
#endregion
97+
4698
}

0 commit comments

Comments
 (0)