/// <summary>
 /// Update a job collection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Scheduler.IJobCollectionOperations.
 /// </param>
 /// <param name='cloudServiceName'>
 /// The name of the cloud service containing the job collection.
 /// </param>
 /// <param name='jobCollectionName'>
 /// The name of the job collection to update.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Update Job Collection operation.
 /// </param>
 /// <returns>
 /// The Update Job Collection operation response.
 /// </returns>
 public static JobCollectionUpdateResponse BeginUpdating(this IJobCollectionOperations operations, string cloudServiceName, string jobCollectionName, JobCollectionUpdateParameters parameters)
 {
     try
     {
         return operations.BeginUpdatingAsync(cloudServiceName, jobCollectionName, parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// Update a job collection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Scheduler.IJobCollectionOperations.
 /// </param>
 /// <param name='cloudServiceName'>
 /// The name of the cloud service containing the job collection.
 /// </param>
 /// <param name='jobCollectionName'>
 /// The name of the job collection to update.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Update Job Collection operation.
 /// </param>
 /// <returns>
 /// The Update Job Collection operation response.
 /// </returns>
 public static Task<JobCollectionUpdateResponse> BeginUpdatingAsync(this IJobCollectionOperations operations, string cloudServiceName, string jobCollectionName, JobCollectionUpdateParameters parameters)
 {
     return operations.BeginUpdatingAsync(cloudServiceName, jobCollectionName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// Update Policy.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IPolicyOperations.
 /// </param>
 /// <param name='input'>
 /// Required. input.
 /// </param>
 /// <param name='policyName'>
 /// Required. Policy Name.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// A standard service response for long running operations.
 /// </returns>
 public static Task<LongRunningOperationResponse> BeginUpdatingAsync(this IPolicyOperations operations, UpdatePolicyInput input, string policyName, CustomRequestHeaders customRequestHeaders)
 {
     return operations.BeginUpdatingAsync(input, policyName, customRequestHeaders, CancellationToken.None);
 }
 /// <summary>
 /// Updates an internal load balancer associated with an existing
 /// deployment.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.ILoadBalancerOperations.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the service.
 /// </param>
 /// <param name='deploymentName'>
 /// Required. The name of the deployment.
 /// </param>
 /// <param name='loadBalancerName'>
 /// Required. The name of the loadBalancer.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Update Load Balancer operation.
 /// </param>
 /// <returns>
 /// The response body contains the status of the specified asynchronous
 /// operation, indicating whether it has succeeded, is inprogress, or
 /// has failed. Note that this status is distinct from the HTTP status
 /// code returned for the Get Operation Status operation itself. If
 /// the asynchronous operation succeeded, the response body includes
 /// the HTTP status code for the successful request. If the
 /// asynchronous operation failed, the response body includes the HTTP
 /// status code for the failed request and error information regarding
 /// the failure.
 /// </returns>
 public static Task<OperationStatusResponse> BeginUpdatingAsync(this ILoadBalancerOperations operations, string serviceName, string deploymentName, string loadBalancerName, LoadBalancerUpdateParameters parameters)
 {
     return operations.BeginUpdatingAsync(serviceName, deploymentName, loadBalancerName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// The Begin updating Volume operation updates an existing volume.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IVirtualDiskOperations.
 /// </param>
 /// <param name='deviceId'>
 /// Required. device id
 /// </param>
 /// <param name='diskId'>
 /// Required. disk id
 /// </param>
 /// <param name='diskDetails'>
 /// Required. Parameters supplied to the update virtual disk operation.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// This is the Task Response for all Async Calls
 /// </returns>
 public static Task<GuidTaskResponse> BeginUpdatingAsync(this IVirtualDiskOperations operations, string deviceId, string diskId, VirtualDisk diskDetails, CustomRequestHeaders customRequestHeaders)
 {
     return operations.BeginUpdatingAsync(deviceId, diskId, diskDetails, customRequestHeaders, CancellationToken.None);
 }
 /// <summary>
 /// Update vCenter.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IVCenterOperations.
 /// </param>
 /// <param name='fabricName'>
 /// Required. Fabric Name.
 /// </param>
 /// <param name='vCenterName'>
 /// Required. vCenter Name.
 /// </param>
 /// <param name='input'>
 /// Required. Input to update vCenter.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// A standard service response for long running operations.
 /// </returns>
 public static Task<LongRunningOperationResponse> BeginUpdatingAsync(this IVCenterOperations operations, string fabricName, string vCenterName, UpdateVCenterInput input, CustomRequestHeaders customRequestHeaders)
 {
     return operations.BeginUpdatingAsync(fabricName, vCenterName, input, customRequestHeaders, CancellationToken.None);
 }
 /// <summary>
 /// The Update Role operation adds a virtual machine to an existing
 /// deployment.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj157187.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineOperations.
 /// </param>
 /// <param name='serviceName'>
 /// The name of your service.
 /// </param>
 /// <param name='deploymentName'>
 /// The name of your deployment.
 /// </param>
 /// <param name='virtualMachineName'>
 /// The name of your virtual machine.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Update Virtual Machine operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task<OperationResponse> BeginUpdatingAsync(this IVirtualMachineOperations operations, string serviceName, string deploymentName, string virtualMachineName, VirtualMachineUpdateParameters parameters)
 {
     return operations.BeginUpdatingAsync(serviceName, deploymentName, virtualMachineName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// The Update Role operation adds a virtual machine to an existing
 /// deployment.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj157187.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineOperations.
 /// </param>
 /// <param name='serviceName'>
 /// The name of your service.
 /// </param>
 /// <param name='deploymentName'>
 /// The name of your deployment.
 /// </param>
 /// <param name='virtualMachineName'>
 /// The name of your virtual machine.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Update Virtual Machine operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse BeginUpdating(this IVirtualMachineOperations operations, string serviceName, string deploymentName, string virtualMachineName, VirtualMachineUpdateParameters parameters)
 {
     try
     {
         return operations.BeginUpdatingAsync(serviceName, deploymentName, virtualMachineName, parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// Update a new extension. It is allowed to update an extension which
 /// had already been registered with the same identity (i.e.
 /// combination of ProviderNamespace and Type) but with different
 /// version. It will fail if the extension to update has an identity
 /// that has not been registered before, or there is already an
 /// extension with the same identity and same version.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IExtensionImageOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Update Virtual Machine
 /// Extension Image operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task<OperationResponse> BeginUpdatingAsync(this IExtensionImageOperations operations, ExtensionImageUpdateParameters parameters)
 {
     return operations.BeginUpdatingAsync(parameters, CancellationToken.None);
 }
 /// <summary>
 /// Updates the given recovery plan.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IRecoveryPlanOperations.
 /// </param>
 /// <param name='recoveryPlanName'>
 /// Required. Recovery plan name.
 /// </param>
 /// <param name='input'>
 /// Required. Update recovery plan input.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// A standard service response for long running operations.
 /// </returns>
 public static Task<LongRunningOperationResponse> BeginUpdatingAsync(this IRecoveryPlanOperations operations, string recoveryPlanName, UpdateRecoveryPlanInput input, CustomRequestHeaders customRequestHeaders)
 {
     return operations.BeginUpdatingAsync(recoveryPlanName, input, customRequestHeaders, CancellationToken.None);
 }
 /// <summary>
 /// Update protection profile.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectionProfileOperations.
 /// </param>
 /// <param name='input'>
 /// Required. input.
 /// </param>
 /// <param name='protectionProfileId'>
 /// Required. Profile id.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// A standard service response for long running operations.
 /// </returns>
 public static Task<LongRunningOperationResponse> BeginUpdatingAsync(this IProtectionProfileOperations operations, UpdateProtectionProfileInput input, string protectionProfileId, CustomRequestHeaders customRequestHeaders)
 {
     return operations.BeginUpdatingAsync(input, protectionProfileId, customRequestHeaders, CancellationToken.None);
 }