internal static BackupRestoreView.RetentionPolicy ToRetentionPolicyView(RetentionPolicy retentionPolicy)
 {
     if(retentionPolicy == null)
     {
         return null;
     }
     BackupRestoreView.RetentionPolicy retentionPolicyView = null;
     if (retentionPolicy.RetentionPolicyType == RetentionPolicyType.Basic)
     {
         retentionPolicyView = BasicRetentionPolicy.ToBasicRetentionPolicyView((BasicRetentionPolicy)retentionPolicy);
         retentionPolicyView.RetentionPolicyType = RetentionPolicyType.Basic;
     }
     return retentionPolicyView;
 }
 internal static RetentionPolicy FromRetentionPolicyView(BackupRestoreView.RetentionPolicy retentionPolicyView)
 {
     if(retentionPolicyView ==null)
     {
         return null;
     }
     RetentionPolicy retentionPolicy = null;
     if (retentionPolicyView.RetentionPolicyType == RetentionPolicyType.Basic)
     {
         retentionPolicy =
             BasicRetentionPolicy.FromBasicRetentionPolicyView(
                 (BackupRestoreView.BasicRetentionPolicy) retentionPolicyView);
     }
     return retentionPolicy;
     
 }