/// <summary>
 /// Create the recovery plan.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.SiteRecovery.IRecoveryPlanOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Create recovery plan input parameters.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the Job details object.
 /// </returns>
 public static JobResponse CreateRecoveryPlan(this IRecoveryPlanOperations operations, RecoveryPlanXmlData parameters, CustomRequestHeaders customRequestHeaders)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IRecoveryPlanOperations)s).CreateRecoveryPlanAsync(parameters, customRequestHeaders);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
        /// <summary>
        /// Update Azure Site Recovery Recovery Plan.
        /// </summary>
        /// <param name="recoveryPlanXml">Recovery Plan Xml.</param>
        /// <returns>Job response</returns>
        public JobResponse UpdateAzureSiteRecoveryRecoveryPlan(string recoveryPlanXml)
        {
            RecoveryPlanXmlData recoveryPlanXmlData = new RecoveryPlanXmlData
            {
                RecoveryPlanXml = recoveryPlanXml
            };

            return this.GetSiteRecoveryClient().RecoveryPlan.UpdateRecoveryPlan(
                recoveryPlanXmlData,
                this.GetRequestHeaders());
        }
 /// <summary>
 /// Update the recovery plan.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.SiteRecovery.IRecoveryPlanOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Update recovery plan input parameters.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the Job details object.
 /// </returns>
 public static Task<JobResponse> UpdateRecoveryPlanAsync(this IRecoveryPlanOperations operations, RecoveryPlanXmlData parameters, CustomRequestHeaders customRequestHeaders)
 {
     return operations.UpdateRecoveryPlanAsync(parameters, customRequestHeaders, CancellationToken.None);
 }