/// <summary>
 /// The Delete Role Instances operation deletes a role instance from a
 /// deployment in a cloud service.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn469418.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IDeploymentOperations.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the cloud service.
 /// </param>
 /// <param name='deploymentName'>
 /// Required. The name of the deployment.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters to delete the role.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task<AzureOperationResponse> BeginDeletingRoleInstanceByDeploymentNameAsync(this IDeploymentOperations operations, string serviceName, string deploymentName, DeploymentDeleteRoleInstanceParameters parameters)
 {
     return operations.BeginDeletingRoleInstanceByDeploymentNameAsync(serviceName, deploymentName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// The Delete Role Instances operation deletes the role instances from
 /// a deployment in a cloud service.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn469418.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IDeploymentOperations.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the cloud service.
 /// </param>
 /// <param name='deploymentSlot'>
 /// Required. The name of the deployment slot.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters to delete the role.
 /// </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> DeleteRoleInstanceByDeploymentSlotAsync(this IDeploymentOperations operations, string serviceName, string deploymentSlot, DeploymentDeleteRoleInstanceParameters parameters)
 {
     return operations.DeleteRoleInstanceByDeploymentSlotAsync(serviceName, deploymentSlot, parameters, CancellationToken.None);
 }
 /// <summary>
 /// The Delete Role Instances operation deletes a role instance from a
 /// deployment in a cloud service.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn469418.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IDeploymentOperations.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the cloud service.
 /// </param>
 /// <param name='deploymentName'>
 /// Required. The name of the deployment.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters to delete the role.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse BeginDeletingRoleInstanceByDeploymentName(this IDeploymentOperations operations, string serviceName, string deploymentName, DeploymentDeleteRoleInstanceParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IDeploymentOperations)s).BeginDeletingRoleInstanceByDeploymentNameAsync(serviceName, deploymentName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
        protected PSArgument[] CreateDeploymentDeleteRoleInstanceByDeploymentNameParameters()
        {
            string serviceName = string.Empty;
            string deploymentName = string.Empty;
            DeploymentDeleteRoleInstanceParameters roleInstanceName = new DeploymentDeleteRoleInstanceParameters();

            return ConvertFromObjectsToArguments(new string[] { "ServiceName", "DeploymentName", "RoleInstanceName" }, new object[] { serviceName, deploymentName, roleInstanceName });
        }