public BatchAIClusterImpl WithManualScale(int targetNodeCount, DeallocationOption deallocationOption)
        {
            ManualScaleSettings manualScaleSettings = new ManualScaleSettings()
            {
                TargetNodeCount        = targetNodeCount,
                NodeDeallocationOption = deallocationOption
            };

            if (IsInCreateMode())
            {
                EnsureScaleSettings().Manual = manualScaleSettings;
            }
            else
            {
                scaleSettings = new ScaleSettings
                {
                    Manual = manualScaleSettings
                };
            }
            return(this);
        }
 /// <summary>
 /// Specifies that cluster should be scaled by manual settings.
 /// </summary>
 /// <param name="targetNodeCount">The desired number of compute nodes in the Cluster.</param>
 /// <param name="deallocationOption">Determines what to do with the job(s) running on compute node if the cluster size is decreasing. The default value is requeue.</param>
 /// <return>The next stage of the definition.</return>
 BatchAICluster.Definition.IWithCreate BatchAICluster.Definition.IWithScaleSettings.WithManualScale(int targetNodeCount, DeallocationOption deallocationOption)
 {
     return(this.WithManualScale(targetNodeCount, deallocationOption) as BatchAICluster.Definition.IWithCreate);
 }
 /// <summary>
 /// Specifies that cluster should be scaled by manual settings.
 /// </summary>
 /// <param name="targetNodeCount">The desired number of compute nodes in the Cluster.</param>
 /// <param name="deallocationOption">Determines what to do with the job(s) running on compute node if the cluster size is decreasing. The default value is requeue.</param>
 /// <return>The next stage of the update.</return>
 BatchAICluster.Update.IUpdate BatchAICluster.Update.IWithScaleSettings.WithManualScale(int targetNodeCount, DeallocationOption deallocationOption)
 {
     return(this.WithManualScale(targetNodeCount, deallocationOption));
 }