// Validate validates this task card
771848
func (m *TaskCard) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateAssignedTo(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateEffort(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateKarma(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateMilestone(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateReportedAt(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateSeverity(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateStatus(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateTags(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateTitle(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
604290
func (t *JSONToken) Validate(validators ...Validator) error {
	var err error
	if len(validators) == 0 {
		validators = append(validators, ValidAt(time.Now()))
	}
	for _, validator := range validators {
		if err = validator(t); err != nil {
			return err
		}
	}
	return nil
}
255384
func (c *MockSSHClient) Validate() error {
	if c.MockValidate != nil {
		return c.MockValidate()
	}
	return ErrNotImplemented
}
1213004
func (strategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
	clusterRole := obj.(*rbac.ClusterRole)
	return validation.ValidateClusterRole(clusterRole)
}
134902
func (m *BPFMapEntry) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateDesiredAction(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
1249840
func (s *StageInstance) Validate() error {
	if s.Name == "" {
		return errors.New("`gocd.StageInstance.Name` is empty")
	}

	if len(s.Jobs) == 0 {
		return errors.New("At least one `Job` must be specified")
	}

	for _, job := range s.Jobs {
		if err := job.Validate(); err != nil {
			return err
		}
	}

	return nil
}
825862
func (s *Schedule) Validate(c *validation.Context) {
	if s.GetAmount() < 0 {
		c.Errorf("amount must be non-negative")
	}
	c.Enter("length")
	s.GetLength().Validate(c)
	switch n, err := s.Length.ToSeconds(); {
	case err != nil:
		c.Errorf("%s", err)
	case n == 0:
		c.Errorf("duration or seconds is required")
	}
	c.Exit()
	c.Enter("start")
	s.GetStart().Validate(c)
	c.Exit()
}
844707
func (q Queue) Validate(region string, targetList *TargetList) error {
	if region != "" && q.ARN.region != region {
		return &ErrUnknownRegion{q.ARN.region}
	}

	if !targetList.Exists(q.ARN.TargetID) {
		return &ErrARNNotFound{q.ARN}
	}

	return nil
}
70012
func (o *TaskTrackerAPI) Validate() error {
	var unregistered []string

	if o.JSONConsumer == nil {
		unregistered = append(unregistered, "JSONConsumer")
	}

	if o.MultipartformConsumer == nil {
		unregistered = append(unregistered, "MultipartformConsumer")
	}

	if o.JSONProducer == nil {
		unregistered = append(unregistered, "JSONProducer")
	}

	if o.APIKeyAuth == nil {
		unregistered = append(unregistered, "TokenAuth")
	}

	if o.TokenHeaderAuth == nil {
		unregistered = append(unregistered, "XTokenAuth")
	}

	if o.TasksAddCommentToTaskHandler == nil {
		unregistered = append(unregistered, "tasks.AddCommentToTaskHandler")
	}

	if o.TasksCreateTaskHandler == nil {
		unregistered = append(unregistered, "tasks.CreateTaskHandler")
	}

	if o.TasksDeleteTaskHandler == nil {
		unregistered = append(unregistered, "tasks.DeleteTaskHandler")
	}

	if o.TasksGetTaskCommentsHandler == nil {
		unregistered = append(unregistered, "tasks.GetTaskCommentsHandler")
	}

	if o.TasksGetTaskDetailsHandler == nil {
		unregistered = append(unregistered, "tasks.GetTaskDetailsHandler")
	}

	if o.TasksListTasksHandler == nil {
		unregistered = append(unregistered, "tasks.ListTasksHandler")
	}

	if o.TasksUpdateTaskHandler == nil {
		unregistered = append(unregistered, "tasks.UpdateTaskHandler")
	}

	if o.TasksUploadTaskFileHandler == nil {
		unregistered = append(unregistered, "tasks.UploadTaskFileHandler")
	}

	if len(unregistered) > 0 {
		return fmt.Errorf("missing registration: %s", strings.Join(unregistered, ", "))
	}

	return nil
}
327475
func (e *RequiredValidator) Validate(s interface{}) error {
	if e.TagName == "" {
		e.TagName = "required"
	}

	if e.TagValue == "" {
		e.TagValue = "true"
	}

	for _, field := range structs.Fields(s) {
		if err := e.processField("", field); err != nil {
			return err
		}
	}

	return nil
}
51358
func (c WorkerConfig) Validate() error {
	if c.Facade == nil {
		return errors.NotValidf("nil Facade")
	}
	if c.MachineTag == (names.MachineTag{}) {
		return errors.NotValidf("unspecified MachineTag")
	}
	if c.HandleAction == nil {
		return errors.NotValidf("nil HandleAction")
	}
	return nil
}
780889
func (v *VM) Validate(c *validation.Context) {
	if len(v.GetDisk()) == 0 {
		c.Errorf("at least one disk is required")
	}
	if v.GetMachineType() == "" {
		c.Errorf("machine type is required")
	}
	for i, meta := range v.GetMetadata() {
		c.Enter("metadata %d", i)
		// Implicitly rejects FromFile.
		// FromFile must be converted to FromText before calling.
		if !strings.Contains(meta.GetFromText(), ":") {
			c.Errorf("metadata from text must be in key:value form")
		}
		c.Exit()
	}
	if len(v.GetNetworkInterface()) == 0 {
		c.Errorf("at least one network interface is required")
	}
	if v.GetProject() == "" {
		c.Errorf("project is required")
	}
	if v.GetZone() == "" {
		c.Errorf("zone is required")
	}
}
847976
func (processor *processor) Validate() error {
	var errs qor.Errors
	if processor.checkSkipLeft() {
		return nil
	}

	for _, v := range processor.Resource.GetResource().Validators {
		if errs.AddError(v.Handler(processor.Result, processor.MetaValues, processor.Context)); !errs.HasError() {
			if processor.checkSkipLeft(errs.GetErrors()...) {
				break
			}
		}
	}
	return errs
}
116138
func (autoscalerStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
	autoscaler := obj.(*autoscaling.HorizontalPodAutoscaler)
	return validation.ValidateHorizontalPodAutoscaler(autoscaler)
}
1369155
func (s *X509Signer) Validate() error {
	s.init.Do(func() {
		s.err = s.initialize()
	})
	return s.err
}
1318834
func (j *Job) Validate() (err error) {
	if j.Name == "" {
		err = errors.New("`gocd.Jobs.Name` is empty")
	}
	return
}
212390
func (m *Task) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.NewTask.Validate(formats); err != nil {
		res = append(res, err)
	}

	if err := m.IDStatus.Validate(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateEnvVars(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateReason(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}