func (u *UpdateJob) BatchSize(size int32) *UpdateJob {
	u.req.Settings.UpdateGroupSize = size
	return u
}
BatchSize sets the max number of instances being updated at any given moment.
package realis
import (
	"github.com/paypal/gorealis/gen-go/apache/aurora"
)
type UpdateJob struct {
	Job  
	req *aurora.JobUpdateRequest
}
func NewDefaultUpdateJob(config *aurora.TaskConfig) *UpdateJob {
	req := aurora.NewJobUpdateRequest()
	req.TaskConfig = config
	req.Settings = NewUpdateSettings()
	job, ok := NewJob().(*AuroraJob)
	if !ok {
		return nil
	}
	job.jobConfig.TaskConfig = config
	for _, ptr := range config.Resources {
		if ptr.NumCpus != nil {
			job.resources[CPU].NumCpus = ptr.NumCpus
			continue  
		}
		if ptr.RamMb != nil {
			job.resources[RAM].RamMb = ptr.RamMb
			continue
		}
		if ptr.DiskMb != nil {
			job.resources[DISK].DiskMb = ptr.DiskMb
			continue
		}
		if ptr.NumGpus != nil {
			job.resources[GPU] = &aurora.Resource{NumGpus: ptr.NumGpus}
			continue
		}
	}
	req.Settings.UpdateGroupSize = 1
	req.Settings.WaitForBatchCompletion = false
	req.Settings.MinWaitInInstanceRunningMs = 45000
	req.Settings.MaxPerInstanceFailures = 0
	req.Settings.MaxFailedInstances = 0
	req.Settings.RollbackOnFailure = true
	return &UpdateJob{Job: job, req: req}
}
func NewUpdateJob(config *aurora.TaskConfig, settings *aurora.JobUpdateSettings) *UpdateJob {
	req := aurora.NewJobUpdateRequest()
	req.TaskConfig = config
	req.Settings = settings
	job, ok := NewJob().(*AuroraJob)
	if !ok {
		return nil
	}
	job.jobConfig.TaskConfig = config
	for _, ptr := range config.Resources {
		if ptr.NumCpus != nil {
			job.resources[CPU].NumCpus = ptr.NumCpus
			continue  
		}
		if ptr.RamMb != nil {
			job.resources[RAM].RamMb = ptr.RamMb
			continue
		}
		if ptr.DiskMb != nil {
			job.resources[DISK].DiskMb = ptr.DiskMb
			continue
		}
		if ptr.NumGpus != nil {
			job.resources[GPU] = &aurora.Resource{}
			job.resources[GPU].NumGpus = ptr.NumGpus
			continue  
		}
	}
	return &UpdateJob{Job: job, req: req}
}
func (u *UpdateJob) InstanceCount(inst int32) *UpdateJob {
	u.req.InstanceCount = inst
	return u
}